masster 0.5.26__py3-none-any.whl → 0.5.28__py3-none-any.whl
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.
- {masster-0.5.26.dist-info → masster-0.5.28.dist-info}/METADATA +102 -60
- {masster-0.5.26.dist-info → masster-0.5.28.dist-info}/RECORD +5 -5
- {masster-0.5.26.dist-info → masster-0.5.28.dist-info}/WHEEL +0 -0
- {masster-0.5.26.dist-info → masster-0.5.28.dist-info}/entry_points.txt +0 -0
- {masster-0.5.26.dist-info → masster-0.5.28.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: masster
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.28
|
|
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
|
|
7
7
|
Project-URL: documentation, https://github.com/zamboni-lab/masster#readme
|
|
8
|
+
Project-URL: Third-Party Licenses, https://github.com/zamboni-lab/masster/blob/main/THIRD_PARTY_NOTICES.md
|
|
8
9
|
Author: Zamboni Lab
|
|
9
10
|
License: GNU AFFERO GENERAL PUBLIC LICENSE
|
|
10
11
|
Version 3, 19 November 2007
|
|
@@ -725,17 +726,39 @@ Requires-Dist: pytest-mock>=3.10.0; extra == 'test'
|
|
|
725
726
|
Requires-Dist: pytest>=7.0.0; extra == 'test'
|
|
726
727
|
Description-Content-Type: text/markdown
|
|
727
728
|
|
|
728
|
-
#
|
|
729
|
+
# masster
|
|
729
730
|
[](https://badge.fury.io/py/masster)
|
|
730
731
|
[](https://badge.fury.io/py/masster)
|
|
731
732
|
|
|
732
|
-
**MASSter** is a Python package for the analysis of
|
|
733
|
+
**MASSter** is a Python package for the analysis of metabolomics experiments by LC-MS/MS data, with a main focus on the challenging tasks of untargeted and large-scale studies.
|
|
733
734
|
|
|
734
|
-
|
|
735
|
+
## Background and motivation
|
|
736
|
+
|
|
737
|
+
MASSter is actively used, maintainted, and developed by the Zamboni Lab at ETH Zurich. The project started because many needs of were unmatched by the "usual" software packages (mzmine, msdial, W4M, ...), e.g. performance, scalability, sensitivity, robustness, speed, rapid implementation of new features, embedding in ETL systems, and so on.
|
|
738
|
+
|
|
739
|
+
All methods include a long list of parameters, and might wrap alternative algorithms. These are only relevant for advanced users. We recommend running the processing methods with defaults, or using the Wizard.
|
|
740
|
+
|
|
741
|
+
## Content
|
|
742
|
+
|
|
743
|
+
MASSter is designed to deal with DDA data, and hides functionalities for DIA and ZTScan DIA data. The sample-centric feature detection uses OpenMS, which is both accurate and fast, and it was wrapped with additional code to improve isotope and adduct detection. All other functionalities are own implementations: centroiding, RT alignment, adduct and isotopomer detection, merging of multiple samples, gap-filling, quantification, etc.
|
|
744
|
+
|
|
745
|
+
MASSter was engineered to maximize quality of results, sensitivity, scalability, and also speed. Yes, it's Python which is notoriously slower than other languages, but considerable time was spent in speeding up everything, including the systematic use of [polars](https://pola.rs/), numpy vectorization, multiprocessing, chunking, etc. MASSter was tested with studies with 3000+ LC-MS/MS samples (1 Mio MS2 spectra), and it autonomously completed analysis within a few hours.
|
|
746
|
+
|
|
747
|
+
## Architecture
|
|
748
|
+
|
|
749
|
+
MASSter defines own classes for Spectra, Chromatograms, Libraries, Samples, and Studies (= bunch of samples, i.e. a LC-MS sequence). Users will deal mostly with one Study() object at the time. Sample() objects are created when analyzing a batch - and saved for caching -, or will be used only for development, troubleshooting, or to generate illustrations.
|
|
750
|
+
|
|
751
|
+
The analysis can be done in scripts (without user intervention, e.g. by the integrated Wizard), or interactively in notebooks, i.e. [marimo](https://marimo.io/) or [jupyter](https://jupyter.org/).
|
|
735
752
|
|
|
736
753
|
## Prerequisites
|
|
737
754
|
|
|
738
|
-
|
|
755
|
+
You'll need to install Python (3.10-3.13, 3.14 has not been tested yet).
|
|
756
|
+
|
|
757
|
+
MASSter reads raw (Thermo), wiff (SCIEX), or mzML data. Reading vendor formats relies on .NET libraries, and is only possible in Windows. On Linux or MacOS, you'll be forced to use mzML data.
|
|
758
|
+
|
|
759
|
+
**It's recommended to use data in either vendor's raw format (wiff and raw) or mzML in profile data.** MASSter includes a sophisticated and sufficiently fast centroiding algorithm that works well across the full dynamic range and will only act on the spectra that are relevant. In our tests with data from different vendors, the centroiding performed much better than most Vendor's implementations (that are primarily proteomics-centric).
|
|
760
|
+
|
|
761
|
+
If still want to convert raw data to centroided mzML, please use (CentroidR)[https://github.com/Adafede/CentroidR/tree/0.0.0.9001].
|
|
739
762
|
|
|
740
763
|
## Installation
|
|
741
764
|
|
|
@@ -743,48 +766,33 @@ This is a poorly documented, stable branch of the development codebase in use in
|
|
|
743
766
|
pip install masster
|
|
744
767
|
```
|
|
745
768
|
|
|
746
|
-
##
|
|
747
|
-
|
|
769
|
+
## Getting started
|
|
770
|
+
**The quickest way to use, or learn how to use MASSter, is to use the Wizard** which we integrated and, ideally, takes care of everything automatically.
|
|
748
771
|
|
|
772
|
+
The Wizard only needs to know where to find the MS files and were the store the results.
|
|
749
773
|
```python
|
|
750
|
-
import
|
|
751
|
-
wiz =
|
|
752
|
-
source=r'..\..\folder_with_raw_data',
|
|
753
|
-
folder=r'..\..folder_to_store_results'
|
|
774
|
+
from masster import Wizard
|
|
775
|
+
wiz = Wizard(
|
|
776
|
+
source=r'..\..\folder_with_raw_data', # where to find the data
|
|
777
|
+
folder=r'..\..folder_to_store_results', # where to save the results
|
|
778
|
+
ncores=10 # this is optional
|
|
754
779
|
)
|
|
755
|
-
wiz.
|
|
780
|
+
wiz.test_and_run()
|
|
756
781
|
```
|
|
757
782
|
|
|
758
|
-
This will
|
|
783
|
+
This will trigger the analysis of raw data, and the creation of a script to process all samples and then assemble the study. The whole processing will be stored as `1_masster_workflow.py` in the output folder. The wizard will test once and, if successull, run the full workflow using parallel processes. Once the processing is over you, navigate to `folder` to see what happened...
|
|
759
784
|
|
|
760
|
-
|
|
761
|
-
```python
|
|
762
|
-
import masster
|
|
763
|
-
sample = masster.Sample(filename='...') # full path to a *.raw, *.wiff, or *.mzML file
|
|
764
|
-
# process
|
|
765
|
-
sample.find_features(chrom_fwhm=0.5, noise=50) # for orbitrap data, set noise to 1e5
|
|
766
|
-
sample.find_adducts()
|
|
767
|
-
sample.find_ms2()
|
|
768
|
-
|
|
769
|
-
# access data
|
|
770
|
-
sample.features_df
|
|
771
|
-
|
|
772
|
-
# save results
|
|
773
|
-
sample.save() # stores to *.sample5, our custom hdf5 format
|
|
774
|
-
sample.export_mgf()
|
|
785
|
+
If you want to interact with your data, we recommend using [marimo](https://marimo.io/) or [jupyter](https://jupyter.org/) and open the `*.study5` file, for example:
|
|
775
786
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
# explore methods
|
|
783
|
-
dir(study)
|
|
787
|
+
```bash
|
|
788
|
+
# use marimo to open the script created by marino
|
|
789
|
+
marimo edit '..\..folder_to_store_results\2_interactive_analysis.py'
|
|
790
|
+
# or, if you use uv to manage an environment with masster
|
|
791
|
+
uv run marimo edit '..\..folder_to_store_results\2_interactive_analysis.py'
|
|
784
792
|
```
|
|
785
793
|
|
|
786
|
-
### Basic Workflow for analyzing LC-MS study with
|
|
787
|
-
|
|
794
|
+
### Basic Workflow for analyzing LC-MS study with 1-1000+ samples
|
|
795
|
+
In MASSter, the main object for data analysis is a `Study`, which consists of a bunch of `Samples`.
|
|
788
796
|
```python
|
|
789
797
|
import masster
|
|
790
798
|
# Initialize the Study object with the default folder
|
|
@@ -796,17 +804,20 @@ study.add(r'D:\...\...\...\*.wiff')
|
|
|
796
804
|
# Perform retention time correction
|
|
797
805
|
study.align(rt_tol=2.0)
|
|
798
806
|
study.plot_alignment()
|
|
799
|
-
study.plot_bpc()
|
|
800
807
|
study.plot_rt_correction()
|
|
808
|
+
study.plot_bpc()
|
|
801
809
|
|
|
802
810
|
# Find consensus features
|
|
803
|
-
study.merge(min_samples=3)
|
|
811
|
+
study.merge(min_samples=3) # this will keep only the features that were found in 3 or more samples
|
|
804
812
|
study.plot_consensus_2d()
|
|
805
813
|
|
|
806
|
-
#
|
|
814
|
+
# retrieve information
|
|
815
|
+
study.info()
|
|
816
|
+
|
|
817
|
+
# Retrieve EICs for quantification
|
|
807
818
|
study.fill()
|
|
808
819
|
|
|
809
|
-
# Integrate according to consensus metadata
|
|
820
|
+
# Integrate EICs according to consensus metadata
|
|
810
821
|
study.integrate()
|
|
811
822
|
|
|
812
823
|
# export results
|
|
@@ -822,32 +833,63 @@ study.save()
|
|
|
822
833
|
study.plot_samples_pca()
|
|
823
834
|
study.plot_samples_umap()
|
|
824
835
|
study.plot_samples_2d()
|
|
825
|
-
```
|
|
826
836
|
|
|
827
|
-
|
|
828
|
-
|
|
837
|
+
# To know more about the available methods...
|
|
838
|
+
dir(study)
|
|
839
|
+
```
|
|
840
|
+
The information is stored in Polars data frame, in particular:
|
|
841
|
+
```python
|
|
842
|
+
# information on samples
|
|
843
|
+
study.samples_df
|
|
844
|
+
# information on consensus features
|
|
845
|
+
study.consensus_df
|
|
846
|
+
# information on original features from ALL samples, including MS2 and EICs
|
|
847
|
+
study.features_df
|
|
848
|
+
```
|
|
829
849
|
|
|
850
|
+
### Analysis of a single sample
|
|
851
|
+
For troubleshooting, exploration, or just to create a figure on a single file, you might want to open and process a single file:
|
|
830
852
|
```python
|
|
831
|
-
from masster import
|
|
853
|
+
from masster import Sample
|
|
854
|
+
sample = Sample(filename='...') # full path to a *.raw, *.wiff, *.mzML, or *.sample5 file
|
|
855
|
+
# peek into sample
|
|
856
|
+
sample.info()
|
|
832
857
|
|
|
833
|
-
#
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
858
|
+
# process
|
|
859
|
+
sample.find_features(chrom_fwhm=0.5, noise=50) # for orbitrap data, set noise to 1e5
|
|
860
|
+
sample.find_adducts()
|
|
861
|
+
sample.find_ms2()
|
|
837
862
|
|
|
838
|
-
#
|
|
839
|
-
|
|
863
|
+
# access data
|
|
864
|
+
sample.features_df
|
|
840
865
|
|
|
841
|
-
#
|
|
842
|
-
|
|
843
|
-
|
|
866
|
+
# save results
|
|
867
|
+
sample.save() # stores to *.sample5, our custom hdf5 format
|
|
868
|
+
sample.export_mgf()
|
|
844
869
|
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
870
|
+
# some plots
|
|
871
|
+
sample.plot_bpc()
|
|
872
|
+
sample.plot_tic()
|
|
873
|
+
sample.plot_2d()
|
|
874
|
+
sample.plot_features_stats()
|
|
875
|
+
|
|
876
|
+
# explore methods
|
|
877
|
+
dir(study)
|
|
849
878
|
```
|
|
850
879
|
|
|
880
|
+
## Disclaimer
|
|
881
|
+
|
|
882
|
+
**MASSter is research software under active development.** While we use it extensively in our lab and strive for quality and reliability, please be aware:
|
|
883
|
+
|
|
884
|
+
- **No warranties**: The software is provided "as is" without any warranty of any kind, express or implied
|
|
885
|
+
- **Backward compatibility**: We do not guarantee backward compatibility between versions. Breaking changes may occur as we improve the software
|
|
886
|
+
- **Performance**: While optimized for our workflows, performance may vary depending on your data and system configuration
|
|
887
|
+
- **Results**: We do our best to ensure accuracy, but you should validate results independently for your research
|
|
888
|
+
- **Support**: This is an academic project with limited resources. Community support is available through GitHub issues, but we cannot guarantee response times
|
|
889
|
+
- **Production use**: If you plan to use MASSter in production or critical workflows, thorough testing with your data is recommended
|
|
890
|
+
|
|
891
|
+
We welcome feedback, bug reports, and contributions via GitHub!
|
|
892
|
+
|
|
851
893
|
## License
|
|
852
894
|
GNU Affero General Public License v3
|
|
853
895
|
|
|
@@ -857,4 +899,4 @@ See the [LICENSE](LICENSE) file for details.
|
|
|
857
899
|
This project uses several third-party libraries, including pyOpenMS which is licensed under the BSD 3-Clause License. For complete information about third-party dependencies and their licenses, see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
858
900
|
|
|
859
901
|
## Citation
|
|
860
|
-
If you use
|
|
902
|
+
If you use MASSter in your research, please cite this repository.
|
|
@@ -61,8 +61,8 @@ masster/study/defaults/merge_def.py,sha256=99TJtIk7mSoq8NMJMJ4b-cy7gUUixQN69krxt
|
|
|
61
61
|
masster/study/defaults/study_def.py,sha256=xXOAcb8hez0woWwA1_T3fcokjiLJkq3hwA3OS6elb6I,15965
|
|
62
62
|
masster/wizard/__init__.py,sha256=L9G_datyGSFJjrBVklEVpZVLGXzUhDiWobtiygBH8vQ,669
|
|
63
63
|
masster/wizard/wizard.py,sha256=11utDrZSt7R8D16Sl-NbRKHcgzhQEu8gW_q2V02-Qi0,66483
|
|
64
|
-
masster-0.5.
|
|
65
|
-
masster-0.5.
|
|
66
|
-
masster-0.5.
|
|
67
|
-
masster-0.5.
|
|
68
|
-
masster-0.5.
|
|
64
|
+
masster-0.5.28.dist-info/METADATA,sha256=KbBVi4lzwtoxbw1ljv1FlxwyN3_YTs1VJcU9hvoD-_k,50869
|
|
65
|
+
masster-0.5.28.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
66
|
+
masster-0.5.28.dist-info/entry_points.txt,sha256=ZHguQ_vPmdbpqq2uGtmEOLJfgP-DQ1T0c07Lxh30wc8,58
|
|
67
|
+
masster-0.5.28.dist-info/licenses/LICENSE,sha256=bx5iLIKjgAdYQ7sISn7DsfHRKkoCUm1154sJJKhgqnU,35184
|
|
68
|
+
masster-0.5.28.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|