Jason

Additional Jason Information

A good start with using external commands such as Python is BeautifulJASON in its PyPi webpage:
https://pypi.org/project/beautifuljason/

For the external commands look at the series of blog posts:

Python implementation.

There are two ways of combining Python and Jason.

One way is to call a python script in the processing, as you mentioned.

The other way is to call Jason from a Python script, which may be more relevant when handling several files for PCA analysis. This is done with BeautifulJason. There are several script examples in the BeautifulJason folder. To find out the location of this folder, once installed you can type in the command line:  pip show beautifuljason

Quality Control Example:

The listed uploaded codes below rely on Jason rules to always integrate the regions as specified in whichever method you are using. In this case the second script extracts the integrals from a SBR sample and a blank sample, and calculated the content of different components as described by ISO 21561-1:2015. The first script is the one I describe in the PDF, which instead of using a blank, uses the Jason capability to find solvents and extract peak areas, to remove the solvent contribution from one of the integrals.

This in essence is a form of targeted analysis, so the script could be adapted to extract the integrals of relevant metabolites and you could call an external PCA routine on these data.

For untargeted analysis you could in principle use the resample processing function, to reduce the number of points in the spectrum to a suitable number.

Uploaded the codes:

https://github.com/adolfobotana/Quality_control/blob/main/SBR_analysis_solventsubtraction.py

https://github.com/adolfobotana/Quality_control/blob/main/SBR_analysis_with_blank_hdf5.py

Batch Processing example:
Extract integrals across a range of spectra and exporting them to a CSV file.