Quantitative mass spectrometry workflow. Currently supports proteomics experiments with complex experimental designs for DDA-LFQ, DDA-Isobaric and DIA-LFQ quantification.

public public 1yr ago Version: 1.1.1 0 bookmarks

Introduction

nf-core/quantms is a bioinformatics best-practice analysis pipeline for Quantitative Mass Spectrometry (MS). Currently, the workflow supports three major MS-based analytical methods: (i) Data dependant acquisition (DDA) label-free and Isobaric quantitation (e.g. TMT, iTRAQ); (ii) Data independent acquisition (DIA) label-free quantification (for details see our in-depth documentation on quantms ).

nf-core/quantms workflow overview

The pipeline is built using Nextflow , a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The Nextflow DSL2 implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. Where possible, these processes have been submitted to and installed from nf-core/modules in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!

On release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the nf-core website . This gives you a hint on which reports and file types are produced by the pipeline in a standard run. The automatic continuous integration tests evaluate different workflows, including the peptide identification, quantification for LFQ, LFQ-DIA, and TMT test datasets.

Pipeline summary

The quantms allows uses to perform analysis in three main type of analytical MS-based quantitative methods: DDA-LFQ, DDA-ISO, DIA-LFQ. Each of these workflows share some processes but also includes their own steps. In summary:

DDA-LFQ:

  1. RAW file conversion to mzML ( thermorawfileparser )

  2. Peptide identification using comet and/or msgf+

  3. Re-scoring peptide identifications percolator

  4. Peptide identification FDR openms fdr tool

  5. Modification localization luciphor

  6. Quantification: Feature detection proteomicsLFQ

  7. Protein inference and quantification proteomicsLFQ

  8. QC report generation pmultiqc

  9. Normalization, imputation, significance testing with MSstats

DDA-ISO:

  1. RAW file conversion to mzML ( thermorawfileparser )

  2. Peptide identification using comet and/or msgf+

  3. Re-scoring peptide identifications percolator

  4. Peptide identification FDR openms fdr tool

  5. Modification localization luciphor

  6. Extracts and normalizes isobaric labeling IsobaricAnalyzer

  7. Protein inference ProteinInference or Epifany for bayesian inference.

  8. Protein Quantification ProteinQuantifier

  9. QC report generation pmultiqc

  10. Normalization, imputation, significance testing with MSstats

DIA-LFQ:

  1. RAW file conversion to mzML ( thermorawfileparser )

  2. DIA-NN analysis dia-nn

  3. Generation of output files (msstats)

  4. QC reports generation pmultiqc

Functionality overview

A graphical overview of suggested routes through the pipeline depending on context can be seen below.

nf-core/quantms metro map

Quick Start

  1. Install Nextflow ( >=22.10.1 )

  2. Install any of Docker , Singularity , Podman , Shifter or Charliecloud for full pipeline reproducibility (please only use Conda as a last resort; see docs )

  3. Download the pipeline and test it on a minimal dataset with a single command:

    nextflow run nf-core/quantms -profile test,YOURPROFILE --input project.sdrf.tsv --database protein.fasta --outdir <OUTDIR>
    

    Note that some form of configuration will be needed so that Nextflow knows how to fetch the required software. This is usually done in the form of a config profile ( YOURPROFILE in the example command above). You can chain multiple config profiles in a comma-separated string.

    • The pipeline comes with config profiles called docker , singularity , podman , shifter , charliecloud and conda which instruct the pipeline to use the named tool for software management. For example, -profile test,docker .

    • Please check nf-core/configs to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use -profile <institute> in your command. This will enable either docker or singularity and set the appropriate execution settings for your local compute environment.

    • If you are using singularity and are persistently observing issues downloading Singularity images directly due to timeout or network issues, then you can use the --singularity_pull_docker_container parameter to pull and convert the Docker image instead. Alternatively, you can use the nf-core download command to download images first, before running the pipeline. Setting the NXF_SINGULARITY_CACHEDIR or singularity.cacheDir Nextflow options enables you to store and re-use the images from a central location for future pipeline runs.

    • If you are using conda , it is highly recommended to use the NXF_CONDA_CACHEDIR or conda.cacheDir settings to store the environments in a central location for future pipeline runs.

    • The pipeline comes with config profiles called docker , singularity , podman , shifter , charliecloud and conda which instruct the pipeline to use the named tool for software management. For example, -profile test,docker .

    • Please check nf-core/configs to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use -profile <institute> in your command. This will enable either docker or singularity and set the appropriate execution settings for your local compute environment.

    • If you are using singularity , please use the nf-core download command to download images first, before running the pipeline. Setting the NXF_SINGULARITY_CACHEDIR or singularity.cacheDir Nextflow options enables you to store and re-use the images from a central location for future pipeline runs.

    • If you are using conda , it is highly recommended to use the NXF_CONDA_CACHEDIR or conda.cacheDir settings to store the environments in a central location for future pipeline runs.

  4. Start running your own analysis!

    nextflow run nf-core/quantms --input project.sdrf.tsv --database database.fasta --outdir <OUTDIR> -profile <docker/singularity/podman/shifter/charliecloud/conda/institute>
    

