masster 0.5.27__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.27.dist-info → masster-0.5.28.dist-info}/METADATA +101 -60
- {masster-0.5.27.dist-info → masster-0.5.28.dist-info}/RECORD +5 -5
- {masster-0.5.27.dist-info → masster-0.5.28.dist-info}/WHEEL +0 -0
- {masster-0.5.27.dist-info → masster-0.5.28.dist-info}/entry_points.txt +0 -0
- {masster-0.5.27.dist-info → masster-0.5.28.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
@@ -726,17 +726,39 @@ Requires-Dist: pytest-mock>=3.10.0; extra == 'test'
|
|
|
726
726
|
Requires-Dist: pytest>=7.0.0; extra == 'test'
|
|
727
727
|
Description-Content-Type: text/markdown
|
|
728
728
|
|
|
729
|
-
#
|
|
729
|
+
# masster
|
|
730
730
|
[](https://badge.fury.io/py/masster)
|
|
731
731
|
[](https://badge.fury.io/py/masster)
|
|
732
732
|
|
|
733
|
-
**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.
|
|
734
734
|
|
|
735
|
-
|
|
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/).
|
|
736
752
|
|
|
737
753
|
## Prerequisites
|
|
738
754
|
|
|
739
|
-
|
|
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].
|
|
740
762
|
|
|
741
763
|
## Installation
|
|
742
764
|
|
|
@@ -744,48 +766,33 @@ This is a poorly documented, stable branch of the development codebase in use in
|
|
|
744
766
|
pip install masster
|
|
745
767
|
```
|
|
746
768
|
|
|
747
|
-
##
|
|
748
|
-
|
|
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.
|
|
749
771
|
|
|
772
|
+
The Wizard only needs to know where to find the MS files and were the store the results.
|
|
750
773
|
```python
|
|
751
|
-
import
|
|
752
|
-
wiz =
|
|
753
|
-
source=r'..\..\folder_with_raw_data',
|
|
754
|
-
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
|
|
755
779
|
)
|
|
756
|
-
wiz.
|
|
780
|
+
wiz.test_and_run()
|
|
757
781
|
```
|
|
758
782
|
|
|
759
|
-
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...
|
|
760
784
|
|
|
761
|
-
|
|
762
|
-
```python
|
|
763
|
-
import masster
|
|
764
|
-
sample = masster.Sample(filename='...') # full path to a *.raw, *.wiff, or *.mzML file
|
|
765
|
-
# process
|
|
766
|
-
sample.find_features(chrom_fwhm=0.5, noise=50) # for orbitrap data, set noise to 1e5
|
|
767
|
-
sample.find_adducts()
|
|
768
|
-
sample.find_ms2()
|
|
769
|
-
|
|
770
|
-
# access data
|
|
771
|
-
sample.features_df
|
|
772
|
-
|
|
773
|
-
# save results
|
|
774
|
-
sample.save() # stores to *.sample5, our custom hdf5 format
|
|
775
|
-
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:
|
|
776
786
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
# explore methods
|
|
784
|
-
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'
|
|
785
792
|
```
|
|
786
793
|
|
|
787
|
-
### Basic Workflow for analyzing LC-MS study with
|
|
788
|
-
|
|
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`.
|
|
789
796
|
```python
|
|
790
797
|
import masster
|
|
791
798
|
# Initialize the Study object with the default folder
|
|
@@ -797,17 +804,20 @@ study.add(r'D:\...\...\...\*.wiff')
|
|
|
797
804
|
# Perform retention time correction
|
|
798
805
|
study.align(rt_tol=2.0)
|
|
799
806
|
study.plot_alignment()
|
|
800
|
-
study.plot_bpc()
|
|
801
807
|
study.plot_rt_correction()
|
|
808
|
+
study.plot_bpc()
|
|
802
809
|
|
|
803
810
|
# Find consensus features
|
|
804
|
-
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
|
|
805
812
|
study.plot_consensus_2d()
|
|
806
813
|
|
|
807
|
-
#
|
|
814
|
+
# retrieve information
|
|
815
|
+
study.info()
|
|
816
|
+
|
|
817
|
+
# Retrieve EICs for quantification
|
|
808
818
|
study.fill()
|
|
809
819
|
|
|
810
|
-
# Integrate according to consensus metadata
|
|
820
|
+
# Integrate EICs according to consensus metadata
|
|
811
821
|
study.integrate()
|
|
812
822
|
|
|
813
823
|
# export results
|
|
@@ -823,32 +833,63 @@ study.save()
|
|
|
823
833
|
study.plot_samples_pca()
|
|
824
834
|
study.plot_samples_umap()
|
|
825
835
|
study.plot_samples_2d()
|
|
826
|
-
```
|
|
827
836
|
|
|
828
|
-
|
|
829
|
-
|
|
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
|
+
```
|
|
830
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:
|
|
831
852
|
```python
|
|
832
|
-
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()
|
|
833
857
|
|
|
834
|
-
#
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
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()
|
|
838
862
|
|
|
839
|
-
#
|
|
840
|
-
|
|
863
|
+
# access data
|
|
864
|
+
sample.features_df
|
|
841
865
|
|
|
842
|
-
#
|
|
843
|
-
|
|
844
|
-
|
|
866
|
+
# save results
|
|
867
|
+
sample.save() # stores to *.sample5, our custom hdf5 format
|
|
868
|
+
sample.export_mgf()
|
|
845
869
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
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)
|
|
850
878
|
```
|
|
851
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
|
+
|
|
852
893
|
## License
|
|
853
894
|
GNU Affero General Public License v3
|
|
854
895
|
|
|
@@ -858,4 +899,4 @@ See the [LICENSE](LICENSE) file for details.
|
|
|
858
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).
|
|
859
900
|
|
|
860
901
|
## Citation
|
|
861
|
-
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
|