Package: mass-suite
mass-suiteThis package is initiated from the University of Washington eScience capstone project.Mass-suite: Comprehensive Mass Spectrometry(MS) data analysis toolMass-suite is a package used for general MS data process and advanced data analysis.It provided a full capacity including data import, alignment, noise removal, visualization and fragment searching using online database.The mass-suite package is also providing a data mining option for the feature clustering using dilution datasets, aiming at dilution prediction, source tracking and matrix effect assessment.Contributers: Ximin Hu, Derek Mar, Nozomi Suzuki, Bowei ZhangRelease date: 2020/06/24Update2022/03/12: Source identification/pattern recognition algorithm developed2020/09/01: Feature extraction pipeline validated comparing with msdial pipeline output2020/09/07: Updated formula prediction and isotopic score function, currently support formula prediction for small molecules under 500 Da2020/12/15: Rewrite alignment module, fixed bugs in peak picking functionsInstallation & major dependenciesActivating the virtual environmentIncluded within the root of the repository is a virtual environment
pre-suited to runmssThe virtual environment is located within environment.ymlTo create the virtual environment from the .yml file:conda env create -f environment.ymlTo activate the virtual environment:conda activate mssMass-suite requires major dependencies:Pandas 1.0.3 or higherNumpy 1.16.5 or higherScikit-learn 0.23.0 or higherScipy 1.4.1 or higherpymzml2.4.6 or higherplotly4.5.2 or higherOptional dependencies for machine-learning models:Keras 2.3.1Tensorflow 2.0.0Pytorch 1.4.0 or higherPlease make sure the major dependencies are up to date before the installation.The package can be installed & imported as following:pip install mass-suiteimport mssOrganization of the projectThe project has the following major structure:mass-suite/
  |- mss/
     |- __init__.py
     |- alignment.py
     |- dm.py
     |- frag.py
     |- mssdata.py
     |- mssmain.py
     |- version.py
     |- visreader.py
     |- *.pkl
     |- tests/
        |- __init__.py
        |- test_*.py
     |- dev/  
        |- *.ipynb
  |- script/
     |- mss_processor.py
  |- doc/
  |- example_data/
  |- README.md
  |- LICENSE
  |- environment.ymlFeatured modulesMS data import and alignmentSupported formats:.mzmlMS data will be imported and filtered to create a dataframe in readable format from the mzml file.A random forest model is integrated in the function as optional assessing tool for peak quality assessment.Data from different experiments will be aligned together according to user defined error range.Supported export formats: .csv/.xlsxThere is also a script version of the functions that integrated the functions into a automated workflow, please seescript/mss_processor.pyThe automated workflow is excutable via command line:python -m mss_processor.pyexample:Currently the script only support.csvexport.MS data analysisSupported formats: formats supported by PandasThis is a data analysis module using cluster algorithm to find grouping features, detecting noises and mining for dilution prediction/source tracking.ms_cluster function will grouping the features into clusters using selected algorithm. Dimension reduction and cluster report are optional within the function settings.Current clustering algorithms:DBSCANOPTICSNon-parametric hypothesis test (please refer to trend_calc function)example output:cluster report output:After clustering, modeling function is provided to predict the dilution rate from samples and catch the behavior of individual clustersfeature_model(d_transpose, cluster_algorithm=True, model_method='ensemble_bagging_svc', report=True)User can define either to use all features for modeling or individual clusters for modelingCurrently supporting models: linear regression, random forest regression, ensemble bagging regressionModel assessment report is also optional upon function settings:User can use the model and cluster information for new sample prediction:Simple source identification tool is also incorporated in this module:Please refer to function documentation for more details.MS data visualization & interactive plots(extended work)Example for TIC plotMolecule identification using fragment information (extended work)All the online searching is usingMoNA MassBank database.Project DataAll the data used in the project is giving credit toCenter of Urban Water.Reference:Application of Nontarget High Resolution Mass Spectrometry Data to Quantitative Source Apportionment
Katherine T. Peter, Christopher Wu, Zhenyu Tian, and Edward P. Kolodziej
Environmental Science & Technology 2019 53 (21), 12257-12268
DOI: 10.1021/acs.est.9b04481Model training and testingAll the data used for model training is under 'example_data' folder and can be repeatly trained by users according to the settings.Testing and continuous integrationThe majority of code is tested under unittest and pushed throughGitHub Actions.LicensingThe package is open source and can be utilized under MIT license. Please find the detail inlicencefile.Call for contributionsMass-suite welcomes help from wide range of different backgrounds. As the package will keep developing, suggestions and improvements are always appreciated. If you are interested in testing the package using your own MS data, giving suggestions for adding modules or improving existing ones, have some question or seeking for cooperation, please contact the main contributor(xhu66@uw.edu).Special ThanksA big shout to Professor Edward Kolodziej, Professor Dave Beck, Katherine Peter, and the Center of Urban Water for all of their help during the development of this package.