Metadata-Version: 2.1
Name: parseet
Version: 0.2.0
Summary: This package is used to parse ms samplesheet for further analyses.
Keywords: samplesheet,parser,data analyses,mass spectrometry,msdial
Author-Email: Matteo Miotto <miotsdata@gmail.com>
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: <3.13,>=3.12
Requires-Dist: pandas>=2.3.3
Requires-Dist: openpyxl>=3.1.5
Provides-Extra: gui
Requires-Dist: pyside6>=6.11.1; extra == "gui"
Description-Content-Type: text/markdown

# BULK METABOLOMICS SAMPLESHEET

This folder contains the files necessary for the samplesheet of LC-MS and spatial metabolomics.
Samplesheet template (LC-MS_metabolomics_samplesheet.xlsx or spatial_metabolomics_samplesheet.xlsx) should be given to clients to be compiled. Once received back, it should be tested with the parser (LC-MS_parse_samplesheet.py or spatial_parse_samplesheet.py).

## Samplesheet template
Samplesheet templates contains 3 sheets:

- input: the one the user should fill. It contains two sections, one with user info and the other with samples metadata.
- example_ok: an example of a good samplesheet
- example_fail: an example of a problematic samplesheet

## Parser
The parser will check the samplesheet for its correct compilation and raises warnings and/or errors if any.
If no errors are found, the samples metadata section is saved as a csv file (specified as -o). Warnings also prevent file to be saved, but this can be overruled by --ignore-warnings.

## Test
In test folder, 3 test samplesheet for each technology are found:

- test_error.xlsx: a test samplesheet with errrors
- test_ok.xlsx: a test samplesheet correctly compiled
- test_warning.xlsx: a test samplesheet with warnings

Several test should be run after changind any file:

- `python LC-MS_parse_samplesheet.py` (this should result in an error for missing input and output) 
- `python LC-MS_parse_samplesheet.py -i test_files/LC-MS_test_ok.xlsx -o test.csv --dry-run` (this should be ok, with no errors nor warnings, but no file should be saved due to --dry-run)
- `python LC-MS_parse_samplesheet.py -i test_files/LC-MS_test_ok.xlsx -o test.csv` (this should be ok, with also test.csv file saved)
- `python LC-MS_parse_samplesheet.py -i test_files/LC-MS_test_error.xlsx -o test.csv` (this should raise errors and no test.csv file should be created)
- `python LC-MS_parse_samplesheet.py -i test_files/LC-MS_test_warning.xlsx -o test.csv` (this should raise warnings and no test.csv file should be created)
- `python LC-MS_parse_samplesheet.py` (this should result in an error for missing input and output) 
- `python spatial_parse_samplesheet.py -i test_files/spatial_test_ok.xlsx -o test.csv --dry-run` (this should be ok, with no errors nor warnings, but no file should be saved due to --dry-run)
- `python LC-MS_parse_samplesheet.py -i test_files/LC-MS_test_ok_timecourse.xlsx -o test.csv` (this should be ok, with also test.csv file saved)
- `python spatial_parse_samplesheet.py -i test_files/spatial_test_ok.xlsx -o test.csv` (this should be ok, with also test.csv file saved)
- `python spatial_parse_samplesheet.py -i test_files/spatial_test_error.xlsx -o test.csv` (this should raise errors and no test.csv file should be created)
- `python spatial_parse_samplesheet.py -i test_files/spatial_test_warning.xlsx -o test.csv` (this should raise warnings and no test.csv file should be created)
- `python spatial_parse_samplesheet.py -i test_files/spatial_test_warning.xlsx -o test.csv` --ignore-warnings (this should raise warnings, but test.csv file should be created)
- `python spatial_parse_samplesheet.py -i test_files/spatial_test_warning.xlsx -o test.csv` --ignore-warnings (this should raise warnings, but test.csv file should be created)