Documentation

The nf-core/quantms pipeline comes with a stand-alone full documentation including examples, benchmarks, and detailed explanation about the data analysis of proteomics data using quantms. In addition, quickstart documentation of the pipeline can be found in: usage , parameters and output .

Credits

nf-core/quantms was originally written by: Chengxin Dai ( @daichengxin ), Julianus Pfeuffer ( @jpfeuffer ) and Yasset Perez-Riverol ( @ypriverol ).

We thank the following people for their extensive assistance in the development of this pipeline:

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines .

For further information or help, don't hesitate to get in touch on the Slack #quantms channel (you can join with this invite ). In addition, users can get in touch using our discussion forum

Citations

If you use nf-core/quantms for your analysis, please cite it using the following doi: 10.5281/zenodo.7754148

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x .

Code Snippets

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
diann   --f ${(mzMLs as List).join(' --f ')} \\
        --lib ${lib} \\
        --threads ${task.cpus} \\
        --out-lib empirical_library.tsv \\
        --verbose $params.diann_debug \\
        --rt-profiling \\
        --temp ./quant/ \\
        --use-quant \\
        ${mass_acc} \\
        ${scan_window} \\
        --gen-spec-lib \\
        $args \\
        2>&1 | tee assemble_empirical_library.log


cat <<-END_VERSIONS > versions.yml
"${task.process}":
    DIA-NN: \$(diann 2>&1 | grep "DIA-NN" | grep -oP "(\\d*\\.\\d+\\.\\d+)|(\\d*\\.\\d+)")
END_VERSIONS
"""
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"""
diann_convert.py convert \\
    --folder ./ \\
    --diann_version ./version/versions.yml \\
    --dia_params "${dia_params}" \\
    --charge $params.max_precursor_charge \\
    --missed_cleavages $params.allowed_missed_cleavages \\
    --qvalue_threshold $params.protein_level_fdr_cutoff \\
    2>&1 | tee convert_report.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    pyopenms: \$(pip show pyopenms | grep "Version" | awk -F ': ' '{print \$2}')
