Skip to main content

HPLC data analysis in Python

Code style: black

Python 3.10

Testing (CI)

Publishing (CI)

The hplc_data_analysis tool automates the typical analysis of HPLC data, saving time, avoiding human error, and increasing comparability of results from different groups.

Some key features:

  • handle multiple HPLC semi-quantitative data tables (obtained with different methods)
  • duild a database of all identified compounds and their relevant properties using PubChemPy
  • split each compound into its functional groups using a published fragmentation algorithm
  • produce single file report, single replicate (intended as the sum of more methods applied to one vial), comprehensive multi-sample (average and deviation of replicates) reports and aggregated reports based on functional group mass fractions in the samples
  • provides plotting capabilities

Framework

File

A .txt or .csv file located in the project folder that contains time, area, and concentration information for many compunds for a measure.

Depending on the instrument export parameter, the structure of Files can differ slightly. Project-Parameters ensure that the loading process can lead to the same data structure to allow to perform all downstream computations.

A good naming convention for Files ensures the code handles replicates of the same sample correctly. Filenames have to follow the convention: method_name-of-sample-with-dashes-only_replicatenumber

Examples that are correctly handled:

  • 210_Bio-oil-foodwaste-250C_1
  • 254_Bio-oil-foodwaste-250C_1
  • 210_FW_2
  • 254_FW_2

Examples of NON-ACCEPTABLE names are

  • 210-bio_oil_1
  • 254-FW1

Replicate

If more Files belong to the same material (Sample, see below) but represent different methods that see different compounds (for example, different wavelengths are used in the detector), they can be merged into the same Replicate.

A Replicate is the union of files with different methods that are complementary in the analysis of a material.

Sample

A collection of Replicates that replicate the same measure and allow to assess reproducibility.

Project

The folder path indicates where the Files are located and where the output folder will be created.

The Project-Parameters are valid for each Sample.

The Project can generate Reports and Plots for all Files, Replicates, or Sample or only for some of them.

Reports

Reports contain the results for one parameter (abbreviated as param) for all Files, Replicates, or Sample.

There are two types of reports:

Reports (simple-reports or compound-reports)

These report report the param value for each compound in each Files, Replicates, or Sample.

Example: the values of conc_vial_mg_L for each compound in each File are collected in a single pandas dataframe (and saved as excel worksheet) for an easy comparison.

Aggrreps (aggregated reports)

These report report the param value for each aggregated functional group in each Files, Replicates, or Sample.

The results of componds are aggregated by functional group (see this paper for details).

Plots

Each report can be plotted using the plot_report method of the Project class.

Documentation

Check out the documentation.

Installation

You can install the package from PyPI:

Examples

Each example is available as a folder in the examples folder and contains the code and the necessary input data. To run examples:

  1. Install hplc_data_analysis in your Python environment
  2. Download the folder that contains the example
  3. Run the code
  4. If you run the scripts as Jupyter Notebooks, replace the relative path at the beginning of each example with the absolute path to the folder where the code is located

Plotting with myfigure

Plots rely on the package myfigure, a package to simplify scientific plotting in data analysis packages. Check out its documentation and GitHub.

Metadata

Release files for hplc-data-analysis 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hplc-data-analysis 2.0.0
File Size Uploaded
hplc_data_analysis-2.0.0.tar.gz 23.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hplc-data-analysis 2.0.0
File Interpreter ABI Platform
hplc_data_analysis-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.0 kB

Release files / hplc_data_analysis-2.0.0.tar.gz

Download URL hplc_data_analysis-2.0.0.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
55c63cd4eb4c14e2fb213826fcdde2d8c5d000450cc776a9d568d4af3c14524d
BLAKE2b-256 checksum
How to use checksums
ab99cac1e18a55fb40bf795e31b391b7f35c7666c963ab30ef72078f9a3c3a50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / hplc_data_analysis-2.0.0-py3-none-any.whl

Download URL hplc_data_analysis-2.0.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2345ceea7982017598eae5e69f66198110ea6435cdbc5a99f767ab504258b641
BLAKE2b-256 checksum
How to use checksums
526faf3ee1aff1659ba194e857c4c818868716af66401d7287cfcb4942ac3b04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page