20 minutes

Any

English 

Chemometrics with Perl & Pharmaceutical Applications

Andrew J. O’Neil PhD
Director, Nirmetrix Limited, 20-22 Wenlock Road, London, N1 7GU, U.K.

The extensive functionality of the Perl language and its clear, C-like syntax make it a good choice for scientific data analysis and also for development of software with a graphical user interface (GUI).

This work demonstrates the use of Perl in analytical
chemistry, specifically near infrared (NIR) spectroscopy, a non-destructive, non-invasive, rapid method of chemical analysis.
Example applications of Perl for pharmaceutical
analysis are reported.

A portable, handheld NIR spectrometer (model NIR-S-G1,
InnoSpectra Corporation) is controlled by a GUI written in
Perl/Tk. Resulting spectra are simultaneously interpreted with results reported instantaneously to the end-user.

NIR absorptions arise due to overtone vibrations of chemical bonds that are approximate
multiples of the fundamental mid-infrared absorption frequencies (i.e. first, second and
third overtones) or are combination bands of several fundamental vibrations’ frequencies.
Reduction in reflected incident light intensity by a material at a given wavelength, relative
to that from a non-absorbing, diffusely-reflecting standard (e.g. sintered PTFE) occurs due
to absorption by one or more covalent bonds of the material studied. Bonds that absorb in
this region of the electromagnetic spectrum generally involve hydrogen covalently bonded
to either: carbon, oxygen or nitrogen. Most organic molecules, including pharmaceutical
active ingredients, thus show absorptions in this region.

An NIR spectrum of a chemical-sample is a multivariate data array of N-reflected
intensities of light at discrete wavelengths (i.e. 1-by-N) across the wavelength range
(approximately: 900 – 1,700 nm). With many variables (wavelengths) in a spectrum
(between one and several hundreds of wavelengths), interpretation of a spectrum or a
collection of spectra requires multivariate analysis (termed chemometrics).

This work illustrates the use of Perl twofold. The first application is for control of the open-
source scientific computing programming language GNU Octave, to generate multiple NIR
data calibration models for quantification of analyte (i.e. pharmaceutical active ingredient).
These multivariate-regression models are produced by calibration of NIR data with
reference analytical method concentration data, using the partial least squares regression
(PLSR) algorithm. Various mathematical data pretreatments are applied to the NIR spectra
and, in combination, subsets of wavelength regions are also utilised in the data modelling.
The combined effects of these on the accuracy and precision of calibration is determined.
The aim of this data modelling is to select a model with high accuracy and precision.
The second application of Perl is for control of the NIR spectrometer. A Perl/Tk developed
GUI is used to control the handheld NIR spectrometer, enabling acquisition of: background spectra of the reference reflectance standard (for instrument response calibration) and
then of spectra of chemical samples. The GUI enables interpretation of the acquired
spectrum on-the-fly, for a qualitative (i.e. identification) or quantitative chemometric model.
Perl scripts load ASCII text arrays – previously developed, optimised GNU Octave
chemometric model and chemical-sample spectrum – and perform multivariate analysis.
The GUI then reports to the end-user the required metric for either identification (along
with a pass/fail result) or analyte quantification. This therefore obviates the need for the
end-user to perform chemometrics.
The presentation will include illustration of the use of Perl for NIR analysis of pharmaceuticals and for several applications. 

Attended by:
Andrew Solomon (‎illy‎)
Boyd Duffee
Diamond:
Gold:
Silver:
Bronze:

More information about all of our valued sponsors is available on our sponsors page.