pychemstation 0.10.2__tar.gz → 0.10.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pychemstation-0.10.4/.pre-commit-config.yaml +10 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/PKG-INFO +46 -20
- {pychemstation-0.10.2 → pychemstation-0.10.4}/README.md +43 -18
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/__init__.py +1 -1
- pychemstation-0.10.4/pychemstation/analysis/__init__.py +4 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/analysis/base_spectrum.py +7 -7
- {pychemstation-0.10.2/build/lib/pychemstation/utils → pychemstation-0.10.4/pychemstation/analysis}/chromatogram.py +4 -4
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/analysis/process_report.py +106 -70
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/control/README.md +21 -53
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/control/__init__.py +3 -2
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/control/controllers/__init__.py +1 -5
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/control/controllers/comm.py +20 -11
- pychemstation-0.10.4/pychemstation/control/controllers/devices/device.py +49 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/control/controllers/devices/injector.py +24 -14
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/control/controllers/tables/method.py +233 -100
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/control/controllers/tables/ms.py +7 -4
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/control/controllers/tables/sequence.py +134 -54
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/control/controllers/tables/table.py +152 -92
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/control/hplc.py +96 -78
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/generated/__init__.py +0 -2
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/generated/pump_method.py +15 -19
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/utils/macro.py +10 -9
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/utils/method_types.py +1 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/utils/num_utils.py +2 -2
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/utils/parsing.py +0 -11
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/utils/sequence_types.py +2 -3
- {pychemstation-0.10.2/build/lib/pychemstation/analysis → pychemstation-0.10.4/pychemstation/utils}/spec_utils.py +1 -2
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/utils/table_types.py +10 -9
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/utils/tray_types.py +48 -38
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pyproject.toml +3 -2
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/tests/constants.py +67 -47
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/out.txt +1705 -0
- pychemstation-0.10.4/tests/test_method.py +63 -0
- pychemstation-0.10.2/tests/test_offline_stable.py → pychemstation-0.10.4/tests/test_offline_integration.py +27 -11
- pychemstation-0.10.2/build/lib/tests/test_online_stable.py → pychemstation-0.10.4/tests/test_online_integration.py +80 -62
- pychemstation-0.10.2/build/lib/tests/test_runs_stable.py → pychemstation-0.10.4/tests/test_runs_integration.py +86 -65
- pychemstation-0.10.4/tests/test_sequence.py +22 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/uv.lock +131 -1
- pychemstation-0.10.2/build/lib/pychemstation/analysis/__init__.py +0 -5
- pychemstation-0.10.2/build/lib/pychemstation/analysis/process_report.py +0 -283
- pychemstation-0.10.2/build/lib/pychemstation/analysis/utils.py +0 -63
- pychemstation-0.10.2/build/lib/pychemstation/control/__init__.py +0 -8
- pychemstation-0.10.2/build/lib/pychemstation/control/comm.py +0 -206
- pychemstation-0.10.2/build/lib/pychemstation/control/controllers/devices/column.py +0 -12
- pychemstation-0.10.2/build/lib/pychemstation/control/controllers/devices/dad.py +0 -0
- pychemstation-0.10.2/build/lib/pychemstation/control/controllers/devices/device.py +0 -39
- pychemstation-0.10.2/build/lib/pychemstation/control/controllers/devices/pump.py +0 -43
- pychemstation-0.10.2/build/lib/pychemstation/control/controllers/method.py +0 -338
- pychemstation-0.10.2/build/lib/pychemstation/control/controllers/sequence.py +0 -190
- pychemstation-0.10.2/build/lib/pychemstation/control/controllers/table_controller.py +0 -266
- pychemstation-0.10.2/build/lib/pychemstation/control/controllers/tables/table.py +0 -315
- pychemstation-0.10.2/build/lib/pychemstation/control/hplc.py +0 -299
- pychemstation-0.10.2/build/lib/pychemstation/control/table/__init__.py +0 -3
- pychemstation-0.10.2/build/lib/pychemstation/control/table/method.py +0 -274
- pychemstation-0.10.2/build/lib/pychemstation/control/table/sequence.py +0 -210
- pychemstation-0.10.2/build/lib/pychemstation/control/table/table_controller.py +0 -201
- pychemstation-0.10.2/build/lib/pychemstation/generated/pump_method.py +0 -519
- pychemstation-0.10.2/build/lib/pychemstation/utils/macro.py +0 -100
- pychemstation-0.10.2/build/lib/pychemstation/utils/method_types.py +0 -56
- pychemstation-0.10.2/build/lib/pychemstation/utils/num_utils.py +0 -65
- pychemstation-0.10.2/build/lib/pychemstation/utils/parsing.py +0 -291
- pychemstation-0.10.2/build/lib/pychemstation/utils/sequence_types.py +0 -54
- pychemstation-0.10.2/build/lib/pychemstation/utils/spec_utils.py +0 -304
- pychemstation-0.10.2/build/lib/pychemstation/utils/table_types.py +0 -95
- pychemstation-0.10.2/build/lib/tests/test_comb.py +0 -136
- pychemstation-0.10.2/build/lib/tests/test_comm.py +0 -65
- pychemstation-0.10.2/build/lib/tests/test_inj.py +0 -39
- pychemstation-0.10.2/build/lib/tests/test_method.py +0 -99
- pychemstation-0.10.2/build/lib/tests/test_nightly.py +0 -80
- pychemstation-0.10.2/build/lib/tests/test_offline_stable.py +0 -69
- pychemstation-0.10.2/build/lib/tests/test_proc_rep.py +0 -52
- pychemstation-0.10.2/build/lib/tests/test_sequence.py +0 -125
- pychemstation-0.10.2/build/lib/tests/test_stable.py +0 -276
- pychemstation-0.10.2/pychemstation/__init__.py +0 -3
- pychemstation-0.10.2/pychemstation/analysis/__init__.py +0 -5
- pychemstation-0.10.2/pychemstation/analysis/base_spectrum.py +0 -506
- pychemstation-0.10.2/pychemstation/control/controllers/__init__.py +0 -13
- pychemstation-0.10.2/pychemstation/control/controllers/comm.py +0 -222
- pychemstation-0.10.2/pychemstation/control/controllers/devices/__init__.py +0 -0
- pychemstation-0.10.2/pychemstation/control/controllers/devices/device.py +0 -39
- pychemstation-0.10.2/pychemstation/control/controllers/devices/injector.py +0 -51
- pychemstation-0.10.2/pychemstation/control/controllers/tables/__init__.py +0 -0
- pychemstation-0.10.2/pychemstation/control/controllers/tables/method.py +0 -405
- pychemstation-0.10.2/pychemstation/control/controllers/tables/ms.py +0 -21
- pychemstation-0.10.2/pychemstation/control/controllers/tables/sequence.py +0 -290
- pychemstation-0.10.2/pychemstation/generated/__init__.py +0 -56
- pychemstation-0.10.2/pychemstation/generated/dad_method.py +0 -367
- pychemstation-0.10.2/pychemstation/utils/__init__.py +0 -0
- pychemstation-0.10.2/pychemstation/utils/chromatogram.py +0 -116
- pychemstation-0.10.2/pychemstation/utils/injector_types.py +0 -52
- pychemstation-0.10.2/pychemstation/utils/pump_types.py +0 -7
- pychemstation-0.10.2/pychemstation/utils/spec_utils.py +0 -304
- pychemstation-0.10.2/pychemstation/utils/tray_types.py +0 -183
- pychemstation-0.10.2/tests/__init__.py +0 -0
- pychemstation-0.10.2/tests/constants.py +0 -134
- pychemstation-0.10.2/tests/test_online_stable.py +0 -275
- pychemstation-0.10.2/tests/test_runs_stable.py +0 -225
- {pychemstation-0.10.2 → pychemstation-0.10.4}/.gitignore +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/.gitlab-ci.yml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/CHANGELOG.md +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/CONTRIBUTING.md +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/LICENSE +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/index.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/analysis/base_spectrum.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/analysis/spec_utils.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/analysis/utils.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/analysis.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/control/chromatogram.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/control/hplc.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/control.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/generated.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/utils/chemstation.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/utils/constants.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/utils/hplc_param_types.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation/utils.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/pychemstation.html +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/doc/search.js +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation/control/controllers/README.md +0 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/control/controllers/devices/__init__.py +0 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/control/controllers/tables/__init__.py +0 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/generated/dad_method.py +0 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/utils/__init__.py +0 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/utils/injector_types.py +0 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/utils/pump_types.py +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation.egg-info/PKG-INFO +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation.egg-info/SOURCES.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation.egg-info/dependency_links.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation.egg-info/requires.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/pychemstation.egg-info/top_level.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/0_2025-03-15 19-14-35.PDF +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/ACQRES.REG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/CSlbk.ini +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DA.M/DAMETHOD.REG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DA.M/INFO.MTH +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DA.M/RECALIB.MTH +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DA.M/rpthead.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1.UV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1A.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1A.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1B.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1B.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1C.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1C.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1D.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1D.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1E.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DAD1E.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/DiagResults.REG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/PMP1.AnalyticalResults.drvml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/REPORT01.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/REPORT02.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/REPORT03.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/REPORT04.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/REPORT05.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/RUN.LOG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/Report.TXT +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/Report00.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/Report01.xls +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/SAMPLE.XML +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/SAMPLE.XML.bak +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/WLS1.Sampler.scml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/acq.macaml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/acq.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/acq_MethHist.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/acq_damethod.reg +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/da.macaml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/lcdiag.reg +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/sample.acaml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/0_2025-03-15 19-14-35.D/single.B +0 -0
- {pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/tests/__init__.py +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_talk.mac +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/CSlbk.ini +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/ACQ.MS +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/Agilent1200erDadDriver1.RapidControl.ConfigXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/Agilent1200erDadDriver1.RapidControl.MethodMetaData.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/Agilent1200erDadDriver1.RapidControl.MethodXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentColumnCompDriver1.RapidControl.ConfigXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentColumnCompDriver1.RapidControl.MethodMetaData.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentColumnCompDriver1.RapidControl.MethodXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentPumpDriver1.RapidControl.ConfigXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentPumpDriver1.RapidControl.MethodMetaData.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentPumpDriver1.RapidControl.MethodXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentSamplerDriver1.RapidControl.ConfigXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentSamplerDriver1.RapidControl.MethodMetaData.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentSamplerDriver1.RapidControl.MethodXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/AgilentSamplerDriver1.RapidControl.PretreatXML.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/DAMETHOD.REG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/FIA.REG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/INFO.MTH +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/INJECTOR.MTH +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/MassHunterIntegration.ini +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/RECALIB.MTH +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/RapidControl.InstrumentConfig.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/rpthead.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/GENERAL-POROSHELL-OPT.M/smpl_pur.mth +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/Methods.Reg +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/hplc_testing.B +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/hplc_testing.LOG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/hplc_testing.S +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/hplc_testing.Start +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/ACQRES.REG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/CSlbk.ini +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DA.M/DAMETHOD.REG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DA.M/INFO.MTH +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DA.M/RECALIB.MTH +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DA.M/rpthead.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1.UV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1A.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1A.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1B.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1B.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1C.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1C.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1D.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1D.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1E.ch +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DAD1E.npz +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/DiagResults.REG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/Limsinf.xml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/PMP1.AnalyticalResults.drvml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT01.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT02.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT03.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT04.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/REPORT05.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/RUN.LOG +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/Report.TXT +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/Report00.CSV +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/Report01.xls +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/SAMPLE.XML +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/SAMPLE.XML.bak +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/WLS1.Sampler.scml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/acq.macaml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/acq.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/acq_MethHist.txt +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/acq_damethod.reg +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/da.macaml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/hplc_testing 2025-03-27 17-13-47_run seq with new method.PDF +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/lcdiag.reg +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/run seq with new method.D/sequence.acam_ +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/tests/hplc_testing 2025-03-27 17-13-47/sequence.acaml +0 -0
- {pychemstation-0.10.2 → pychemstation-0.10.4}/update-lib.sh +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pychemstation
|
3
|
-
Version: 0.10.
|
4
|
-
Summary: Library to interact with Chemstation software, primarily used in Hein
|
3
|
+
Version: 0.10.4
|
4
|
+
Summary: Library to interact with Chemstation software, primarily used in Hein lab
|
5
5
|
Project-URL: Documentation, https://pychemstation-e5a086.gitlab.io/pychemstation.html
|
6
6
|
Project-URL: Repository, https://gitlab.com/heingroup/device-api/pychemstation
|
7
7
|
Author-email: lucyhao <hao.lucyy@gmail.com>
|
@@ -18,6 +18,7 @@ Requires-Dist: matplotlib>=3.7.5
|
|
18
18
|
Requires-Dist: pandas>=2.0.3
|
19
19
|
Requires-Dist: pdoc>=14.7.0
|
20
20
|
Requires-Dist: polling>=0.3.2
|
21
|
+
Requires-Dist: pre-commit>=4.2.0
|
21
22
|
Requires-Dist: pytest>=7.3.5
|
22
23
|
Requires-Dist: rainbow-api>=1.0.10
|
23
24
|
Requires-Dist: result>=0.17.0
|
@@ -79,29 +80,55 @@ HPLCTalk_Run
|
|
79
80
|
|
80
81
|
```python
|
81
82
|
from pychemstation.control import HPLCController
|
83
|
+
from pychemstation.utils.method_types import *
|
82
84
|
import pandas as pd
|
83
85
|
|
84
|
-
# these paths will be unique to your Chemstation setup
|
85
|
-
DEFAULT_METHOD = "GENERAL-POROSHELL"
|
86
|
-
DEFAULT_COMMAND_PATH = "C:\\Users\\User\\Desktop\\Lucy\\"
|
87
86
|
DEFAULT_METHOD_DIR = "C:\\ChemStation\\1\\Methods\\"
|
88
|
-
|
89
|
-
|
90
|
-
|
87
|
+
SEQUENCE_DIR = "C:\\USERS\\PUBLIC\\DOCUMENTS\\CHEMSTATION\\3\\Sequence"
|
88
|
+
DEFAULT_COMMAND_PATH = "C:\\Users\\User\\Desktop\\Lucy\\"
|
89
|
+
DATA_DIR_2 = "C:\\Users\\Public\\Documents\\ChemStation\\2\\Data"
|
90
|
+
DATA_DIR_3 = "C:\\Users\\Public\\Documents\\ChemStation\\3\\Data"
|
91
91
|
|
92
|
+
# Initialize HPLC Controller
|
92
93
|
hplc_controller = HPLCController(data_dirs=[DATA_DIR_2, DATA_DIR_3],
|
93
94
|
comm_dir=DEFAULT_COMMAND_PATH,
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
hplc_controller.switch_method(
|
99
|
-
|
95
|
+
method_dir=DEFAULT_METHOD_DIR,
|
96
|
+
sequence_dir=SEQUENCE_DIR)
|
97
|
+
|
98
|
+
# Switching a method
|
99
|
+
hplc_controller.switch_method("General-Poroshell")
|
100
|
+
|
101
|
+
# Editing a method
|
102
|
+
new_method = MethodDetails(
|
103
|
+
name="General-Poroshell",
|
104
|
+
params=HPLCMethodParams(
|
105
|
+
organic_modifier=7,
|
106
|
+
flow=0.44),
|
107
|
+
timetable=[
|
108
|
+
TimeTableEntry(
|
109
|
+
start_time=0.10,
|
110
|
+
organic_modifer=7,
|
111
|
+
flow=0.34
|
112
|
+
),
|
113
|
+
TimeTableEntry(
|
114
|
+
start_time=4,
|
115
|
+
organic_modifer=99,
|
116
|
+
flow=0.55
|
117
|
+
)
|
118
|
+
],
|
119
|
+
stop_time=5,
|
120
|
+
post_time=2
|
121
|
+
)
|
122
|
+
hplc_controller.edit_method(new_method)
|
123
|
+
|
124
|
+
# Run a method and get a report or data from last run method
|
125
|
+
hplc_controller.run_method(experiment_name="test_experiment")
|
126
|
+
report = hplc_controller.get_last_run_method_report()
|
127
|
+
vial_location = report.vial_location
|
128
|
+
|
129
|
+
# Save, analyze or plot the data!
|
100
130
|
chrom = hplc_controller.get_last_run_method_data()
|
101
|
-
|
102
|
-
# afterwards, save, analyze or plot the data!
|
103
|
-
values = {"x": chrom.A.x, "y": chrom.A.y}
|
104
|
-
chromatogram_data = pd.DataFrame.from_dict(values)
|
131
|
+
chromatogram_data = pd.DataFrame.from_dict({"x": chrom.A.x, "y": chrom.A.y})
|
105
132
|
chromatogram_data.to_csv("Run 10.csv", index=False)
|
106
133
|
```
|
107
134
|
|
@@ -122,7 +149,6 @@ Lucy Hao, Maria Politi
|
|
122
149
|
- Adapted from [**AnalyticalLabware**](https://github.com/croningp/analyticallabware), created by members in the Cronin
|
123
150
|
Group. Copyright © Cronin Group, used under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license.
|
124
151
|
- Adapted from the [MACROS](https://github.com/Bourne-Group/HPLCMethodOptimisationGUI) used in [**Operator-free HPLC
|
125
|
-
automated method development guided by Bayesian optimization
|
126
|
-
**](https://pubs.rsc.org/en/content/articlelanding/2024/dd/d4dd00062e),
|
152
|
+
automated method development guided by Bayesian optimization**](https://pubs.rsc.org/en/content/articlelanding/2024/dd/d4dd00062e),
|
127
153
|
created by members in the Bourne Group. Copyright © Bourne Group, used under
|
128
154
|
the [MIT](https://opensource.org/license/mit) license.
|
@@ -49,29 +49,55 @@ HPLCTalk_Run
|
|
49
49
|
|
50
50
|
```python
|
51
51
|
from pychemstation.control import HPLCController
|
52
|
+
from pychemstation.utils.method_types import *
|
52
53
|
import pandas as pd
|
53
54
|
|
54
|
-
# these paths will be unique to your Chemstation setup
|
55
|
-
DEFAULT_METHOD = "GENERAL-POROSHELL"
|
56
|
-
DEFAULT_COMMAND_PATH = "C:\\Users\\User\\Desktop\\Lucy\\"
|
57
55
|
DEFAULT_METHOD_DIR = "C:\\ChemStation\\1\\Methods\\"
|
58
|
-
|
59
|
-
|
60
|
-
|
56
|
+
SEQUENCE_DIR = "C:\\USERS\\PUBLIC\\DOCUMENTS\\CHEMSTATION\\3\\Sequence"
|
57
|
+
DEFAULT_COMMAND_PATH = "C:\\Users\\User\\Desktop\\Lucy\\"
|
58
|
+
DATA_DIR_2 = "C:\\Users\\Public\\Documents\\ChemStation\\2\\Data"
|
59
|
+
DATA_DIR_3 = "C:\\Users\\Public\\Documents\\ChemStation\\3\\Data"
|
61
60
|
|
61
|
+
# Initialize HPLC Controller
|
62
62
|
hplc_controller = HPLCController(data_dirs=[DATA_DIR_2, DATA_DIR_3],
|
63
63
|
comm_dir=DEFAULT_COMMAND_PATH,
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
hplc_controller.switch_method(
|
69
|
-
|
64
|
+
method_dir=DEFAULT_METHOD_DIR,
|
65
|
+
sequence_dir=SEQUENCE_DIR)
|
66
|
+
|
67
|
+
# Switching a method
|
68
|
+
hplc_controller.switch_method("General-Poroshell")
|
69
|
+
|
70
|
+
# Editing a method
|
71
|
+
new_method = MethodDetails(
|
72
|
+
name="General-Poroshell",
|
73
|
+
params=HPLCMethodParams(
|
74
|
+
organic_modifier=7,
|
75
|
+
flow=0.44),
|
76
|
+
timetable=[
|
77
|
+
TimeTableEntry(
|
78
|
+
start_time=0.10,
|
79
|
+
organic_modifer=7,
|
80
|
+
flow=0.34
|
81
|
+
),
|
82
|
+
TimeTableEntry(
|
83
|
+
start_time=4,
|
84
|
+
organic_modifer=99,
|
85
|
+
flow=0.55
|
86
|
+
)
|
87
|
+
],
|
88
|
+
stop_time=5,
|
89
|
+
post_time=2
|
90
|
+
)
|
91
|
+
hplc_controller.edit_method(new_method)
|
92
|
+
|
93
|
+
# Run a method and get a report or data from last run method
|
94
|
+
hplc_controller.run_method(experiment_name="test_experiment")
|
95
|
+
report = hplc_controller.get_last_run_method_report()
|
96
|
+
vial_location = report.vial_location
|
97
|
+
|
98
|
+
# Save, analyze or plot the data!
|
70
99
|
chrom = hplc_controller.get_last_run_method_data()
|
71
|
-
|
72
|
-
# afterwards, save, analyze or plot the data!
|
73
|
-
values = {"x": chrom.A.x, "y": chrom.A.y}
|
74
|
-
chromatogram_data = pd.DataFrame.from_dict(values)
|
100
|
+
chromatogram_data = pd.DataFrame.from_dict({"x": chrom.A.x, "y": chrom.A.y})
|
75
101
|
chromatogram_data.to_csv("Run 10.csv", index=False)
|
76
102
|
```
|
77
103
|
|
@@ -92,7 +118,6 @@ Lucy Hao, Maria Politi
|
|
92
118
|
- Adapted from [**AnalyticalLabware**](https://github.com/croningp/analyticallabware), created by members in the Cronin
|
93
119
|
Group. Copyright © Cronin Group, used under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license.
|
94
120
|
- Adapted from the [MACROS](https://github.com/Bourne-Group/HPLCMethodOptimisationGUI) used in [**Operator-free HPLC
|
95
|
-
automated method development guided by Bayesian optimization
|
96
|
-
**](https://pubs.rsc.org/en/content/articlelanding/2024/dd/d4dd00062e),
|
121
|
+
automated method development guided by Bayesian optimization**](https://pubs.rsc.org/en/content/articlelanding/2024/dd/d4dd00062e),
|
97
122
|
created by members in the Bourne Group. Copyright © Bourne Group, used under
|
98
123
|
the [MIT](https://opensource.org/license/mit) license.
|
{pychemstation-0.10.2/build/lib → pychemstation-0.10.4}/pychemstation/analysis/base_spectrum.py
RENAMED
@@ -197,10 +197,10 @@ class AbstractSpectrum(ABC):
|
|
197
197
|
return (self.x.copy()[full_mask], self.y.copy()[full_mask])
|
198
198
|
|
199
199
|
def show_spectrum(
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
200
|
+
self,
|
201
|
+
filename=None,
|
202
|
+
title=None,
|
203
|
+
label=None,
|
204
204
|
):
|
205
205
|
"""Plots the spectral data using matplotlib.pyplot module.
|
206
206
|
|
@@ -249,7 +249,7 @@ class AbstractSpectrum(ABC):
|
|
249
249
|
os.makedirs(path, exist_ok=True)
|
250
250
|
fig.savefig(os.path.join(path, f"{filename}.png"), dpi=150)
|
251
251
|
|
252
|
-
def find_peaks(self, threshold=1, min_width
|
252
|
+
def find_peaks(self, threshold=1, min_width=0.1, min_dist=None, area=None):
|
253
253
|
"""Finds all peaks above the threshold with at least min_width width.
|
254
254
|
|
255
255
|
Args:
|
@@ -385,12 +385,12 @@ class AbstractSpectrum(ABC):
|
|
385
385
|
|
386
386
|
if rule == "trapz":
|
387
387
|
return integrate.trapz(
|
388
|
-
self.y[left_idx: right_idx + 1], self.x[left_idx: right_idx + 1]
|
388
|
+
self.y[left_idx : right_idx + 1], self.x[left_idx : right_idx + 1]
|
389
389
|
)
|
390
390
|
|
391
391
|
elif rule == "simps":
|
392
392
|
return integrate.simps(
|
393
|
-
self.y[left_idx: right_idx + 1], self.x[left_idx: right_idx + 1]
|
393
|
+
self.y[left_idx : right_idx + 1], self.x[left_idx : right_idx + 1]
|
394
394
|
)
|
395
395
|
|
396
396
|
else:
|
@@ -6,8 +6,9 @@ from dataclasses import dataclass
|
|
6
6
|
|
7
7
|
import numpy as np
|
8
8
|
|
9
|
-
|
10
|
-
from .parsing import CHFile
|
9
|
+
|
10
|
+
from ..utils.parsing import CHFile
|
11
|
+
from ..analysis.base_spectrum import AbstractSpectrum
|
11
12
|
|
12
13
|
ACQUISITION_PARAMETERS = "acq.txt"
|
13
14
|
|
@@ -36,12 +37,11 @@ class AgilentHPLCChromatogram(AbstractSpectrum):
|
|
36
37
|
}
|
37
38
|
|
38
39
|
def __init__(self, path=None, autosaving=False):
|
39
|
-
|
40
40
|
if path is not None:
|
41
41
|
os.makedirs(path, exist_ok=True)
|
42
42
|
self.path = path
|
43
43
|
else:
|
44
|
-
self.path = os.path.join("
|
44
|
+
self.path = os.path.join("../utils", "hplc_data")
|
45
45
|
os.makedirs(self.path, exist_ok=True)
|
46
46
|
|
47
47
|
super().__init__(path=path, autosaving=autosaving)
|
@@ -17,19 +17,19 @@ from aghplctools.ingestion.text import (
|
|
17
17
|
)
|
18
18
|
from result import Err, Ok, Result
|
19
19
|
|
20
|
-
from
|
21
|
-
from
|
20
|
+
from ..analysis.chromatogram import AgilentHPLCChromatogram
|
21
|
+
from ..utils.tray_types import FiftyFourVialPlate, Tray
|
22
22
|
|
23
23
|
|
24
24
|
@dataclass
|
25
25
|
class AgilentPeak:
|
26
|
+
peak_number: Optional[int]
|
26
27
|
retention_time: float
|
28
|
+
peak_type: Optional[str]
|
27
29
|
width: float
|
28
30
|
area: float
|
29
31
|
height: float
|
30
|
-
|
31
|
-
peak_type: Optional[str]
|
32
|
-
height_percent: Optional[float]
|
32
|
+
area_percent: Optional[float]
|
33
33
|
|
34
34
|
|
35
35
|
@dataclass
|
@@ -73,12 +73,14 @@ class CSVProcessor(ReportProcessor):
|
|
73
73
|
"""
|
74
74
|
Method to parse details from CSV report.
|
75
75
|
|
76
|
-
:
|
76
|
+
:return: subset of complete report details, specifically the sample location, solvents in pumps,
|
77
77
|
and list of peaks at each wavelength channel.
|
78
78
|
"""
|
79
|
-
labels = os.path.join(self.path,
|
79
|
+
labels = os.path.join(self.path, "REPORT00.CSV")
|
80
80
|
if os.path.exists(labels):
|
81
|
-
df_labels: Dict[int, Dict[int:
|
81
|
+
df_labels: Dict[int, Dict[int:AnyStr]] = pd.read_csv(
|
82
|
+
labels, encoding="utf-16", header=None
|
83
|
+
).to_dict()
|
82
84
|
vial_location = []
|
83
85
|
signals = {}
|
84
86
|
solvents = {}
|
@@ -91,18 +93,28 @@ class CSVProcessor(ReportProcessor):
|
|
91
93
|
elif val == "Number of Signals":
|
92
94
|
num_signals = int(df_labels[1][pos])
|
93
95
|
for s in range(1, num_signals + 1):
|
94
|
-
df = pd.read_csv(
|
95
|
-
|
96
|
+
df = pd.read_csv(
|
97
|
+
os.path.join(self.path, f"REPORT0{s}.CSV"),
|
98
|
+
encoding="utf-16",
|
99
|
+
header=None,
|
100
|
+
)
|
96
101
|
peaks = df.apply(lambda row: AgilentPeak(*row), axis=1)
|
97
|
-
wavelength = df_labels[1][pos + s].partition(",4 Ref=off")[0][
|
98
|
-
|
102
|
+
wavelength = df_labels[1][pos + s].partition(",4 Ref=off")[0][
|
103
|
+
-3:
|
104
|
+
]
|
105
|
+
signals[wavelength] = list(peaks)
|
99
106
|
break
|
100
107
|
|
101
|
-
return Ok(
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
108
|
+
return Ok(
|
109
|
+
AgilentReport(
|
110
|
+
signals=[
|
111
|
+
Signals(wavelength=int(w), peaks=s, data=None)
|
112
|
+
for w, s in signals.items()
|
113
|
+
],
|
114
|
+
vial_location=FiftyFourVialPlate.from_int(int(vial_location)),
|
115
|
+
solvents=solvents,
|
116
|
+
)
|
117
|
+
)
|
106
118
|
|
107
119
|
return Err("No report found")
|
108
120
|
|
@@ -111,34 +123,39 @@ class TXTProcessor(ReportProcessor):
|
|
111
123
|
"""
|
112
124
|
Regex matches for column and unit combinations, courtesy of Veronica Lai.
|
113
125
|
"""
|
126
|
+
|
114
127
|
_column_re_dictionary = {
|
115
|
-
|
116
|
-
|
128
|
+
"Peak": { # peak index
|
129
|
+
"#": "[ ]+(?P<Peak>[\d]+)", # number
|
117
130
|
},
|
118
|
-
|
119
|
-
|
131
|
+
"RetTime": { # retention time
|
132
|
+
"[min]": "(?P<RetTime>[\d]+.[\d]+)", # minutes
|
120
133
|
},
|
121
|
-
|
122
|
-
|
134
|
+
"Type": { # peak type
|
135
|
+
"": "(?P<Type>[A-Z]{1,3}(?: [A-Z]{1,2})*)", # todo this is different from <4.8.8 aghplc tools
|
123
136
|
},
|
124
|
-
|
125
|
-
|
137
|
+
"Width": { # peak width
|
138
|
+
"[min]": "(?P<Width>[\d]+.[\d]+[e+-]*[\d]+)",
|
126
139
|
},
|
127
|
-
|
128
|
-
|
129
|
-
|
140
|
+
"Area": { # peak area
|
141
|
+
"[mAU*s]": "(?P<Area>[\d]+.[\d]+[e+-]*[\d]+)", # area units
|
142
|
+
"%": "(?P<percent>[\d]+.[\d]+[e+-]*[\d]+)", # percent
|
130
143
|
},
|
131
|
-
|
132
|
-
|
144
|
+
"Height": { # peak height
|
145
|
+
"[mAU]": "(?P<Height>[\d]+.[\d]+[e+-]*[\d]+)",
|
133
146
|
},
|
134
|
-
|
135
|
-
|
147
|
+
"Name": {
|
148
|
+
"": "(?P<Name>[^\s]+(?:\s[^\s]+)*)", # peak name
|
136
149
|
},
|
137
150
|
}
|
138
151
|
|
139
|
-
def __init__(
|
140
|
-
|
141
|
-
|
152
|
+
def __init__(
|
153
|
+
self,
|
154
|
+
path: str,
|
155
|
+
min_ret_time: int = 0,
|
156
|
+
max_ret_time: int = 999,
|
157
|
+
target_wavelength_range: List[int] = range(200, 300),
|
158
|
+
):
|
142
159
|
"""
|
143
160
|
Class to process reports in CSV form.
|
144
161
|
|
@@ -155,16 +172,17 @@ class TXTProcessor(ReportProcessor):
|
|
155
172
|
def process_report(self) -> Result[AgilentReport, AnyStr]:
|
156
173
|
"""
|
157
174
|
Method to parse details from CSV report.
|
158
|
-
|
159
|
-
:returns: subset of complete report details, specifically the sample location, solvents in pumps,
|
160
|
-
and list of peaks at each wavelength channel.
|
161
|
-
|
162
175
|
If you want more functionality, use `aghplctools`.
|
163
176
|
`from aghplctools.ingestion.text import pull_hplc_area_from_txt`
|
164
177
|
`signals = pull_hplc_area_from_txt(file_path)`
|
178
|
+
|
179
|
+
:return: subset of complete report details, specifically the sample location, solvents in pumps,
|
180
|
+
and list of peaks at each wavelength channel.
|
165
181
|
"""
|
166
182
|
|
167
|
-
with open(
|
183
|
+
with open(
|
184
|
+
os.path.join(self.path, "REPORT.TXT"), "r", encoding="utf-16"
|
185
|
+
) as openfile:
|
168
186
|
text = openfile.read()
|
169
187
|
|
170
188
|
try:
|
@@ -172,25 +190,33 @@ class TXTProcessor(ReportProcessor):
|
|
172
190
|
except ValueError as e:
|
173
191
|
return Err("No peaks found: " + str(e))
|
174
192
|
|
175
|
-
signals = {
|
193
|
+
signals = {
|
194
|
+
key: signals[key] for key in self.target_wavelength_range if key in signals
|
195
|
+
}
|
176
196
|
|
177
197
|
parsed_signals = []
|
178
198
|
for wavelength, wavelength_dict in signals.items():
|
179
|
-
current_wavelength_signals = Signals(
|
199
|
+
current_wavelength_signals = Signals(
|
200
|
+
wavelength=int(wavelength), peaks=[], data=None
|
201
|
+
)
|
180
202
|
for ret_time, ret_time_dict in wavelength_dict.items():
|
181
203
|
if self.min_ret_time <= ret_time <= self.max_ret_time:
|
182
|
-
current_wavelength_signals.peaks.append(
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
204
|
+
current_wavelength_signals.peaks.append(
|
205
|
+
AgilentPeak(
|
206
|
+
retention_time=ret_time,
|
207
|
+
area=ret_time_dict["Area"],
|
208
|
+
width=ret_time_dict["Width"],
|
209
|
+
height=ret_time_dict["Height"],
|
210
|
+
peak_number=None,
|
211
|
+
peak_type=ret_time_dict["Type"],
|
212
|
+
area_percent=None,
|
213
|
+
)
|
214
|
+
)
|
189
215
|
parsed_signals.append(current_wavelength_signals)
|
190
216
|
|
191
|
-
return Ok(
|
192
|
-
|
193
|
-
|
217
|
+
return Ok(
|
218
|
+
AgilentReport(vial_location=None, solvents=None, signals=parsed_signals)
|
219
|
+
)
|
194
220
|
|
195
221
|
def parse_area_report(self, report_text: str) -> Dict:
|
196
222
|
"""
|
@@ -206,7 +232,7 @@ class TXTProcessor(ReportProcessor):
|
|
206
232
|
should be able to use the `parse_area_report` method of aghplctools v4.8.8
|
207
233
|
"""
|
208
234
|
if re.search(_no_peaks_re, report_text): # There are no peaks in Report.txt
|
209
|
-
raise ValueError(
|
235
|
+
raise ValueError("No peaks found in Report.txt")
|
210
236
|
blocks = _header_block_re.split(report_text)
|
211
237
|
signals = {} # output dictionary
|
212
238
|
for ind, block in enumerate(blocks):
|
@@ -219,23 +245,28 @@ class TXTProcessor(ReportProcessor):
|
|
219
245
|
si = _signal_info_re.match(table)
|
220
246
|
if si is not None:
|
221
247
|
# some error state (e.g. 'not found')
|
222
|
-
if si.group(
|
248
|
+
if si.group("error") != "":
|
223
249
|
continue
|
224
|
-
wavelength = float(si.group(
|
250
|
+
wavelength = float(si.group("wavelength"))
|
225
251
|
if wavelength in signals:
|
226
252
|
# placeholder error raise just in case (this probably won't happen)
|
227
253
|
raise KeyError(
|
228
|
-
f
|
254
|
+
f"The wavelength {float(si.group('wavelength'))} is already in the signals dictionary"
|
255
|
+
)
|
229
256
|
signals[wavelength] = {}
|
230
257
|
# build peak regex
|
231
258
|
peak_re = self.build_peak_regex(table)
|
232
|
-
if
|
259
|
+
if (
|
260
|
+
peak_re is None
|
261
|
+
): # if there are no columns (empty table), continue
|
233
262
|
continue
|
234
|
-
for line in table.split(
|
263
|
+
for line in table.split("\n"):
|
235
264
|
peak = peak_re.match(line)
|
236
265
|
if peak is not None:
|
237
|
-
signals[wavelength][float(peak.group(
|
238
|
-
current = signals[wavelength][
|
266
|
+
signals[wavelength][float(peak.group("RetTime"))] = {}
|
267
|
+
current = signals[wavelength][
|
268
|
+
float(peak.group("RetTime"))
|
269
|
+
]
|
239
270
|
for key in self._column_re_dictionary:
|
240
271
|
if key in peak.re.groupindex:
|
241
272
|
try: # try float conversion, otherwise continue
|
@@ -254,30 +285,35 @@ class TXTProcessor(ReportProcessor):
|
|
254
285
|
:param signal_table: block of lines associated with an area table
|
255
286
|
:return: peak line regex object (<=3.6 _sre.SRE_PATTERN, >=3.7 re.Pattern)
|
256
287
|
"""
|
257
|
-
split_table = signal_table.split(
|
288
|
+
split_table = signal_table.split("\n")
|
258
289
|
if len(split_table) <= 4: # catch peak table with no values
|
259
290
|
return None
|
260
291
|
# todo verify that these indicies are always true
|
261
292
|
column_line = split_table[2] # table column line
|
262
293
|
unit_line = split_table[3] # column unit line
|
263
|
-
length_line = [len(val) + 1 for val in split_table[4].split(
|
294
|
+
length_line = [len(val) + 1 for val in split_table[4].split("|")] # length line
|
264
295
|
|
265
296
|
# iterate over header values and units to build peak table regex
|
266
297
|
peak_re_string = []
|
267
298
|
for header, unit in zip(
|
268
|
-
|
269
|
-
chunk_string(unit_line, length_line)
|
299
|
+
chunk_string(column_line, length_line), chunk_string(unit_line, length_line)
|
270
300
|
):
|
271
|
-
if header ==
|
301
|
+
if header == "": # todo create a better catch for an undefined header
|
272
302
|
continue
|
273
303
|
try:
|
274
304
|
peak_re_string.append(
|
275
|
-
self._column_re_dictionary[header][
|
305
|
+
self._column_re_dictionary[header][
|
306
|
+
unit
|
307
|
+
] # append the appropriate regex
|
276
308
|
)
|
277
309
|
except KeyError: # catch for undefined regexes (need to be built)
|
278
|
-
raise KeyError(
|
279
|
-
|
310
|
+
raise KeyError(
|
311
|
+
f'The header/unit combination "{header}" "{unit}" is not defined in the peak regex '
|
312
|
+
f"dictionary. Let Lars know."
|
313
|
+
)
|
280
314
|
return re.compile(
|
281
|
-
|
282
|
-
|
315
|
+
"[ ]+".join(
|
316
|
+
peak_re_string
|
317
|
+
) # constructed string delimited by 1 or more spaces
|
318
|
+
+ "[\s]*" # and any remaining white space
|
283
319
|
)
|