masster 0.2.1__tar.gz → 0.2.3__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.

Potentially problematic release.


This version of masster might be problematic. Click here for more details.

Files changed (72) hide show
  1. {masster-0.2.1 → masster-0.2.3}/PKG-INFO +8 -151
  2. masster-0.2.3/README.md +58 -0
  3. {masster-0.2.1 → masster-0.2.3}/pyproject.toml +1 -1
  4. {masster-0.2.1 → masster-0.2.3}/src/masster/_version.py +1 -1
  5. {masster-0.2.1 → masster-0.2.3}/src/masster/study/h5.py +317 -137
  6. {masster-0.2.1 → masster-0.2.3}/src/masster/study/load.py +23 -134
  7. {masster-0.2.1 → masster-0.2.3}/src/masster/study/save.py +0 -6
  8. {masster-0.2.1 → masster-0.2.3}/src/masster/study/study.py +26 -3
  9. {masster-0.2.1 → masster-0.2.3}/uv.lock +1 -1
  10. masster-0.2.1/README.md +0 -201
  11. {masster-0.2.1 → masster-0.2.3}/.github/workflows/publish.yml +0 -0
  12. {masster-0.2.1 → masster-0.2.3}/.github/workflows/security.yml +0 -0
  13. {masster-0.2.1 → masster-0.2.3}/.github/workflows/test.yml +0 -0
  14. {masster-0.2.1 → masster-0.2.3}/.gitignore +0 -0
  15. {masster-0.2.1 → masster-0.2.3}/.pre-commit-config.yaml +0 -0
  16. {masster-0.2.1 → masster-0.2.3}/LICENSE +0 -0
  17. {masster-0.2.1 → masster-0.2.3}/Makefile +0 -0
  18. {masster-0.2.1 → masster-0.2.3}/TESTING.md +0 -0
  19. {masster-0.2.1 → masster-0.2.3}/demo/example_batch_process.py +0 -0
  20. {masster-0.2.1 → masster-0.2.3}/demo/example_sample_process.py +0 -0
  21. {masster-0.2.1 → masster-0.2.3}/src/masster/__init__.py +0 -0
  22. {masster-0.2.1 → masster-0.2.3}/src/masster/chromatogram.py +0 -0
  23. {masster-0.2.1 → masster-0.2.3}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.mzML +0 -0
  24. {masster-0.2.1 → masster-0.2.3}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.timeseries.data +0 -0
  25. {masster-0.2.1 → masster-0.2.3}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff +0 -0
  26. {masster-0.2.1 → masster-0.2.3}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff.scan +0 -0
  27. {masster-0.2.1 → masster-0.2.3}/src/masster/data/examples/2025_01_14_VW_7600_LpMx_DBS_CID_2min_TOP15_030msecMS1_005msecReac_CE35_DBS-ON_3.wiff2 +0 -0
  28. {masster-0.2.1 → masster-0.2.3}/src/masster/logger.py +0 -0
  29. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/__init__.py +0 -0
  30. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/defaults/__init__.py +0 -0
  31. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/defaults/find_adducts_def.py +0 -0
  32. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/defaults/find_features_def.py +0 -0
  33. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/defaults/find_ms2_def.py +0 -0
  34. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/defaults/get_spectrum_def.py +0 -0
  35. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/defaults/sample_def.py +0 -0
  36. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/h5.py +0 -0
  37. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/helpers.py +0 -0
  38. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/load.py +0 -0
  39. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/parameters.py +0 -0
  40. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/plot.py +0 -0
  41. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/processing.py +0 -0
  42. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/sample.py +0 -0
  43. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/sample5_schema.json +0 -0
  44. {masster-0.2.1 → masster-0.2.3}/src/masster/sample/save.py +0 -0
  45. {masster-0.2.1 → masster-0.2.3}/src/masster/spectrum.py +0 -0
  46. {masster-0.2.1 → masster-0.2.3}/src/masster/study/__init__.py +0 -0
  47. {masster-0.2.1 → masster-0.2.3}/src/masster/study/defaults/__init__.py +0 -0
  48. {masster-0.2.1 → masster-0.2.3}/src/masster/study/defaults/align_def.py +0 -0
  49. {masster-0.2.1 → masster-0.2.3}/src/masster/study/defaults/export_def.py +0 -0
  50. {masster-0.2.1 → masster-0.2.3}/src/masster/study/defaults/fill_chrom_def.py +0 -0
  51. {masster-0.2.1 → masster-0.2.3}/src/masster/study/defaults/find_consensus_def.py +0 -0
  52. {masster-0.2.1 → masster-0.2.3}/src/masster/study/defaults/find_ms2_def.py +0 -0
  53. {masster-0.2.1 → masster-0.2.3}/src/masster/study/defaults/integrate_chrom_def.py +0 -0
  54. {masster-0.2.1 → masster-0.2.3}/src/masster/study/defaults/study_def.py +0 -0
  55. {masster-0.2.1 → masster-0.2.3}/src/masster/study/export.py +0 -0
  56. {masster-0.2.1 → masster-0.2.3}/src/masster/study/helpers.py +0 -0
  57. {masster-0.2.1 → masster-0.2.3}/src/masster/study/parameters.py +0 -0
  58. {masster-0.2.1 → masster-0.2.3}/src/masster/study/plot.py +0 -0
  59. {masster-0.2.1 → masster-0.2.3}/src/masster/study/processing.py +0 -0
  60. {masster-0.2.1 → masster-0.2.3}/src/masster/study/study5_schema.json +0 -0
  61. {masster-0.2.1 → masster-0.2.3}/tests/conftest.py +0 -0
  62. {masster-0.2.1 → masster-0.2.3}/tests/test_chromatogram.py +0 -0
  63. {masster-0.2.1 → masster-0.2.3}/tests/test_defaults.py +0 -0
  64. {masster-0.2.1 → masster-0.2.3}/tests/test_imports.py +0 -0
  65. {masster-0.2.1 → masster-0.2.3}/tests/test_integration.py +0 -0
  66. {masster-0.2.1 → masster-0.2.3}/tests/test_logger.py +0 -0
  67. {masster-0.2.1 → masster-0.2.3}/tests/test_parameters.py +0 -0
  68. {masster-0.2.1 → masster-0.2.3}/tests/test_sample.py +0 -0
  69. {masster-0.2.1 → masster-0.2.3}/tests/test_spectrum.py +0 -0
  70. {masster-0.2.1 → masster-0.2.3}/tests/test_study.py +0 -0
  71. {masster-0.2.1 → masster-0.2.3}/tests/test_version.py +0 -0
  72. {masster-0.2.1 → masster-0.2.3}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: masster
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Mass spectrometry data analysis package
5
5
  Project-URL: homepage, https://github.com/zamboni-lab/masster
