diff --git a/bin/mzml_statistics.py b/bin/mzml_statistics.py new file mode 100755 index 00000000..09920131 --- /dev/null +++ b/bin/mzml_statistics.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python + +from pyopenms import MzMLFile, MSExperiment +import os +import pandas as pd +import click + +CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) + + +@click.group(context_settings=CONTEXT_SETTINGS) +def cli(): + pass + + +@click.command("mzml_dataframe") +@click.option("--mzml_folder", "-d") +@click.pass_context +def mzml_dataframe(ctx, mzml_folder): + + file_columns = ["File_Name", "SpectrumID", "MSLevel", "Charge", "MS2_peaks", "Base_Peak_Intensity"] + mzml_paths = list(i for i in os.listdir(mzml_folder) if i.endswith(".mzML")) + mzml_count = 1 + + def parse_mzml(file_name, file_columns): + info = [] + exp = MSExperiment() + MzMLFile().load(file_name, exp) + for i in exp: + name = os.path.split(file_name)[1] + id = i.getNativeID() + MSLevel = i.getMSLevel() + if MSLevel == 2: + charge_state = i.getPrecursors()[0].getCharge() + peaks_tuple = i.get_peaks() + peak_per_ms2 = len(peaks_tuple[0]) + if i.getMetaValue("base peak intensity"): + base_peak_intensity = i.getMetaValue("base peak intensity") + else: + base_peak_intensity = max(peaks_tuple[1]) if len(peaks_tuple[1]) > 0 else "null" + info_list = [name, id, 2, charge_state, peak_per_ms2, base_peak_intensity] + else: + info_list = [name, id, MSLevel, "null", "null", "null"] + + info.append(info_list) + + return pd.DataFrame(info, columns=file_columns) + + for i in mzml_paths: + mzml_df = parse_mzml(mzml_folder + i, file_columns) + tsv_header = True if mzml_count == 1 else False + mzml_df.to_csv("mzml_info.tsv", mode="a", sep="\t", index=False, header=tsv_header) + mzml_count += 1 + + +cli.add_command(mzml_dataframe) + +if __name__ == "__main__": + cli() diff --git a/modules/local/diannconvert/main.nf b/modules/local/diannconvert/main.nf index 9263de45..c237074e 100644 --- a/modules/local/diannconvert/main.nf +++ b/modules/local/diannconvert/main.nf @@ -2,11 +2,11 @@ process DIANNCONVERT { tag "$exp_design.Name" label 'process_low' - conda (params.enable_conda ? "conda-forge::pandas_schema conda-forge::lzstring bioconda::pmultiqc=0.0.13" : null) + conda (params.enable_conda ? "conda-forge::pandas_schema conda-forge::lzstring bioconda::pmultiqc=0.0.16" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/pmultiqc:0.0.13--pyhdfd78af_0" + container "https://depot.galaxyproject.org/singularity/pmultiqc:0.0.16--pyhdfd78af_0" } else { - container "quay.io/biocontainers/pmultiqc:0.0.13--pyhdfd78af_0" + container "quay.io/biocontainers/pmultiqc:0.0.16--pyhdfd78af_0" } input: diff --git a/modules/local/mzmlstatistics/main.nf b/modules/local/mzmlstatistics/main.nf new file mode 100644 index 00000000..160efb87 --- /dev/null +++ b/modules/local/mzmlstatistics/main.nf @@ -0,0 +1,34 @@ +process MZMLSTATISTICS { + label 'process_medium' + // TODO could be easily parallelized + label 'process_single_thread' + + conda (params.enable_conda ? "conda-forge::pandas_schema conda-forge::lzstring bioconda::pmultiqc=0.0.16" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/pmultiqc:0.0.16--pyhdfd78af_0" + } else { + container "quay.io/biocontainers/pmultiqc:0.0.16--pyhdfd78af_0" + } + + input: + path("out/*") + + output: + path "mzml_info.tsv", emit: mzml_statistics + path "versions.yml", emit: version + path "*.log", emit: log + + script: + def args = task.ext.args ?: '' + + """ + mzml_statistics.py mzml_dataframe \\ + --mzml_folder "./out/" \\ + |& tee mzml_statistics.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pyopenms: \$(echo "2.8.0") + END_VERSIONS + """ +} diff --git a/modules/local/mzmlstatistics/meta.yml b/modules/local/mzmlstatistics/meta.yml new file mode 100644 index 00000000..079231ff --- /dev/null +++ b/modules/local/mzmlstatistics/meta.yml @@ -0,0 +1,26 @@ +name: MZMLSTATISTICS +description: A module for mzMLs statistics +keywords: + - mzML + - statistics +tools: + - custom: + description: | + A custom module for mzMLs statistics. + homepage: https://github.com/bigbio/quantms + documentation: https://github.com/bigbio/quantms/tree/readthedocs +input: + - mzmls: + type: dir + description: mzML files directory +output: + - mzml_statistics: + type: file + description: mzMLs statistics file + pattern: "mzml_info.tsv" + - version: + type: file + description: File containing software version + pattern: "versions.yml" +authors: + - "@wanghong" diff --git a/modules/local/openms/consensusid/main.nf b/modules/local/openms/consensusid/main.nf index 0b0a63ba..15fd4c6b 100644 --- a/modules/local/openms/consensusid/main.nf +++ b/modules/local/openms/consensusid/main.nf @@ -7,8 +7,8 @@ process CONSENSUSID { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(id_file), val(qval_score) @@ -37,7 +37,7 @@ process CONSENSUSID { cat <<-END_VERSIONS > versions.yml "${task.process}": - ConsensusID: \$(ConsensusID 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + ConsensusID: \$(ConsensusID 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/decoydatabase/main.nf b/modules/local/openms/decoydatabase/main.nf index 4a62d2a8..caffe665 100644 --- a/modules/local/openms/decoydatabase/main.nf +++ b/modules/local/openms/decoydatabase/main.nf @@ -4,8 +4,8 @@ process DECOYDATABASE { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: path(db_for_decoy) @@ -33,7 +33,7 @@ process DECOYDATABASE { cat <<-END_VERSIONS > versions.yml "${task.process}": - DecoyDatabase: \$(DecoyDatabase 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + DecoyDatabase: \$(DecoyDatabase 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/epifany/main.nf b/modules/local/openms/epifany/main.nf index e968af3b..78e983c0 100644 --- a/modules/local/openms/epifany/main.nf +++ b/modules/local/openms/epifany/main.nf @@ -6,8 +6,8 @@ process EPIFANY { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(consus_file) @@ -36,7 +36,7 @@ process EPIFANY { cat <<-END_VERSIONS > versions.yml "${task.process}": - Epifany: \$(Epifany 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + Epifany: \$(Epifany 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/extractpsmfeatures/main.nf b/modules/local/openms/extractpsmfeatures/main.nf index 76c272cc..67ac4f2f 100644 --- a/modules/local/openms/extractpsmfeatures/main.nf +++ b/modules/local/openms/extractpsmfeatures/main.nf @@ -6,8 +6,8 @@ process EXTRACTPSMFEATURES { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(id_file) @@ -31,7 +31,7 @@ process EXTRACTPSMFEATURES { cat <<-END_VERSIONS > versions.yml "${task.process}": - PSMFeatureExtractor: \$(PSMFeatureExtractor 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + PSMFeatureExtractor: \$(PSMFeatureExtractor 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/falsediscoveryrate/main.nf b/modules/local/openms/falsediscoveryrate/main.nf index 186a6306..ee7568d3 100644 --- a/modules/local/openms/falsediscoveryrate/main.nf +++ b/modules/local/openms/falsediscoveryrate/main.nf @@ -6,8 +6,8 @@ process FALSEDISCOVERYRATE { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(id_file) @@ -33,7 +33,7 @@ process FALSEDISCOVERYRATE { cat <<-END_VERSIONS > versions.yml "${task.process}": - FalseDiscoveryRate: \$(FalseDiscoveryRate 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + FalseDiscoveryRate: \$(FalseDiscoveryRate 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/filemerge/main.nf b/modules/local/openms/filemerge/main.nf index 4267a402..03cff0ea 100644 --- a/modules/local/openms/filemerge/main.nf +++ b/modules/local/openms/filemerge/main.nf @@ -5,8 +5,8 @@ process FILEMERGE { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: file(id_map) @@ -32,7 +32,7 @@ process FILEMERGE { cat <<-END_VERSIONS > versions.yml "${task.process}": - FileMerger: \$(FileMerger 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + FileMerger: \$(FileMerger 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/idconflictresolver/main.nf b/modules/local/openms/idconflictresolver/main.nf index 0a1efee6..2dc03116 100644 --- a/modules/local/openms/idconflictresolver/main.nf +++ b/modules/local/openms/idconflictresolver/main.nf @@ -4,8 +4,8 @@ process IDCONFLICTRESOLVER { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: path consus_file @@ -28,7 +28,7 @@ process IDCONFLICTRESOLVER { cat <<-END_VERSIONS > versions.yml "${task.process}": - IDConflictResolver: \$(IDConflictResolver 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + IDConflictResolver: \$(IDConflictResolver 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/idfilter/main.nf b/modules/local/openms/idfilter/main.nf index aa194674..0d5f8d5a 100644 --- a/modules/local/openms/idfilter/main.nf +++ b/modules/local/openms/idfilter/main.nf @@ -6,8 +6,8 @@ process IDFILTER { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(id_file) @@ -31,7 +31,7 @@ process IDFILTER { cat <<-END_VERSIONS > versions.yml "${task.process}": - IDFilter: \$(IDFilter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + IDFilter: \$(IDFilter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/idmapper/main.nf b/modules/local/openms/idmapper/main.nf index 7bbaddc1..9975f746 100644 --- a/modules/local/openms/idmapper/main.nf +++ b/modules/local/openms/idmapper/main.nf @@ -6,8 +6,8 @@ process IDMAPPER { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(id_file), path(map_file) @@ -32,7 +32,7 @@ process IDMAPPER { cat <<-END_VERSIONS > versions.yml "${task.process}": - IDMapper: \$(IDMapper 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + IDMapper: \$(IDMapper 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/idpep/main.nf b/modules/local/openms/idpep/main.nf index 6f08db23..6216f6c6 100644 --- a/modules/local/openms/idpep/main.nf +++ b/modules/local/openms/idpep/main.nf @@ -4,8 +4,8 @@ process IDPEP { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(id_file) @@ -30,7 +30,7 @@ process IDPEP { cat <<-END_VERSIONS > versions.yml "${task.process}": - IDPosteriorErrorProbability: \$(IDPosteriorErrorProbability 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + IDPosteriorErrorProbability: \$(IDPosteriorErrorProbability 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/idscoreswitcher/main.nf b/modules/local/openms/idscoreswitcher/main.nf index 6761f6fb..66c6a4a6 100644 --- a/modules/local/openms/idscoreswitcher/main.nf +++ b/modules/local/openms/idscoreswitcher/main.nf @@ -5,8 +5,8 @@ process IDSCORESWITCHER { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(id_file), val(new_score) @@ -31,7 +31,7 @@ process IDSCORESWITCHER { cat <<-END_VERSIONS > versions.yml "${task.process}": - IDScoreSwitcher: \$(IDScoreSwitcher 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + IDScoreSwitcher: \$(IDScoreSwitcher 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/indexpeptides/main.nf b/modules/local/openms/indexpeptides/main.nf index e316612a..013e1506 100644 --- a/modules/local/openms/indexpeptides/main.nf +++ b/modules/local/openms/indexpeptides/main.nf @@ -4,8 +4,8 @@ process INDEXPEPTIDES { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(id_file), path(database) @@ -57,7 +57,7 @@ process INDEXPEPTIDES { cat <<-END_VERSIONS > versions.yml "${task.process}": - PeptideIndexer: \$(PeptideIndexer 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + PeptideIndexer: \$(PeptideIndexer 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/isobaricanalyzer/main.nf b/modules/local/openms/isobaricanalyzer/main.nf index ebde605c..c01af905 100644 --- a/modules/local/openms/isobaricanalyzer/main.nf +++ b/modules/local/openms/isobaricanalyzer/main.nf @@ -4,8 +4,8 @@ process ISOBARICANALYZER { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(mzml_file) @@ -44,7 +44,7 @@ process ISOBARICANALYZER { cat <<-END_VERSIONS > versions.yml "${task.process}": - IsobaricAnalyzer: \$(IsobaricAnalyzer --version 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + IsobaricAnalyzer: \$(IsobaricAnalyzer --version 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/msstatsconverter/main.nf b/modules/local/openms/msstatsconverter/main.nf index f04fabbd..a27ffdaf 100644 --- a/modules/local/openms/msstatsconverter/main.nf +++ b/modules/local/openms/msstatsconverter/main.nf @@ -4,8 +4,8 @@ process MSSTATSCONVERTER { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: path consensusXML @@ -31,7 +31,7 @@ process MSSTATSCONVERTER { cat <<-END_VERSIONS > versions.yml "${task.process}": - MSstatsConverter: \$(MSstatsConverter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + MSstatsConverter: \$(MSstatsConverter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/mzmlindexing/main.nf b/modules/local/openms/mzmlindexing/main.nf index b4cae21c..20243b59 100644 --- a/modules/local/openms/mzmlindexing/main.nf +++ b/modules/local/openms/mzmlindexing/main.nf @@ -4,8 +4,8 @@ process MZMLINDEXING { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(mzmlfile) @@ -25,7 +25,7 @@ process MZMLINDEXING { cat <<-END_VERSIONS > versions.yml "${task.process}": - FileConverter: \$(FileConverter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + FileConverter: \$(FileConverter 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/openmspeakpicker/main.nf b/modules/local/openms/openmspeakpicker/main.nf index 2db083f6..3d4ac53c 100644 --- a/modules/local/openms/openmspeakpicker/main.nf +++ b/modules/local/openms/openmspeakpicker/main.nf @@ -4,8 +4,8 @@ process OPENMSPEAKPICKER { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(mzml_file) @@ -35,7 +35,7 @@ process OPENMSPEAKPICKER { cat <<-END_VERSIONS > versions.yml "${task.process}": - PeakPickerHiRes: \$(PeakPickerHiRes 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g') + PeakPickerHiRes: \$(PeakPickerHiRes 2>&1 | grep -E '^Version(.*)' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/openms/proteininference/main.nf b/modules/local/openms/proteininference/main.nf index 70830bc9..ccabdd2f 100644 --- a/modules/local/openms/proteininference/main.nf +++ b/modules/local/openms/proteininference/main.nf @@ -3,8 +3,8 @@ process PROTEININFERENCE { conda (params.enable_conda ? "bioconda::openms=2.8.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/openms:2.8.0--h7ca0330_1' : - 'quay.io/biocontainers/openms:2.8.0--h7ca0330_1' }" + 'https://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/tools/ghcr.io-openms-openms-executables-latest.img' : + 'ghcr.io/openms/openms-executables:latest' }" input: tuple val(meta), path(consus_file) @@ -37,7 +37,7 @@ process PROTEININFERENCE { cat <<-END_VERSIONS > versions.yml "${task.process}": - ProteinInference: \$(ProteinInference 2>&1 | grep -E '^Version(.*) ' | sed 's/Version: //g') + ProteinInference: \$(ProteinInference 2>&1 | grep -E '^Version(.*) ' | sed 's/Version: //g' | cut -d ' ' -f 1) END_VERSIONS """ } diff --git a/modules/local/pmultiqc/main.nf b/modules/local/pmultiqc/main.nf index 04f2ed93..96aaa362 100644 --- a/modules/local/pmultiqc/main.nf +++ b/modules/local/pmultiqc/main.nf @@ -1,11 +1,11 @@ process PMULTIQC { label 'process_high' - conda (params.enable_conda ? "conda-forge::pandas_schema conda-forge::lzstring bioconda::pmultiqc=0.0.15" : null) + conda (params.enable_conda ? "conda-forge::pandas_schema conda-forge::lzstring bioconda::pmultiqc=0.0.16" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/pmultiqc:0.0.15--pyhdfd78af_0" + container "https://depot.galaxyproject.org/singularity/pmultiqc:0.0.16--pyhdfd78af_0" } else { - container "quay.io/biocontainers/pmultiqc:0.0.15--pyhdfd78af_0" + container "quay.io/biocontainers/pmultiqc:0.0.16--pyhdfd78af_0" } input: diff --git a/subworkflows/local/file_preparation.nf b/subworkflows/local/file_preparation.nf index 8a71bb1b..4b835ad2 100644 --- a/subworkflows/local/file_preparation.nf +++ b/subworkflows/local/file_preparation.nf @@ -4,6 +4,7 @@ include { THERMORAWFILEPARSER } from '../../modules/local/thermorawfileparser/main' include { MZMLINDEXING } from '../../modules/local/openms/mzmlindexing/main' +include { MZMLSTATISTICS } from '../../modules/local/mzmlstatistics/main' include { OPENMSPEAKPICKER } from '../../modules/local/openms/openmspeakpicker/main' workflow FILE_PREPARATION { @@ -13,6 +14,7 @@ workflow FILE_PREPARATION { main: ch_versions = Channel.empty() ch_results = Channel.empty() + ch_statistics = Channel.empty() // // Divide mzml files @@ -51,6 +53,15 @@ workflow FILE_PREPARATION { ch_versions = ch_versions.mix(MZMLINDEXING.out.version) ch_results = ch_results.mix(MZMLINDEXING.out.mzmls_indexed) + ch_results.multiMap{ + meta: it[0] + mzml: it[1] + }.set{ ch_mzml } + + MZMLSTATISTICS( ch_mzml.mzml.collect() ) + ch_statistics = ch_statistics.mix(MZMLSTATISTICS.out.mzml_statistics) + ch_versions = ch_versions.mix(MZMLSTATISTICS.out.version) + if (params.openms_peakpicking){ OPENMSPEAKPICKER ( ch_results @@ -63,5 +74,6 @@ workflow FILE_PREPARATION { emit: results = ch_results // channel: [val(mzml_id), indexedmzml] + statistics = ch_statistics // channel: [ mzml_statistics.tsv ] version = ch_versions // channel: [ *.version.txt ] } diff --git a/workflows/quantms.nf b/workflows/quantms.nf index 9d14d7d9..c1db8512 100644 --- a/workflows/quantms.nf +++ b/workflows/quantms.nf @@ -102,10 +102,6 @@ workflow QUANTMS { ch_versions = ch_versions.mix(FILE_PREPARATION.out.version.ifEmpty(null)) - FILE_PREPARATION.out.results - .map { it -> it[1] } - .set { ch_pmultiqc_mzmls } - FILE_PREPARATION.out.results .branch { dia: it[0].acquisition_method.contains("dia") @@ -180,6 +176,7 @@ workflow QUANTMS { ch_multiqc_files = Channel.empty() ch_multiqc_files = ch_multiqc_files.mix(Channel.from(ch_multiqc_config)) ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + ch_multiqc_files = ch_multiqc_files.mix(FILE_PREPARATION.out.statistics) ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml')) ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect()) ch_multiqc_quantms_logo = file("$projectDir/assets/nf-core-quantms_logo_light.png") @@ -187,7 +184,6 @@ workflow QUANTMS { SUMMARYPIPELINE ( CREATE_INPUT_CHANNEL.out.ch_expdesign .combine(ch_pipeline_results.ifEmpty([]).combine(ch_multiqc_files.collect()) - .combine(ch_pmultiqc_mzmls.collect()) .combine(ch_ids_pmultiqc.collect().ifEmpty([]))) .combine(ch_msstats_in.ifEmpty([])), ch_multiqc_quantms_logo