END_VERSIONS
"""
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""
diann   --lib ${predict_tsv} \\
        --f ${mzML} \\
        --threads ${task.cpus} \\
        --verbose $params.diann_debug \\
        ${scan_window} \\
        --temp ./ \\
        --min-corr $params.min_corr \\
        --corr-diff $params.corr_diff \\
        ${mass_acc} \\
        ${time_corr_only} \\
        $args \\
        2>&1 | tee ${mzML.baseName}_diann.log


cat <<-END_VERSIONS > versions.yml
"${task.process}":
    DIA-NN: \$(diann 2>&1 | grep "DIA-NN" | grep -oP "(\\d*\\.\\d+\\.\\d+)|(\\d*\\.\\d+)")
END_VERSIONS
"""
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"""
diann   --lib ${empirical_library} \\
        --fasta ${fasta} \\
        --f ${(mzMLs as List).join(' --f ')} \\
        --threads ${task.cpus} \\
        --verbose $params.diann_debug \\
        ${scan_window} \\
        ${mass_acc} \\
        --temp ./quant/ \\
        --relaxed-prot-inf \\
        --pg-level $params.pg_level \\
        ${species_genes} \\
        --use-quant \\
        --matrices \\
        --out diann_report.tsv \\
        --qvalue $params.protein_level_fdr_cutoff \\
        $args \\
        2>&1 | tee diannsummary.log


cat <<-END_VERSIONS > versions.yml
"${task.process}":
    DIA-NN: \$(diann 2>&1 | grep "DIA-NN" | grep -oP "(\\d*\\.\\d+\\.\\d+)|(\\d*\\.\\d+)")
END_VERSIONS
"""
23
24
25
26
27
28
29
30
31
32
33
34
"""
prepare_diann_parameters.py generate \\
    --enzyme "${meta.enzyme}" \\
    --fix_mod "${meta.fixedmodifications}" \\
    --var_mod "${meta.variablemodifications}" \\
    2>&1 | tee GENERATE_DIANN_CFG.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    sdrf-pipelines: \$(pip show sdrf-pipelines | grep "Version" | awk -F ': ' '{print \$2}')
END_VERSIONS
"""
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""
diann   --lib ${library} \\
        --f ${mzML} \\
        --fasta ${fasta} \\
        --threads ${task.cpus} \\
        --verbose $params.diann_debug \\
        --temp ./ \\
        --mass-acc \$(echo ${mass_acc_ms2}) \\
        --mass-acc-ms1 \$(echo ${mass_acc_ms1}) \\
        --window \$(echo ${scan_window}) \\
        --no-ifs-removal \\
        --no-main-report \\
        --relaxed-prot-inf \\
        --pg-level $params.pg_level \\
        $args \\
        2>&1 | tee ${mzML.baseName}_final_diann.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    DIA-NN: \$(diann 2>&1 | grep "DIA-NN" | grep -oP "(\\d*\\.\\d+\\.\\d+)|(\\d*\\.\\d+)")
END_VERSIONS
"""
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""
msstats_plfq.R \\
    ${msstats_csv_input} \\
    "${params.contrasts}" \\
    "${ref_con}" \\
    ${params.msstats_remove_one_feat_prot} \\
    ${params.msstatslfq_removeFewMeasurements} \\
    ${params.msstatslfq_feature_subset_protein} \\
    ${params.msstatslfq_quant_summary_method} \\
    ${msstats_csv_input.baseName} \\
    ${params.msstats_threshold} \\
    $args \\
    2>&1 | tee msstats.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
    bioconductor-msstats: \$(Rscript -e "library(MSstats); cat(as.character(packageVersion('MSstats')))")
END_VERSIONS
"""
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
msstats_tmt.R \\
    ${msstatstmt_csv_input} \\
    "${params.contrasts}" \\
    "${ref_con}" \\
    ${params.msstats_remove_one_feat_prot} \\
    ${params.msstatsiso_useunique_peptide} \\
    ${params.msstatsiso_rmpsm_withfewmea_withinrun} \\
    ${params.msstatsiso_summaryformultiple_psm} \\
    ${params.msstatsiso_summarization_method} \\
    ${params.msstatsiso_global_norm} \\
    ${params.msstatsiso_remove_norm_channel} \\
    ${params.msstatsiso_reference_normalization} \\
    ${msstatstmt_csv_input.baseName} \\
    ${params.msstats_threshold} \\
    $args \\
    2>&1 | tee msstats_tmt.log


cat <<-END_VERSIONS > versions.yml
"${task.process}":
    r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
    bioconductor-msstatstmt: \$(Rscript -e "library(MSstatsTMT); cat(as.character(packageVersion('MSstatsTMT')))")
END_VERSIONS
"""
25
26
27
28
29
30
31
32
33
"""
mzml_statistics.py "${mzml}" \\
    2>&1 | tee mzml_statistics.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    pyopenms: \$(pip show pyopenms | grep "Version" | awk -F ': ' '{print \$2}')