6
6
  Project-URL: repository, https://github.com/zamboni-lab/masster
@@ -730,18 +730,11 @@ Description-Content-Type: text/markdown
730
730
 
731
731
  # MASSter
732
732
 
733
- **MASSter** is a comprehensive Python package for mass spectrometry data analysis, designed for metabolomics and LC-MS data processing. It provides tools for feature detection, alignment, consensus building, and interactive visualization of mass spectrometry datasets.
733
+ **MASSter** is a comprehensive Python package for mass spectrometry data analysis, designed for metabolomics and LC-MS data processing. It provides tools for feature detection, alignment, consensus building, and interactive visualization of mass spectrometry datasets. It is designed to deal with DDA, and hides functionalities for DIA and ZTScan DIA data.
734
734
 
735
735
  Most core processing functions are derived from OpenMS. We use the same nomenclature and refer to their documentation for an explanation of the parameters. To a large extent, however, you should be able to use the defaults (=no parameters) when calling processing steps.
736
736
 
737
- ## Features
738
-
739
- - **Mass spectrometry data processing**: Support for multiple file formats (.wiff, .mzML, .raw, .mzpkl)
740
- - **Feature detection and alignment**: Automated chromatographic peak detection and retention time alignment
741
- - **Consensus feature building**: Identification of features across multiple samples
742
- - **Interactive visualizations**: 2D plots, chromatograms, and statistical dashboards
743
- - **Batch processing**: Process entire studies with multiple samples
744
- - **Export capabilities**: MGF export for spectral library searches
737
+ This is a poorly documented, stable branch of the development codebase in use in the Zamboni lab. Novel functionalities will be added based on need and requests.
745
738
 
