MPUSP/snakemake-ms-proteomics
Pipeline for automatic processing and quality control of mass spectrometry data
Overview
Testing:
Last update: 2026-09-25
Latest release: v1.1.1
Topics: bioinformatics conda mass-spectrometry pipeline proteomics snakemake snakemake-workflow workflow
Configuration
The following configuration details are extracted from the config's README file.
workflow overview
This workflow is a best-practice workflow for the automated analysis of mass spectrometry proteomics data. It currently supports automated analysis of data-dependent acquisition (DDA) data with label-free quantification. An extension by different workflows (DIA, isotope labeling) is planned in the future.
The workflow is mainly a wrapper for the excellent tools fragpipe and MSstats, with additional modules that supply and check the required input files, and generate reports. The workflow is built using snakemake and processes MS data using the following steps:
- Prepare
workflowfile (pythonscript) - Check user-supplied sample sheet (
pythonscript) - Check user-supplied database FASTA file (
pythonscript) - Generate decoy proteins (DecoyPyrat)
- Import raw files, search protein database (fragpipe)
- Align feature maps using IonQuant (fragpipe)
- Import quantified features, infer and quantify proteins (R MSstats)
- Compare different biological conditions, export results (R MSstats)
- Generate HTML report with embedded QC plots (R markdown)
- Generate PDF report from HTML weasyprint
- Send out report by email (
pythonscript) - Clean up temporary files after workflow execution (
bashscript)
If you want to contribute, report issues, or suggest features, please get in touch on github.
Running the workflow
Input data
The workflow requires the following input files:
- mass spectrometry data, such as Thermo
*.rawor*.mzMLfiles - an (organism) database in
*.fastaformat. Decoys (rev_prefix) will be added if necessary - a sample sheet in tab-separated format (aka
manifestfile) - a
workflowfile for fragpipe (seeresourcesdir)
The samplesheet file has the following structure (example file: .test/config/samplesheet.tsv).
sample: names/paths to raw filesraw_file: path to raw files, can be absolute or relative to the work dircondition: experimental group, treatmentsreplicate: replicate number, consecutively numbered. Repeating numbers (e.g. 1, 2, 1, 2) will be treated as paired samples!method: the type of MS data, will be used to determine the workflowcomparison: reference condition for testing differential abundance. Optional; If you don't want to make comparisons, leave column empty.
| sample_name | raw_file | condition | replicate | MS_method | comparison |
|---|---|---|---|---|---|
| WT_exp_1 | data/E1_220707_22C012_sample_01.raw | WT_exp | 1 | DDA | WT_exp |
| WT_exp_2 | data/E1_220707_22C012_sample_02.raw | WT_exp | 2 | DDA | WT_exp |
| WT_trans_1 | data/E1_220707_22C012_sample_03.raw | WT_trans | 3 | DDA | WT_exp |
| WT_trans_2 | data/E1_220707_22C012_sample_04.raw | WT_trans | 4 | DDA | WT_exp |
Fragpipe
Fragpipe is not available on conda or other package archives. However, to make the workflow as user-friendly as possible, the latest fragpipe release from github (currently v22.0) is automatically installed to the respective conda environment when using the workflow the first time. After installation, the GUI (graphical user interface) will pop up and ask to you to finish the installation by downloading the missing modules MSFragger, IonQuant, and Philosopher. This step is necessary to abide to license restrictions. From then on, fragpipe will run in headless mode through command line only.
All other dependencies for the workflow are automatically pulled as conda environments by snakemake.
Missing value imputation
Missing value imputation happens at different stages.
First, the default strategy for fragpipe is to use "match between runs", i.e. non-identified features in the MS1 spectra are cross-compared with other runs of the same experiment where MS2 identification is available. This strategy is based on actual quantification data and reduces the number of missing feature quantifications.
Second, MSstats imputes two kinds of missing values where absolutely no feature quantification is available: Missing values at random positions are removed during summarization, and missing values due to low abundance are imputed at the feature level via accelerated failure time model.
Missing value treatment can be controlled through the MSstats parameters MBimpute and others.
See the MSstats manual for more information.
Output
The workflow generates the following output from its modules:
samplesheet
samplesheet.tsv: Samplesheet after checking file paths and optionslog.txt: Log file for this module
workflow
workflow.txt: Configuration file forfragpipe, determined from samplesheet.log.txt: Log file for this module
database
database.fasta: The downloaded or user-supplied.fastafile. In the latter case, the file is identical to the input.log.txt: Log file for this module
decoypyrat
decoy_database.fasta: Original.fastafile supplemented with randomized protein sequences.log.txt: Log file for this module
fragpipe
[sample_name]/: Directory containing sample specific output files for each runcombined_ion.tsv: Quantification of ion intensity per peptidecombined_modified_peptide.tsv: Quantification of peptide modificationscombined_peptide.tsv: Quantification of peptides/featurescombined_protein.tsv: Quantification of proteins from petide, inferred byfragpipeMSstats.csv: Qunatification of petides/features, output from fragpipe served inMSstatsfriendly format- other files such as logs, file lists, etc.
log.txt: Log file for this module
msstats
comparison_result.csv: Main table with results about the comparison between different experimental conditionsfeature_level_data.csv: Feature-level quantification data processed by MSstatsmodel_qc.csv: Table with data about the fitted quantification models from MSstatsprotein_level_data.csv: Protein-level quantification data processed by MSstatsuniprot.csv: Optionally downloaded table with protein annotation from Uniprotlog.txt: Log file for this module
report
report.html: Report with figures and tablesreport.pdf: Report with figures and tables in PDF format. Converted from HTMLlog.txt: Log file for this module
log.txt: Log file for this module
clean_up
log.txt: Log file for this module