END_VERSIONS
"""
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
ConsensusID \\
    -in ${id_file} \\
    -out ${meta.mzml_id}_consensus.idXML \\
    -per_spectrum \\
    -threads $task.cpus \\
    -algorithm $params.consensusid_algorithm \\
    -filter:min_support $params.min_consensus_support \\
    -filter:considered_hits $params.consensusid_considered_top_hits \\
    -debug $params.consensusid_debug \\
    $args \\
    2>&1 | tee ${meta.id}_consensusID.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    ConsensusID: \$(ConsensusID 2>&1  | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
DecoyDatabase \\
    -in ${db_for_decoy} \\
    -out ${db_for_decoy.baseName}_decoy.fasta \\
    -decoy_string $params.decoy_string \\
    -decoy_string_position $params.decoy_string_position \\
    -method $params.decoy_method \\
    -shuffle_max_attempts $params.shuffle_max_attempts \\
    -shuffle_sequence_identity_threshold $params.shuffle_sequence_identity_threshold \\
    -debug $params.decoydatabase_debug \\
    $args \\
    2>&1 | tee ${db_for_decoy.baseName}_decoy_database.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    DecoyDatabase: \$(DecoyDatabase 2>&1  | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
Epifany \\
    -in ${consus_file} \\
    -protein_fdr true \\
    -threads $task.cpus \\
    -algorithm:keep_best_PSM_only $params.keep_best_PSM_only \\
    -algorithm:update_PSM_probabilities $params.update_PSM_probabilities \\
    -greedy_group_resolution $gg \\
    -algorithm:top_PSMs $params.top_PSMs \\
    -out ${consus_file.baseName}_epi.consensusXML \\
    $args \\
    2>&1 | tee ${consus_file.baseName}_inference.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    Epifany: \$(Epifany 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
PSMFeatureExtractor \\
    -in ${id_file} \\
    -out ${id_file.baseName}_feat.idXML \\
    -threads $task.cpus \\
    $args \\
    2>&1 | tee ${id_file.baseName}_extract_psm_feature.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    PSMFeatureExtractor: \$(PSMFeatureExtractor 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
FalseDiscoveryRate \\
    -in ${id_file} \\
    -out ${id_file.baseName}_fdr.idXML \\
    -threads $task.cpus \\
    -algorithm:add_decoy_peptides \\
    -algorithm:add_decoy_proteins \\
    $args \\
    2>&1 | tee ${id_file.baseName}_fdr.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    FalseDiscoveryRate: \$(FalseDiscoveryRate 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
FileMerger \\
    -in ${(id_map as List).join(' ')} \\
    -in_type consensusXML \\
    -annotate_file_origin \\
    -append_method 'append_cols' \\
    -threads $task.cpus \\
    -out ID_mapper_merge.consensusXML \\
    $args \\
    2>&1 | tee ID_mapper_merge.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    FileMerger: \$(FileMerger 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
IDConflictResolver \\
    -in ${consus_file} \\
    -threads $task.cpus \\
    -out ${consus_file.baseName}_resconf.consensusXML \\
    $args \\
    2>&1 | tee ${consus_file.baseName}_resconf.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    IDConflictResolver: \$(IDConflictResolver 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
IDFilter \\
    -in ${id_file} \\
    -out ${id_file.baseName}_filter$suffix \\
    -threads $task.cpus \\
    $args \\
    2>&1 | tee ${id_file.baseName}_idfilter.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    IDFilter: \$(IDFilter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
IDMapper \\
    -id ${id_file} \\
    -in ${map_file} \\
    -threads $task.cpus \\
    -out ${id_file.baseName}_map.consensusXML \\
    $args \\
    2>&1 | tee ${id_file.baseName}_map.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    IDMapper: \$(IDMapper 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
IDPosteriorErrorProbability \\
    -in ${id_file} \\
    -out ${id_file.baseName}_idpep.idXML \\
    -fit_algorithm:outlier_handling $params.outlier_handling \\
    -threads ${task.cpus} \\
    $args \\
    2>&1 | tee ${id_file.baseName}_idpep.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    IDPosteriorErrorProbability: \$(IDPosteriorErrorProbability 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
IDScoreSwitcher \\
    -in ${id_file} \\
    -out ${id_file.baseName}_pep.idXML \\
    -threads $task.cpus \\
    -new_score ${new_score} \\
    $args \\
    2>&1 | tee ${id_file.baseName}_switch.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    IDScoreSwitcher: \$(IDScoreSwitcher 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""
IsobaricAnalyzer \\
    -type $meta.labelling_type \\
    -in ${mzml_file} \\
    -threads $task.cpus \\
    -extraction:select_activation "${diss_meth}" \\
    -extraction:reporter_mass_shift $params.reporter_mass_shift \\
    -extraction:min_reporter_intensity $params.min_reporter_intensity \\
    -extraction:min_precursor_purity $params.min_precursor_purity \\
    -extraction:precursor_isotope_deviation $params.precursor_isotope_deviation \\
    ${iso_normalization} \\
    -${meta.labelling_type}:reference_channel $params.reference_channel \\
    -out ${mzml_file.baseName}_iso.consensusXML \\
    $args \\
    2>&1 | tee ${mzml_file.baseName}_isob.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    IsobaricAnalyzer: \$(IsobaricAnalyzer --version 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
MSstatsConverter \\
    -in ${consensusXML} \\
    -in_design ${exp_file} \\
    -method ${quant_method} \\
    -out ${exp_file.baseName}_msstats_in.csv \\
    $args \\
    2>&1 | tee MSstatsConverter.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    MSstatsConverter: \$(MSstatsConverter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
22
23
24
25
26
27
28
29
30
"""
mkdir -p out
FileConverter -in ${mzmlfile} -out out/${mzmlfile.baseName}.mzML 2>&1 | tee ${mzmlfile.baseName}_mzmlindexing.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    FileConverter: \$(FileConverter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
PeakPickerHiRes \\
    -in ${mzml_file} \\
    -out ${mzml_file.baseName}.mzML \\
    -threads $task.cpus \\
    -debug $params.pp_debug \\
    -processOption ${in_mem} \\
    ${lvls} \\
    $args \\
    2>&1 | tee ${mzml_file.baseName}_pp.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    PeakPickerHiRes: \$(PeakPickerHiRes 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
ProteinInference \\
    -in ${consus_file} \\
    -threads $task.cpus \\
    -picked_fdr $params.picked_fdr \\
    -picked_decoy_string $params.decoy_string \\
    -protein_fdr true \\
    -Algorithm:use_shared_peptides $params.use_shared_peptides \\
    -Algorithm:annotate_indistinguishable_groups $groups \\
    $gg \\
    -Algorithm:score_aggregation_method $params.protein_score \\
    -Algorithm:min_peptides_per_protein $params.min_peptides_per_protein \\
    -out ${consus_file.baseName}_epi.consensusXML \\
    $args \\
    2>&1 | tee ${consus_file.baseName}_inference.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    ProteinInference: \$(ProteinInference 2>&1 | grep -E '^Version(.*) ' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
ProteinQuantifier \\
    -method 'top' \\
    -in ${epi_filt_resolve} \\
    -design ${pro_quant_exp} \\
    -out ${pro_quant_exp.baseName}_protein_openms.csv \\
    ${export_mztab} \\
    -peptide_out ${pro_quant_exp.baseName}_peptide_openms.csv \\
    -top:N $params.top \\
    -top:aggregate $params.average \\
    ${include_all} \\
    ${fix_peptides} \\
    -ratios \\
    -threads $task.cpus \\
    ${normalize} \\
    $args \\
    2>&1 | tee pro_quant.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    ProteinQuantifier: \$(ProteinQuantifier 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -c 1-50)
END_VERSIONS
"""
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"""
ProteomicsLFQ \\
    -threads ${task.cpus} \\
    -in ${(mzmls as List).join(' ')} \\
    -ids ${(id_files as List).join(' ')} \\
    -design ${expdes} \\
    -fasta ${fasta} \\
    -protein_inference ${params.protein_inference_method} \\
    -quantification_method ${params.quantification_method} \\
    -targeted_only ${params.targeted_only} \\
    -mass_recalibration ${params.mass_recalibration} \\
    -transfer_ids ${params.transfer_ids} \\
    -protein_quantification ${params.protein_quant} \\
    -alignment_order ${params.alignment_order} \\
    ${decoys_present} \\
    -psmFDR ${params.psm_level_fdr_cutoff} \\
    -proteinFDR ${params.protein_level_fdr_cutoff} \\
    -picked_proteinFDR ${params.picked_fdr} \\
    -out_cxml ${expdes.baseName}_openms.consensusXML \\
    -out ${expdes.baseName}_openms.mzTab \\
    ${msstats_present} \\
    ${triqler_present} \\
    $args \\
    2>&1 | tee proteomicslfq.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    ProteomicsLFQ: \$(ProteomicsLFQ 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
END_VERSIONS
"""
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""
LuciphorAdapter \\
    -id ${id_file} \\
    -in ${mzml_file} \\
    ${luciphor_jar} \\
    -out ${id_file.baseName}_luciphor.idXML \\
    -threads $task.cpus \\
    -num_threads $task.cpus \\
    -target_modifications ${params.mod_localization.tokenize(',').collect { "'${it}'" }.join(" ") } \\
    -fragment_method $meta.dissociationmethod \\
    ${losses} \\
    ${dec_mass} \\
    ${dec_losses} \\
    -max_charge_state $params.max_precursor_charge \\
    -max_peptide_length $params.max_peptide_length \\
    $args \\
    2>&1 | tee ${id_file.baseName}_luciphor.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    LuciphorAdapter: \$(LuciphorAdapter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g')
    Luciphor: \$(luciphor2 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g')
END_VERSIONS
"""
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
OMP_NUM_THREADS=$task.cpus PercolatorAdapter \\
    -in ${id_file} \\
    -out ${id_file.baseName}_perc.idXML \\
    -threads $task.cpus \\
    -subset_max_train $params.subset_max_train \\
    -decoy_pattern $params.decoy_string \\
    -post_processing_tdc \\
    -score_type pep \\
    $args \\
    2>&1 | tee ${id_file.baseName}_percolator.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    PercolatorAdapter: \$(PercolatorAdapter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g')
    percolator: \$(percolator -h 2>&1 | grep -E '^Percolator version(.*)' | sed 's/Percolator version //g')
END_VERSIONS
"""
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
"""
CometAdapter \\
    -in ${mzml_file} \\
    -out ${mzml_file.baseName}_comet.idXML \\
    -threads $task.cpus \\
    -database "${database}" \\
    -instrument ${inst} \\
    -missed_cleavages $params.allowed_missed_cleavages \\
    -min_peptide_length $params.min_peptide_length \\
    -max_peptide_length $params.max_peptide_length \\
    -num_hits $params.num_hits \\
    -num_enzyme_termini $params.num_enzyme_termini \\
    -enzyme "${enzyme}" \\
    -isotope_error ${isoSlashComet} \\
    -precursor_charge $params.min_precursor_charge:$params.max_precursor_charge \\
    -fixed_modifications ${meta.fixedmodifications.tokenize(',').collect { "'$it'" }.join(" ") } \\
    -variable_modifications ${meta.variablemodifications.tokenize(',').collect { "'$it'" }.join(" ") } \\
    -max_variable_mods_in_peptide $params.max_mods \\
    -precursor_mass_tolerance $meta.precursormasstolerance \\
    -precursor_error_units $meta.precursormasstoleranceunit \\
    -fragment_mass_tolerance ${bin_tol} \\
    -fragment_bin_offset ${bin_offset} \\
    ${il_equiv} \\
    -PeptideIndexing:unmatched_action ${params.unmatched_action} \\
    -debug $params.db_debug \\
    -force \\
    $args \\
    2>&1 | tee ${mzml_file.baseName}_comet.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    CometAdapter: \$(CometAdapter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
    Comet: \$(comet 2>&1 | grep -E "Comet version.*" | sed 's/Comet version //g' | sed 's/"//g')
END_VERSIONS
"""
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
"""
MSGFPlusAdapter \\
    -protocol $params.protocol \\
    -in ${mzml_file} \\
    -out ${mzml_file.baseName}_msgf.idXML \\
    ${msgf_jar} \\
    -threads $task.cpus \\
    -java_memory ${task.memory.toMega()} \\
    -database "${database}" \\
    -instrument ${inst} \\
    -matches_per_spec $params.num_hits \\
    -min_precursor_charge $params.min_precursor_charge \\
    -max_precursor_charge $params.max_precursor_charge \\
    -min_peptide_length $params.min_peptide_length \\
    -max_peptide_length $params.max_peptide_length \\
    -max_missed_cleavages $params.allowed_missed_cleavages \\
    -isotope_error_range $params.isotope_error_range \\
    -enzyme "${enzyme}" \\
    -tryptic ${msgf_num_enzyme_termini} \\
    -precursor_mass_tolerance $meta.precursormasstolerance \\
    -precursor_error_units $meta.precursormasstoleranceunit \\
    -fixed_modifications ${meta.fixedmodifications.tokenize(',').collect() { "'${it}'" }.join(" ") } \\
    -variable_modifications ${meta.variablemodifications.tokenize(',').collect() { "'${it}'" }.join(" ") } \\
    -max_mods $params.max_mods \\
    ${il_equiv} \\
    -PeptideIndexing:unmatched_action ${params.unmatched_action} \\
    -debug $params.db_debug \\
    $args \\
    2>&1 | tee ${mzml_file.baseName}_msgf.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    MSGFPlusAdapter: \$(MSGFPlusAdapter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1)
    msgf_plus: \$(msgf_plus 2>&1 | grep -E '^MS-GF\\+ Release.*')
END_VERSIONS
"""
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
multiqc \\
    -f \\
    --config ./results/multiqc_config.yml \\
    ${args} \\
    ${disable_pmultiqc} \\
    ${disable_table_plots} \\
    --quantification_method $params.quantification_method \\
    ./results \\
    -o .

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    pmultiqc: \$(multiqc --pmultiqc_version | sed -e "s/pmultiqc, version //g")
END_VERSIONS
"""
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
# since we know that we will need to convert from raw to mzML for all tools that need the design (i.e., OpenMS tools)
# we edit the design here and change the endings.
sed 's/.raw\\t/.mzML\\t/I' ${design} > ${design.baseName}_openms_design.tsv

# here we extract the filenames and fake an empty config (since the config values will be deduced from the workflow params)
a=\$(grep -n '^\$' ${design} | head -n 1 | awk -F ":" '{print \$1}')
sed -e ''"\${a}"',\$d' ${design} > ${design.baseName}_config.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    sdrf-pipelines: \$(echo "0.0.22")
END_VERSIONS
"""
27
28
29
30
31
32
33
34
"""
check_samplesheet.py "${input_file}" ${is_sdrf} --CHECK_MS 2>&1 | tee input_check.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    sdrf-pipelines: \$(echo "0.0.22")
END_VERSIONS
"""
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
## -t2 since the one-table format parser is broken in OpenMS2.5
## -l for legacy behavior to always add sample columns
## TODO Update the sdrf-pipelines to dynamic print versions

parse_sdrf convert-openms -t2 -l -s ${sdrf} 2>&1 | tee ${sdrf.baseName}_parsing.log
mv openms.tsv ${sdrf.baseName}_config.tsv
mv experimental_design.tsv ${sdrf.baseName}_openms_design.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    sdrf-pipelines: \$(echo "0.0.22")
END_VERSIONS
"""
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
"""
diann   `cat diann_config.cfg` \\
        --fasta ${fasta} \\
        --fasta-search \\
        ${min_pr_mz} \\
        ${max_pr_mz} \\
        ${min_fr_mz} \\
        ${max_fr_mz} \\
        --missed-cleavages $params.allowed_missed_cleavages \\
        --min-pep-len $params.min_peptide_length \\
        --max-pep-len $params.max_peptide_length \\
        --min-pr-charge $params.min_precursor_charge \\
        --max-pr-charge $params.max_precursor_charge \\
        --var-mods $params.max_mods \\
        --threads ${task.cpus} \\
        --predictor \\
        --verbose $params.diann_debug \\
        --gen-spec-lib \\
        2>&1 | tee silicolibrarygeneration.log


cat <<-END_VERSIONS > versions.yml
"${task.process}":
    DIA-NN: \$(diann 2>&1 | grep "DIA-NN" | grep -oP "(\\d*\\.\\d+\\.\\d+)|(\\d*\\.\\d+)")
END_VERSIONS
"""
42
43
44
45
46
47
48
49
"""
ThermoRawFileParser.sh -i=${rawfile} -f=2 -o=./ 2>&1 | tee ${rawfile.baseName}_conversion.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    ThermoRawFileParser: \$(ThermoRawFileParser.sh --version)
END_VERSIONS
"""
ShowHide 28 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://nf-co.re/quantms
Name: quantms
Version: 1.1.1
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Downloaded: 0
Copyright: Public Domain
License: None
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...