746
739
  ## Installation
747
740
 
@@ -749,9 +742,7 @@ Most core processing functions are derived from OpenMS. We use the same nomencla
749
742
  pip install masster
750
743
  ```
751
744
 
752
- ## Quick Start
753
-
754
- ### Basic Workflow
745
+ ### Basic Workflow for analyzing LC-MS study with 2-... samples
755
746
 
756
747
  ```python
757
748
  import masster
@@ -769,146 +760,19 @@ study.align(rt_max_diff=2.0)
769
760
  study.find_consensus(min_samples=3)
770
761
 
771
762
  # Retrieve missing data for quantification
772
- study.fill_chrom_parallel()
763
+ study.fill_chrom(abs_)
773
764
 
774
765
  # Integrate according to consensus metadata
775
766
  study.integrate_chrom()
776
767
 
777
- # link MS2 across the whole study
768
+ # link MS2 across the whole study and export them
778
769
  study.find_ms2()
779
-
780
- # Export MGF file
781
770
  study.export_mgf()
782
771
 
783
- # Save the study
772
+ # Save the study to .study5
784
773
  study.save()
785
774
  ```
786
775
 
787
- ### Single Sample Processing
788
-
789
- ```python
790
- from masster.sample import Sample
791
-
792
- # Load a single sample (mzML, RAW, WIFF)
793
- sample = Sample("path/to/your/file.mzML")
794
-
795
- # Detect features
796
- sample.find_features(chrom_peak_snr=10, noise=500, chrom_fwhm=1.0)
797
-
798
- # Detect adducts
799
- sample.find_adducts()
800
-
801
- # Find MS2 spectra
802
- sample.find_ms2()
803
-
804
- # Save results
805
- sample.save()
806
- ```
807
-
808
- ## Visualization Examples
809
-
810
- Masster provides extensive plotting capabilities for data exploration and quality control:
811
-
812
- ### 2D Data Visualization
813
-
814
- ```python
815
- # Plot 2D overview of MS data with detected features
816
- sample.plot_2d(
817
- filename="overview_2d.html",
818
- show_features=True,
819
- show_ms2=True,
820
- title="MS Data Overview"
821
- )
822
-
823
- # Plot with feature filtering
824
- sample.plot_2d(
825
- filename="features_ms2_only.html",
826
- show_only_features_with_ms2=True,
827
- markersize=8
828
- )
829
- ```
830
-
831
- ### Study-Level Plots
832
-
833
- ```python
834
- # Plot features from multiple samples
835
- study.plot_samples_2d(
836
- samples=None, # Use all samples
837
- filename="multi_sample_overview.html",
838
- markersize=3,
839
- alpha_max=0.8
840
- )
841
-
842
- # Plot consensus features
843
- study.plot_consensus_2d(
844
- filename="consensus_features.html",
845
- colorby="number_samples",
846
- sizeby="inty_mean"
847
- )
848
-
849
- # Plot chromatograms for specific features
850
- study.plot_chrom(
851
- uids=[1, 2, 3], # Feature UIDs
852
- filename="chromatograms.html",
853
- aligned=True
854
- )
855
- ```
856
-
857
- ### Quality Control Plots
858
-
859
- ```python
860
- # Plot DDA acquisition statistics
861
- sample.plot_dda_stats(filename="dda_stats.html")
862
-
863
- # Plot feature statistics
864
- sample.plot_feature_stats(filename="feature_stats.html")
865
-
866
- # Plot total ion chromatogram
867
- sample.plot_tic(filename="tic.html")
868
- ```
869
-
870
- ### Advanced Plotting Options
871
-
872
- ```python
873
- # Plot with Oracle annotation data
874
- sample.plot_2d_oracle(
875
- oracle_folder="path/to/oracle/results",
876
- colorby="hg", # Color by chemical class
877
- filename="annotated_features.html"
878
- )
879
-
880
- # Plot MS2 cycle view
881
- sample.plot_ms2_cycle(
882
- cycle=100,
883
- filename="ms2_cycle.html",
884
- centroid=True
885
- )
886
-
887
- # Plot extracted ion chromatogram
888
- sample.plot_eic(
889
- feature_uid=123,
890
- rt_tol=10,
891
- mz_tol=0.005,
892
- filename="eic.html"
893
- )
894
- ```
895
-
896
- ## File Format Support
897
-
898
- - **Input formats**: .wiff, .mzML, .raw files
899
- - **Intermediate formats**: .sample5 and .study5 (HDF5) for fast loading
900
- - **Export formats**: .mgf, .csv
901
- - **Visualization**: .html (interactive), .png, .svg
902
-
903
- ## Advanced Features
904
-
905
- ### Batch Processing
906
- Use the command-line interface for processing multiple files:
907
-
908
- ```bash
909
- python -m masster.demo.example_batch_process input_directory --recursive --dest output_directory
910
- ```
911
-
912
776
  ## Requirements
913
777
 
914
778
  - Python ≥ 3.11
@@ -919,13 +783,6 @@ python -m masster.demo.example_batch_process input_directory --recursive --dest
919
783
 
920
784
  GNU Affero General Public License v3
921
785
 
922
- ## Contributing
923
-
924
- Contributions are welcome! Please see our contributing guidelines and code of conduct.
925
-
926
786
  ## Citation
927
787
 
928
- If you use Masster in your research, please cite:
929
- ```
930
- [Citation details to be added]
931
- ```
788
+ If you use Masster in your research, please cite this repository.
@@ -0,0 +1,58 @@
1
+ # MASSter
2
+
3
+ **MASSter** is a comprehensive Python package for mass spectrometry data analysis, designed for metabolomics and LC-MS data processing. It provides tools for feature detection, alignment, consensus building, and interactive visualization of mass spectrometry datasets. It is designed to deal with DDA, and hides functionalities for DIA and ZTScan DIA data.
4
+
5
+ Most core processing functions are derived from OpenMS. We use the same nomenclature and refer to their documentation for an explanation of the parameters. To a large extent, however, you should be able to use the defaults (=no parameters) when calling processing steps.
6
+
7
+ This is a poorly documented, stable branch of the development codebase in use in the Zamboni lab. Novel functionalities will be added based on need and requests.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install masster
13
+ ```
14
+
15
+ ### Basic Workflow for analyzing LC-MS study with 2-... samples
16
+
17
+ ```python
18
+ import masster
19
+
20
+ # Initialize the Study object with the default folder
21
+ study = masster.Study(default_folder=r'D:\...\mylcms')
22
+
23
+ # Load data from folder with raw data, here: WIFF
24
+ study.add_folder(r'D:\...\...\...\*.wiff')
25
+
26
+ # Align maps
27
+ study.align(rt_max_diff=2.0)
28
+
29
+ # Find consensus features
30
+ study.find_consensus(min_samples=3)
31
+
32
+ # Retrieve missing data for quantification
33
+ study.fill_chrom(abs_)
34
+
35
+ # Integrate according to consensus metadata
36
+ study.integrate_chrom()
37
+
38
+ # link MS2 across the whole study and export them
39
+ study.find_ms2()
40
+ study.export_mgf()
41
+
42
+ # Save the study to .study5
43
+ study.save()
44
+ ```
45
+
46
+ ## Requirements
47
+
48
+ - Python ≥ 3.11
49
+ - Key dependencies: pandas, polars, numpy, scipy, matplotlib, bokeh, holoviews, panel
50
+ - See `pyproject.toml` for complete dependency list
51
+
52
+ ## License
53
+
54
+ GNU Affero General Public License v3
55
+
56
+ ## Citation
57
+
58
+ If you use Masster in your research, please cite this repository.
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "masster"
4
- version = "0.2.1"
4
+ version = "0.2.3"
5
5
  description = "Mass spectrometry data analysis package"
6
6
  authors = [
7
7
  { name = "Zamboni Lab" }
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
 
4
- __version__ = "0.2.1"
4
+ __version__ = "0.2.3"
5
5
 
6
6
 
7
7
  def get_version():