From 124aeb107c76366a074f7db3d1aae437064652d5 Mon Sep 17 00:00:00 2001 From: ssnn-airr <20683719+ssnn-airr@users.noreply.github.com> Date: Wed, 6 Apr 2022 10:32:01 +0200 Subject: [PATCH 01/13] Updated docs, to add experimental features (reveal) --- docs/usage.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 92bb3863..1d38b946 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -279,7 +279,28 @@ The UMI barcodes are typically read from an index file but sometimes can be prov - No UMIs in R1 or R2 reads: if no UMIs are present in the samples, specify `--umi_length 0` to use the sans-UMI subworkflow. -### Updating the pipeline +## Experimental features + +We are working on a new subworkflow (`reveal`) to analyze bulk and single cell processed reads. The workflow takes as input assembled reads (`.fasta`) or repertoire `.tsv` (example: 10x `airr.tsv`) files and runs quality controls, and generates reports of clonal analysis and lineage trees. The subworkflow (`--subworkflow reveal`) is under active development, and therefore it is not recommended to use in production. Suggestions and feedback are welcome. + +This subworkflow can be tested with this command: + +```console + nextflow run nf-core/airrflow -profile docker,test_reveal +``` + +An example command to run an analysis: + +``` +nextflow run nf-core/airrflow --subworkflow reveal \ +--input input_samplesheet.tsv \ +--outdir results \ +--reassign --productive_only --remove_chimeric \ +--collapseby filename \ +--cloneby subject_id +``` + +## Updating the pipeline When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline: @@ -287,7 +308,7 @@ When you run the above command, Nextflow automatically pulls the pipeline code f nextflow pull nf-core/airrflow ``` -### Reproducibility +## Reproducibility It is a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since. From 65c04f90ac2e6cf0c57fcb5174f725d44497aed5 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Fri, 22 Apr 2022 16:53:53 +0200 Subject: [PATCH 02/13] add print versions to all modules --- modules/local/alakazam/alakazam_lineage.nf | 7 +++++-- .../local/alakazam/alakazam_shazam_repertoires.nf | 7 ++++++- modules/local/changeo/changeo_assigngenes.nf | 2 +- modules/local/changeo/changeo_buildtrees.nf | 11 ++++++++++- modules/local/changeo/changeo_convertdb_fasta.nf | 3 ++- modules/local/changeo/changeo_creategermlines.nf | 7 +++++++ modules/local/changeo/changeo_defineclones.nf | 7 +++++++ modules/local/changeo/changeo_makedb.nf | 7 +++++++ modules/local/changeo/changeo_parsedb_select.nf | 13 +++++++++++++ modules/local/changeo/changeo_parsedb_split.nf | 1 + modules/local/fetch_databases.nf | 2 ++ modules/local/merge_UMI.nf | 7 +++++++ modules/local/parse_logs.nf | 13 +++++++++++++ modules/local/presto/presto_assemblepairs.nf | 6 ++++++ modules/local/presto/presto_buildconsensus.nf | 7 ++++++- modules/local/presto/presto_clustersets.nf | 1 + modules/local/presto/presto_collapseseq.nf | 7 +++++++ modules/local/presto/presto_maskprimers.nf | 11 +++++++++++ .../presto/presto_maskprimers_postassembly.nf | 14 ++++++++++++-- modules/local/presto/presto_pairseq.nf | 6 ++++++ modules/local/presto/presto_parse_cluster.nf | 7 +++++++ modules/local/presto/presto_parseheaders.nf | 6 ++++++ .../local/presto/presto_parseheaders_metadata.nf | 6 ++++++ .../local/presto/presto_parseheaders_primers.nf | 11 +++++++++++ .../local/presto/presto_postconsensus_pairseq.nf | 6 ++++++ modules/local/presto/presto_splitseq.nf | 7 +++++++ modules/local/samplesheet_check.nf | 3 ++- 27 files changed, 175 insertions(+), 10 deletions(-) diff --git a/modules/local/alakazam/alakazam_lineage.nf b/modules/local/alakazam/alakazam_lineage.nf index c90d7ede..45ca97c1 100644 --- a/modules/local/alakazam/alakazam_lineage.nf +++ b/modules/local/alakazam/alakazam_lineage.nf @@ -2,7 +2,7 @@ process ALAKAZAM_LINEAGE { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda::r-alakazam=1.2.0 bioconda::changeo=1.2.0 bioconda::phylip=3.697" : null) // Conda package + conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda::r-alakazam=1.2.0 bioconda::changeo=1.2.0 bioconda::phylip=3.697" : null) // Please also update the phylip version manually in the script section below as phylip does not print the version container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-afe1e5f3879e265b14ec08dd3a1875df9c23630d:d6b54b0fae81ec8e55d41b5ea9cc8f39d75cf2d7-0' : 'quay.io/biocontainers/mulled-v2-afe1e5f3879e265b14ec08dd3a1875df9c23630d:d6b54b0fae81ec8e55d41b5ea9cc8f39d75cf2d7-0' }" @@ -12,7 +12,7 @@ process ALAKAZAM_LINEAGE { output: tuple val(meta), path("${tab}"), emit: tab - path("versions.yml"), emit: versions + path "versions.yml" , emit: versions path("*.tsv") path("Clone_tree_plots/*.pdf") path("Graphml_trees/All_graphs_patient.graphml") @@ -26,7 +26,10 @@ process ALAKAZAM_LINEAGE { cat <<-END_VERSIONS > versions.yml "${task.process}": + R: \$(echo \$(R --version 2>&1) | awk -F' ' '{print \$3}') alakazam: \$(Rscript -e "library(alakazam); cat(paste(packageVersion('alakazam'), collapse='.'))") + changeo: \$( AssignGenes.py --version | awk -F' ' '{print \$2}' ) + pyhlip: 3.697 END_VERSIONS """ diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index 2afdb6fd..4ae89743 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -13,7 +13,7 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { path(repertoire_report) output: - path("versions.yml"), emit: versions + path "versions.yml" , emit: versions path("repertoire_comparison") path("Bcellmagic_report.html") @@ -25,6 +25,11 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { "${task.process}": alakazam: \$(Rscript -e "library(alakazam); cat(paste(packageVersion('alakazam'), collapse='.'))") shazam: \$(Rscript -e "library(shazam); cat(paste(packageVersion('shazam'), collapse='.'))") + stringr: \$(Rscript -e "library(stringr); cat(paste(packageVersion('stringr'), collapse='.'))") + kableextra: \$(Rscript -e "library(kableextra); cat(paste(packageVersion('kableextra'), collapse='.'))") + stringr: \$(Rscript -e "library(stringr); cat(paste(packageVersion('stringr'), collapse='.'))") + dplyr: \$(Rscript -e "library(dplyr); cat(paste(packageVersion('dplyr'), collapse='.'))") + knitr: \$(Rscript -e "library(knitr); cat(paste(packageVersion('knitr'), collapse='.'))") R: \$(echo \$(R --version 2>&1) | awk -F' ' '{print \$3}') END_VERSIONS """ diff --git a/modules/local/changeo/changeo_assigngenes.nf b/modules/local/changeo/changeo_assigngenes.nf index b5db2ffc..64aca4df 100644 --- a/modules/local/changeo/changeo_assigngenes.nf +++ b/modules/local/changeo/changeo_assigngenes.nf @@ -2,7 +2,7 @@ process CHANGEO_ASSIGNGENES { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) // Conda package + conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' : 'quay.io/biocontainers/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' }" diff --git a/modules/local/changeo/changeo_buildtrees.nf b/modules/local/changeo/changeo_buildtrees.nf index 87143b89..597cea84 100644 --- a/modules/local/changeo/changeo_buildtrees.nf +++ b/modules/local/changeo/changeo_buildtrees.nf @@ -2,7 +2,7 @@ process CHANGEO_BUILDTREES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda:r-alakazam=1.2.0 bioconda::changeo=1.2.0 bioconda::igphyml=1.1.3" : null) // Conda package + conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda:r-alakazam=1.2.0 bioconda::changeo=1.2.0 bioconda::igphyml=1.1.3" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d432bd3f78aaba1be2f7eb105c18998acb64d739:2c83ca89e577c8839f746f0fe4a6c63ef5984b99-0' : 'quay.io/biocontainers/mulled-v2-d432bd3f78aaba1be2f7eb105c18998acb64d739:2c83ca89e577c8839f746f0fe4a6c63ef5984b99-0' }" @@ -12,10 +12,19 @@ process CHANGEO_BUILDTREES { output: tuple val(meta), path("*_lineages.tsv") + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' """ BuildTrees.py -d ${tab} --outname ${meta.id} --log ${meta.id}.log --nproc $task.cpus $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + R: \$(echo \$(R --version 2>&1) | awk -F' ' '{print \$3}') + alakazam: \$(Rscript -e "library(alakazam); cat(paste(packageVersion('alakazam'), collapse='.'))") + changeo: \$(AssignGenes.py --version | awk -F' ' '{print \$2}') + igphyml: \$(igphyml --version | grep -o "IgPhyML [0-9\\. ]\\+" | grep -o "[0-9\\. ]\\+") + END_VERSIONS """ } diff --git a/modules/local/changeo/changeo_convertdb_fasta.nf b/modules/local/changeo/changeo_convertdb_fasta.nf index 52283dd3..12e93516 100644 --- a/modules/local/changeo/changeo_convertdb_fasta.nf +++ b/modules/local/changeo/changeo_convertdb_fasta.nf @@ -23,7 +23,8 @@ process CHANGEO_CONVERTDB_FASTA { cat <<-END_VERSIONS > versions.yml "${task.process}": - changeo: \$( ConvertDb.py --version | awk -F' ' '{print \$2}' ) + igblastn: \$( igblastn -version | grep -o "igblast[0-9\\. ]\\+" | grep -o "[0-9\\. ]\\+" ) + changeo: \$( ConvertDb.py --version | awk -F' ' '{print \$2}' ) END_VERSIONS """ } diff --git a/modules/local/changeo/changeo_creategermlines.nf b/modules/local/changeo/changeo_creategermlines.nf index 0ccd3d52..287e7862 100644 --- a/modules/local/changeo/changeo_creategermlines.nf +++ b/modules/local/changeo/changeo_creategermlines.nf @@ -14,6 +14,7 @@ process CHANGEO_CREATEGERMLINES { output: tuple val(meta), path("*germ-pass.tsv"), emit: tab path("*_command_log.txt"), emit: logs + path "versions.yml" , emit: versions script: """ @@ -22,5 +23,11 @@ process CHANGEO_CREATEGERMLINES { --format airr \\ --log ${meta.id}.log --outname ${meta.id} > ${meta.id}_command_log.txt ParseLog.py -l ${meta.id}.log -f ID V_CALL D_CALL J_CALL + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + igblastn: \$( igblastn -version | grep -o "igblast[0-9\\. ]\\+" | grep -o "[0-9\\. ]\\+" ) + changeo: \$( CreateGermlines.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/changeo/changeo_defineclones.nf b/modules/local/changeo/changeo_defineclones.nf index a79a8ab0..f1bdec4c 100644 --- a/modules/local/changeo/changeo_defineclones.nf +++ b/modules/local/changeo/changeo_defineclones.nf @@ -14,6 +14,7 @@ process CHANGEO_DEFINECLONES { output: tuple val(meta), path("*clone-pass.tsv"), emit: tab // sequence tsv table in AIRR format path "*_command_log.txt" , emit: logs + path "versions.yml" , emit: versions script: if (params.set_cluster_threshold) { @@ -25,5 +26,11 @@ process CHANGEO_DEFINECLONES { """ DefineClones.py -d $tab --act set --model ham --norm len --nproc $task.cpus --dist $thr --outname ${meta.id} --log ${meta.id}.log > "${meta.id}_command_log.txt" ParseLog.py -l "${meta.id}.log" -f id v_call j_call junction_length cloned filtered clones + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + igblastn: \$( igblastn -version | grep -o "igblast[0-9\\. ]\\+" | grep -o "[0-9\\. ]\\+" ) + changeo: \$( DefineClones.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/changeo/changeo_makedb.nf b/modules/local/changeo/changeo_makedb.nf index db9cc4ea..842bfa72 100644 --- a/modules/local/changeo/changeo_makedb.nf +++ b/modules/local/changeo/changeo_makedb.nf @@ -16,6 +16,7 @@ process CHANGEO_MAKEDB { output: tuple val(meta), path("*db-pass.tsv"), emit: tab //sequence table in AIRR format path("*_command_log.txt"), emit: logs //process logs + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' @@ -24,5 +25,11 @@ process CHANGEO_MAKEDB { ${imgt_base}/${meta.species.toLowerCase()}/vdj/ \\ $args \\ --outname "${meta.id}" > "${meta.id}_command_log.txt" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + igblastn: \$( igblastn -version | grep -o "igblast[0-9\\. ]\\+" | grep -o "[0-9\\. ]\\+" ) + changeo: \$( MakeDb.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/changeo/changeo_parsedb_select.nf b/modules/local/changeo/changeo_parsedb_select.nf index 815b0987..781b9066 100644 --- a/modules/local/changeo/changeo_parsedb_select.nf +++ b/modules/local/changeo/changeo_parsedb_select.nf @@ -13,6 +13,7 @@ process CHANGEO_PARSEDB_SELECT { output: tuple val(meta), path("*parse-select.tsv"), emit: tab // sequence tsv in AIRR format path("*_command_log.txt"), emit: logs //process logs + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' @@ -20,10 +21,22 @@ process CHANGEO_PARSEDB_SELECT { if (meta.locus == 'IG'){ """ ParseDb.py select -d $tab $args --outname ${meta.id} > "${meta.id}_command_log.txt" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + igblastn: \$( igblastn -version | grep -o "igblast[0-9\\. ]\\+" | grep -o "[0-9\\. ]\\+" ) + changeo: \$( ParseDb.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } else if (meta.locus == 'TR'){ """ ParseDb.py select -d $tab $args2 --outname ${meta.id} > "${meta.id}_command_log.txt" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + igblastn: \$( igblastn -version | grep -o "igblast[0-9\\. ]\\+" | grep -o "[0-9\\. ]\\+" ) + changeo: \$( ParseDb.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } } diff --git a/modules/local/changeo/changeo_parsedb_split.nf b/modules/local/changeo/changeo_parsedb_split.nf index 4d624cc1..c5ed7b74 100644 --- a/modules/local/changeo/changeo_parsedb_split.nf +++ b/modules/local/changeo/changeo_parsedb_split.nf @@ -19,6 +19,7 @@ process CHANGEO_PARSEDB_SPLIT { script: """ ParseDb.py split -d $tab -f productive --outname ${meta.id} > "${meta.id}_split_command_log.txt" + cat <<-END_VERSIONS > versions.yml "${task.process}": changeo: \$( ParseDb.py --version | awk -F' ' '{print \$2}' ) diff --git a/modules/local/fetch_databases.nf b/modules/local/fetch_databases.nf index 71b134a5..00fd24f2 100644 --- a/modules/local/fetch_databases.nf +++ b/modules/local/fetch_databases.nf @@ -20,6 +20,8 @@ process FETCH_DATABASES { cat <<-END_VERSIONS > versions.yml "${task.process}": IMGT download date: \$( echo \$(date "+%F") ) + igblastn: \$( igblastn -version | grep -o "igblast[0-9\\. ]\\+" | grep -o "[0-9\\. ]\\+" ) + changeo: \$( AssignGenes.py --version | awk -F' ' '{print \$2}' ) END_VERSIONS """ } diff --git a/modules/local/merge_UMI.nf b/modules/local/merge_UMI.nf index 2e336184..8849f189 100644 --- a/modules/local/merge_UMI.nf +++ b/modules/local/merge_UMI.nf @@ -13,11 +13,18 @@ process MERGE_UMI { output: tuple val(meta), path('*_R1.fastq.gz'), path('*_R2.fastq.gz') , emit: reads + path "versions.yml" , emit: versions script: """ merge_R1_umi.py -R1 "${R1}" -I1 "${I1}" -o UMI_R1.fastq.gz --umi_start $params.umi_start --umi_length $params.umi_length mv "UMI_R1.fastq.gz" "${meta.id}_UMI_R1.fastq.gz" mv "${R2}" "${meta.id}_R2.fastq.gz" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + python: \$( echo \$(python --version | grep -o "[0-9\\. ]\\+") ) + biopython: \$(echo \$(python -c "import pkg_resources; print(pkg_resources.get_distribution('biopython').version)")) + END_VERSIONS """ } diff --git a/modules/local/parse_logs.nf b/modules/local/parse_logs.nf index 15fcacde..11803218 100644 --- a/modules/local/parse_logs.nf +++ b/modules/local/parse_logs.nf @@ -26,16 +26,29 @@ process PARSE_LOGS { output: path "Table_sequences_process.tsv", emit: logs path "Table*.tsv", emit:tables + path "versions.yml" , emit: versions script: if (params.umi_length == 0) { """ log_parsing_no-umi.py + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + python: \$( echo \$(python --version | grep -o "[0-9\\. ]\\+") ) + pandas: \$(echo \$(python -c "import pkg_resources; print(pkg_resources.get_distribution('pandas').version)")) + END_VERSIONS """ } else { def clustersets = params.cluster_sets? "--cluster_sets":"" """ log_parsing.py $clustersets + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + python: \$( echo \$(python --version | grep -o "[0-9\\. ]\\+") ) + pandas: \$(echo \$(python -c "import pkg_resources; print(pkg_resources.get_distribution('pandas').version)")) + END_VERSIONS """ } } diff --git a/modules/local/presto/presto_assemblepairs.nf b/modules/local/presto/presto_assemblepairs.nf index bc8f1bba..88e7bf7f 100644 --- a/modules/local/presto/presto_assemblepairs.nf +++ b/modules/local/presto/presto_assemblepairs.nf @@ -15,6 +15,7 @@ process PRESTO_ASSEMBLEPAIRS { path("*_command_log.txt"), emit: logs path("*.log") path("*_table.tab") + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' @@ -24,5 +25,10 @@ process PRESTO_ASSEMBLEPAIRS { $args \\ --outname ${meta.id} --log ${meta.id}.log > ${meta.id}_command_log.txt ParseLog.py -l "${meta.id}.log" $args2 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( AssemblePairs.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_buildconsensus.nf b/modules/local/presto/presto_buildconsensus.nf index 4a5c6a3a..52df4321 100644 --- a/modules/local/presto/presto_buildconsensus.nf +++ b/modules/local/presto/presto_buildconsensus.nf @@ -16,7 +16,7 @@ process PRESTO_BUILDCONSENSUS { path("*_R1.log") path("*_R2.log") path("*.tab"), emit: log_tab - + path "versions.yml" , emit: versions script: def barcode_field = params.cluster_sets ? "CLUSTER" : "BARCODE" @@ -24,5 +24,10 @@ process PRESTO_BUILDCONSENSUS { BuildConsensus.py -s $R1 --bf ${barcode_field} --nproc ${task.cpus} --pf PRIMER --prcons $params.primer_consensus --maxerror $params.buildconsensus_maxerror --maxgap $params.buildconsensus_maxgap --outname ${meta.id}_R1 --log ${meta.id}_R1.log > "${meta.id}_command_log.txt" BuildConsensus.py -s $R2 --bf ${barcode_field} --nproc ${task.cpus} --pf PRIMER --prcons $params.primer_consensus --maxerror $params.buildconsensus_maxerror --maxgap $params.buildconsensus_maxgap --outname ${meta.id}_R2 --log ${meta.id}_R2.log >> "${meta.id}_command_log.txt" ParseLog.py -l "${meta.id}_R1.log" "${meta.id}_R2.log" -f ID BARCODE SEQCOUNT PRIMER PRCOUNT PRCONS PRFREQ CONSCOUNT + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( BuildConsensus.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_clustersets.nf b/modules/local/presto/presto_clustersets.nf index 4be1ee54..1e9e0997 100644 --- a/modules/local/presto/presto_clustersets.nf +++ b/modules/local/presto/presto_clustersets.nf @@ -25,6 +25,7 @@ process PRESTO_CLUSTERSETS { cat <<-END_VERSIONS > versions.yml "${task.process}": + presto: \$( ClusterSets.py --version | awk -F' ' '{print \$2}' ) vsearch: \$( vsearch --version &> vsearch.txt; cat vsearch.txt | head -n 1 | grep -o 'v[0-9\\.]\\+' ) END_VERSIONS """ diff --git a/modules/local/presto/presto_collapseseq.nf b/modules/local/presto/presto_collapseseq.nf index e88a31e2..b17129dc 100644 --- a/modules/local/presto/presto_collapseseq.nf +++ b/modules/local/presto/presto_collapseseq.nf @@ -15,6 +15,8 @@ process PRESTO_COLLAPSESEQ { path("*_command_log.txt") , emit: logs path("*.log") path("*_table.tab") + path("versions.yml"), emit: versions + script: @@ -23,5 +25,10 @@ process PRESTO_COLLAPSESEQ { """ CollapseSeq.py -s $reads $args --outname ${meta.id} --log ${meta.id}.log > "${meta.id}_command_log.txt" ParseLog.py -l "${meta.id}.log" $args2 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( CollapseSeq.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_maskprimers.nf b/modules/local/presto/presto_maskprimers.nf index 873d8eca..6415157e 100644 --- a/modules/local/presto/presto_maskprimers.nf +++ b/modules/local/presto/presto_maskprimers.nf @@ -18,6 +18,7 @@ process PRESTO_MASKPRIMERS { path "*_R1.log" path "*_R2.log" path "*.tab", emit: log_tab + path "versions.yml" , emit: versions script: @@ -29,6 +30,11 @@ process PRESTO_MASKPRIMERS { MaskPrimers.py score --nproc ${task.cpus} -s $R1 -p ${cprimers} $primer_start_R1 $revpr --maxerror ${params.primer_maxerror} --mode ${params.primer_mask_mode} --outname ${meta.id}_R1 --log ${meta.id}_R1.log > "${meta.id}_command_log.txt" MaskPrimers.py score --nproc ${task.cpus} -s $R2 -p ${vprimers} $primer_start_R2 $revpr --maxerror ${params.primer_maxerror} --mode ${params.primer_mask_mode} --outname ${meta.id}_R2 --log ${meta.id}_R2.log >> "${meta.id}_command_log.txt" ParseLog.py -l "${meta.id}_R1.log" "${meta.id}_R2.log" -f ID PRIMER ERROR + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( MaskPrimers.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } else if (params.cprimer_position == "R2") { def primer_start_R1 = (params.index_file | params.umi_position == 'R1') ? "--start ${params.umi_length + params.vprimer_start} --barcode" : "--start ${params.vprimer_start}" @@ -37,6 +43,11 @@ process PRESTO_MASKPRIMERS { MaskPrimers.py score --nproc ${task.cpus} -s $R1 -p ${vprimers} $primer_start_R1 $revpr --maxerror ${params.primer_maxerror} --mode ${params.primer_mask_mode} --outname ${meta.id}_R1 --log ${meta.id}_R1.log > "${meta.id}_command_log.txt" MaskPrimers.py score --nproc ${task.cpus} -s $R2 -p ${cprimers} $primer_start_R2 $revpr --maxerror ${params.primer_maxerror} --mode ${params.primer_mask_mode} --outname ${meta.id}_R2 --log ${meta.id}_R2.log >> "${meta.id}_command_log.txt" ParseLog.py -l "${meta.id}_R1.log" "${meta.id}_R2.log" -f ID PRIMER ERROR + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( MaskPrimers.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } else { exit 1, "Error in determining cprimer position. Please choose R1 or R2." diff --git a/modules/local/presto/presto_maskprimers_postassembly.nf b/modules/local/presto/presto_maskprimers_postassembly.nf index c14a242a..e90942cf 100644 --- a/modules/local/presto/presto_maskprimers_postassembly.nf +++ b/modules/local/presto/presto_maskprimers_postassembly.nf @@ -2,7 +2,7 @@ process PRESTO_MASKPRIMERS_POSTASSEMBLY { tag "$meta.id" label "process_high" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" @@ -17,7 +17,7 @@ process PRESTO_MASKPRIMERS_POSTASSEMBLY { path "*command_log.txt", emit: logs path "*.log" path "*.tab", emit: log_tab - + path "versions.yml" , emit: versions script: def revpr = params.primer_revpr ? '--revpr' : '' @@ -30,6 +30,11 @@ process PRESTO_MASKPRIMERS_POSTASSEMBLY { --mode ${params.primer_mask_mode} --outname ${meta.id}-REV $revpr \ --log ${meta.id}-REV.log >> "${meta.id}_command_log.txt" ParseLog.py -l "${meta.id}-FWD.log" "${meta.id}-REV.log" -f ID PRIMER ERROR + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( MaskPrimers.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } else if (params.cprimer_position == "R2") { """ @@ -40,6 +45,11 @@ process PRESTO_MASKPRIMERS_POSTASSEMBLY { --mode ${params.primer_mask_mode} --outname ${meta.id}-REV $revpr \ --log ${meta.id}-REV.log >> "${meta.id}_command_log.txt" ParseLog.py -l "${meta.id}-FWD.log" "${meta.id}-REV.log" -f ID PRIMER ERROR + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( MaskPrimers.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } else { exit 1, "Error in determining cprimer positon." diff --git a/modules/local/presto/presto_pairseq.nf b/modules/local/presto/presto_pairseq.nf index 575641a2..852b6c8d 100644 --- a/modules/local/presto/presto_pairseq.nf +++ b/modules/local/presto/presto_pairseq.nf @@ -13,10 +13,16 @@ process PRESTO_PAIRSEQ { output: tuple val(meta), path("*R1_pair-pass.fastq"), path("*R2_pair-pass.fastq") , emit: reads path "*_command_log.txt", emit: logs + path "versions.yml" , emit: versions script: def copyfield = (params.index_file | params.umi_position == 'R1') ? "--1f BARCODE" : "--2f BARCODE" """ PairSeq.py -1 '${meta.id}_R1.fastq' -2 '${meta.id}_R2.fastq' $copyfield --coord illumina > "${meta.id}_command_log.txt" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( PairSeq.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_parse_cluster.nf b/modules/local/presto/presto_parse_cluster.nf index d3693426..aa1b5723 100644 --- a/modules/local/presto/presto_parse_cluster.nf +++ b/modules/local/presto/presto_parse_cluster.nf @@ -13,10 +13,17 @@ process PRESTO_PARSE_CLUSTER { output: tuple val(meta), path("*R1_cluster-pass_reheader.fastq"), path("*R2_cluster-pass_reheader.fastq"), emit: reads path("*_log.txt"), emit: logs + path "versions.yml" , emit: versions + script: """ ParseHeaders.py copy -s $R1 -f BARCODE -k CLUSTER --act cat > "${meta.id}_command_log.txt" ParseHeaders.py copy -s $R2 -f BARCODE -k CLUSTER --act cat >> "${meta.id}_command_log.txt" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( ParseHeaders.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_parseheaders.nf b/modules/local/presto/presto_parseheaders.nf index 347f09cb..8c30af56 100644 --- a/modules/local/presto/presto_parseheaders.nf +++ b/modules/local/presto/presto_parseheaders.nf @@ -12,11 +12,17 @@ process PRESTO_PARSEHEADERS { output: tuple val(meta), path("*_reheader-pass.fastq"), emit: reads + path "versions.yml" , emit: versions script: def subcommand = task.ext.subcommand?: '' def args = task.ext.args?: '' """ ParseHeaders.py $subcommand -s $reads -o "${reads.baseName}_reheader-pass.fastq" $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( ParseHeaders.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_parseheaders_metadata.nf b/modules/local/presto/presto_parseheaders_metadata.nf index 3bbcf288..5fd77b47 100644 --- a/modules/local/presto/presto_parseheaders_metadata.nf +++ b/modules/local/presto/presto_parseheaders_metadata.nf @@ -12,10 +12,16 @@ process PRESTO_PARSEHEADERS_METADATA { output: tuple val(meta), path("*_reheader-pass.fastq"), emit: reads + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' """ ParseHeaders.py add -s $reads -o "${reads.baseName}_reheader-pass.fastq" $args -u ${meta.id} ${meta.subject} ${meta.species} ${meta.locus} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( ParseHeaders.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_parseheaders_primers.nf b/modules/local/presto/presto_parseheaders_primers.nf index 717d68e0..bbdfbc76 100644 --- a/modules/local/presto/presto_parseheaders_primers.nf +++ b/modules/local/presto/presto_parseheaders_primers.nf @@ -12,16 +12,27 @@ process PRESTO_PARSEHEADERS_PRIMERS { output: tuple val(meta), path("*_reheader-pass.fastq"), emit: reads + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' if (params.cprimer_position == "R1") { """ ParseHeaders.py copy -s $reads -o "${reads.baseName}_reheader-pass.fastq" -f $args --act first last -k C_PRIMER V_PRIMER + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( ParseHeaders.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } else if (params.cprimer_position == "R2") { """ ParseHeaders.py copy -s $reads -o "${reads.baseName}_reheader-pass.fastq" -f $args --act first last -k V_PRIMER C_PRIMER + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( ParseHeaders.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_postconsensus_pairseq.nf b/modules/local/presto/presto_postconsensus_pairseq.nf index c1688e37..00c7c960 100644 --- a/modules/local/presto/presto_postconsensus_pairseq.nf +++ b/modules/local/presto/presto_postconsensus_pairseq.nf @@ -13,9 +13,15 @@ process PRESTO_POSTCONSENSUS_PAIRSEQ { output: tuple val(meta), path("*R1_pair-pass.fastq"), path("*R2_pair-pass.fastq") , emit: reads path "*_command_log.txt", emit: logs + path "versions.yml" , emit: versions script: """ PairSeq.py -1 '${meta.id}_R1.fastq' -2 '${meta.id}_R2.fastq' --coord presto > "${meta.id}_command_log.txt" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( PairSeq.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/presto/presto_splitseq.nf b/modules/local/presto/presto_splitseq.nf index 981c4867..801d7e97 100644 --- a/modules/local/presto/presto_splitseq.nf +++ b/modules/local/presto/presto_splitseq.nf @@ -1,5 +1,6 @@ process PRESTO_SPLITSEQ { tag "$meta.id" + label "process_low" conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -12,6 +13,7 @@ process PRESTO_SPLITSEQ { output: tuple val(meta), path("*_atleast-2.fasta"), emit: fasta path("*_command_log.txt"), emit: logs + path "versions.yml" , emit: versions script: def args = task.ext.args ?: '' @@ -20,5 +22,10 @@ process PRESTO_SPLITSEQ { $args \\ --outname ${meta.id} \\ --fasta > "${meta.id}_command_log.txt" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + presto: \$( SplitSeq.py --version | awk -F' ' '{print \$2}' ) + END_VERSIONS """ } diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index bc5bb36f..cede7d97 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -20,7 +20,8 @@ process SAMPLESHEET_CHECK { cat <<-END_VERSIONS > versions.yml "${task.process}": - python: \$(python --version | sed 's/Python //g') + python: \$( echo \$(python --version | grep -o "[0-9\\. ]\\+") ) + pandas: \$(echo \$(python -c "import pkg_resources; print(pkg_resources.get_distribution('pandas').version)")) END_VERSIONS """ } From 2646359ba58f4b40adaf0504b00b8f512162a8fd Mon Sep 17 00:00:00 2001 From: ggabernet Date: Fri, 22 Apr 2022 16:54:53 +0200 Subject: [PATCH 03/13] add label process --- modules/local/samplesheet_check.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index cede7d97..5cd55adb 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -1,5 +1,6 @@ process SAMPLESHEET_CHECK { tag "$samplesheet" + label 'single_cpu' conda (params.enable_conda ? "conda-forge::pandas=1.1.5" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? From 4e2c164a090d2861b16fc4c3ed52c1a2c27d7a56 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Fri, 22 Apr 2022 17:15:56 +0200 Subject: [PATCH 04/13] add versions parsing --- subworkflows/local/presto_sans_umi.nf | 7 +++++++ subworkflows/local/presto_umi.nf | 17 +++++++++++++++-- workflows/bcellmagic.nf | 21 +++++++++++++++------ 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/subworkflows/local/presto_sans_umi.nf b/subworkflows/local/presto_sans_umi.nf index 2c559ac8..3d310ab3 100644 --- a/subworkflows/local/presto_sans_umi.nf +++ b/subworkflows/local/presto_sans_umi.nf @@ -32,6 +32,7 @@ workflow PRESTO_SANS_UMI { PRESTO_ASSEMBLEPAIRS_SANS_UMI ( GUNZIP_SANS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_ASSEMBLEPAIRS_SANS_UMI.out.versions.ifEmpty(null)) // Filter sequences by quality score PRESTO_FILTERSEQ_POSTASSEMBLY_SANS_UMI ( @@ -45,31 +46,37 @@ workflow PRESTO_SANS_UMI { ch_cprimers.collect(), ch_vprimers.collect() ) + ch_versions = ch_versions.mix(PRESTO_MASKPRIMERS_POSTASSEMBLY_SANS_UMI.out.versions.ifEmpty(null)) // Generate QC stats after reads paired and filtered but before collapsed FASTQC_POSTASSEMBLY_SANS_UMI ( PRESTO_MASKPRIMERS_POSTASSEMBLY_SANS_UMI.out.reads ) + ch_versions = ch_versions.mix(FASTQC_POSTASSEMBLY_SANS_UMI.out.versions.ifEmpty(null)) // Annotate primers in C_PRIMER and V_PRIMER field PRESTO_PARSEHEADERS_PRIMERS_SANS_UMI ( PRESTO_MASKPRIMERS_POSTASSEMBLY_SANS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_PARSEHEADERS_PRIMERS_SANS_UMI.out.versions.ifEmpty(null)) // Annotate metadata on primer headers PRESTO_PARSEHEADERS_METADATA_SANS_UMI ( PRESTO_PARSEHEADERS_PRIMERS_SANS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_PARSEHEADERS_METADATA_SANS_UMI.out.versions.ifEmpty(null)) // Mark and count duplicate sequences (DUPCOUNT) PRESTO_COLLAPSESEQ_SANS_UMI ( PRESTO_PARSEHEADERS_METADATA_SANS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_COLLAPSESEQ_SANS_UMI.out.versions.ifEmpty(null)) // Filter out sequences with less than 2 representative duplicates PRESTO_SPLITSEQ_SANS_UMI ( PRESTO_COLLAPSESEQ_SANS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_SPLITSEQ_SANS_UMI.out.versions.ifEmpty(null)) emit: fasta = PRESTO_SPLITSEQ_SANS_UMI.out.fasta diff --git a/subworkflows/local/presto_umi.nf b/subworkflows/local/presto_umi.nf index e6aba1e0..55a1cc39 100644 --- a/subworkflows/local/presto_umi.nf +++ b/subworkflows/local/presto_umi.nf @@ -32,10 +32,11 @@ workflow PRESTO_UMI { // Merge UMI from index file to R1 if provided if (params.index_file) { MERGE_UMI ( ch_reads ) - .set{ ch_gunzip } + ch_gunzip = MERGE_UMI.out.reads + ch_versions = ch_versions.mix(MERGE_UMI.out.versions.ifEmpty(null)) } else { RENAME_FASTQ_UMI ( ch_reads ) - .set{ ch_gunzip } + ch_gunzip = RENAME_FASTQ_UMI.out.reads } // gunzip fastq.gz to fastq @@ -52,11 +53,13 @@ workflow PRESTO_UMI { ch_cprimers.collect(), ch_vprimers.collect() ) + ch_versions = ch_versions.mix(PRESTO_MASKPRIMERS_UMI.out.versions.ifEmpty(null)) // Pre-consensus pair PRESTO_PAIRSEQ_UMI ( PRESTO_MASKPRIMERS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_PAIRSEQ_UMI.out.versions.ifEmpty(null)) if (params.cluster_sets) { @@ -70,6 +73,7 @@ workflow PRESTO_UMI { PRESTO_PARSE_CLUSTER_UMI ( PRESTO_CLUSTERSETS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_PARSE_CLUSTER_UMI.out.versions.ifEmpty(null)) ch_for_buildconsensus = PRESTO_PARSE_CLUSTER_UMI.out.reads ch_clustersets_logs = PRESTO_CLUSTERSETS_UMI.out.logs.collect() @@ -82,46 +86,55 @@ workflow PRESTO_UMI { PRESTO_BUILDCONSENSUS_UMI ( ch_for_buildconsensus ) + ch_versions = ch_versions.mix(PRESTO_BUILDCONSENSUS_UMI.out.versions.ifEmpty(null)) // Post-consensus pair PRESTO_POSTCONSENSUS_PAIRSEQ_UMI ( PRESTO_BUILDCONSENSUS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_POSTCONSENSUS_PAIRSEQ_UMI.out.versions.ifEmpty(null)) // Assemble read pairs PRESTO_ASSEMBLEPAIRS_UMI ( PRESTO_POSTCONSENSUS_PAIRSEQ_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_ASSEMBLEPAIRS_UMI.out.versions.ifEmpty(null)) // Generate QC stats after reads paired and filtered but before collapsed FASTQC_POSTASSEMBLY_UMI ( PRESTO_ASSEMBLEPAIRS_UMI.out.reads ) + ch_versions = ch_versions.mix(FASTQC_POSTASSEMBLY_UMI.out.versions.ifEmpty(null)) // Combine UMI duplicate count PRESTO_PARSEHEADERS_COLLAPSE_UMI ( PRESTO_ASSEMBLEPAIRS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_PARSEHEADERS_COLLAPSE_UMI.out.versions.ifEmpty(null)) // Annotate primers in C_PRIMER and V_PRIMER field PRESTO_PARSEHEADERS_PRIMERS_UMI ( PRESTO_PARSEHEADERS_COLLAPSE_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_PARSEHEADERS_PRIMERS_UMI.out.versions.ifEmpty(null)) // Annotate metadata on primer headers PRESTO_PARSEHEADERS_METADATA_UMI ( PRESTO_PARSEHEADERS_PRIMERS_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_PARSEHEADERS_METADATA_UMI.out.versions.ifEmpty(null)) // Mark and count duplicate sequences with different UMI barcodes (DUPCOUNT) PRESTO_COLLAPSESEQ_UMI ( PRESTO_PARSEHEADERS_METADATA_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_COLLAPSESEQ_UMI.out.versions.ifEmpty(null)) // Filter out sequences with less than 2 representative duplicates with different UMIs PRESTO_SPLITSEQ_UMI ( PRESTO_COLLAPSESEQ_UMI.out.reads ) + ch_versions = ch_versions.mix(PRESTO_SPLITSEQ_UMI.out.versions.ifEmpty(null)) emit: fasta = PRESTO_SPLITSEQ_UMI.out.fasta diff --git a/workflows/bcellmagic.nf b/workflows/bcellmagic.nf index 41792902..6c77880d 100644 --- a/workflows/bcellmagic.nf +++ b/workflows/bcellmagic.nf @@ -282,21 +282,25 @@ workflow BCELLMAGIC { CHANGEO_ASSIGNGENES.out.blast, ch_imgt.collect() ) + ch_versions = ch_versions.mix(CHANGEO_MAKEDB.out.versions.ifEmpty(null)) // Select only productive sequences. CHANGEO_PARSEDB_SPLIT ( CHANGEO_MAKEDB.out.tab ) + ch_versions = ch_versions.mix(CHANGEO_PARSEDB_SPLIT.out.versions.ifEmpty(null)) // Selecting IGH for ig loci, TR for tr loci. CHANGEO_PARSEDB_SELECT( CHANGEO_PARSEDB_SPLIT.out.tab ) + ch_versions = ch_versions.mix(CHANGEO_PARSEDB_SELECT.out.versions.ifEmpty(null)) // Convert sequence table to fasta. CHANGEO_CONVERTDB_FASTA ( CHANGEO_PARSEDB_SELECT.out.tab ) + ch_versions = ch_versions.mix(CHANGEO_CONVERTDB_FASTA.out.versions.ifEmpty(null)) // Subworkflow: merge tables from the same patient MERGE_TABLES_WF(CHANGEO_PARSEDB_SELECT.out.tab) @@ -321,19 +325,22 @@ workflow BCELLMAGIC { ch_tab_for_changeo_defineclones, ch_threshold, ) + ch_versions = ch_versions.mix(CHANGEO_DEFINECLONES.out.versions.ifEmpty(null)) + // Identify germline sequences CHANGEO_CREATEGERMLINES( CHANGEO_DEFINECLONES.out.tab, ch_imgt.collect() ) + ch_versions = ch_versions.mix(CHANGEO_CREATEGERMLINES.out.versions.ifEmpty(null)) // Lineage reconstruction alakazam if (!params.skip_lineage) { ALAKAZAM_LINEAGE( CHANGEO_CREATEGERMLINES.out.tab.dump(tag:'creategermlines_output') ) - ch_versions = ch_versions.mix(ALAKAZAM_LINEAGE.out.versions.ifEmpty(null)).dump() + ch_versions = ch_versions.mix(ALAKAZAM_LINEAGE.out.versions.ifEmpty(null)) } ch_all_tabs_repertoire = CHANGEO_CREATEGERMLINES.out.tab @@ -357,6 +364,7 @@ workflow BCELLMAGIC { CHANGEO_CREATEGERMLINES.out.logs.collect(), ch_input ) + ch_versions = ch_versions.mix(PARSE_LOGS.out.versions.ifEmpty(null)) // Alakazam shazam repertoire comparison report if (!params.skip_report){ @@ -365,13 +373,9 @@ workflow BCELLMAGIC { PARSE_LOGS.out.logs.collect(), ch_rmarkdown_report.collect() ) + ch_versions = ch_versions.mix(ALAKAZAM_SHAZAM_REPERTOIRES.out.versions.ifEmpty(null)) } - // Software versions - CUSTOM_DUMPSOFTWAREVERSIONS ( - ch_versions.unique().collectFile(name: 'collated_versions.yml') - ) - // // MODULE: MultiQC // @@ -394,6 +398,11 @@ workflow BCELLMAGIC { multiqc_report = MULTIQC.out.report.toList() ch_versions = ch_versions.mix( MULTIQC.out.versions ) } + + // Software versions + CUSTOM_DUMPSOFTWAREVERSIONS ( + ch_versions.unique().collectFile(name: 'collated_versions.yml') + ) } /* From b4282bfd7b3dbed884782d97feb04a34cc4a7e5f Mon Sep 17 00:00:00 2001 From: ggabernet Date: Fri, 22 Apr 2022 17:21:36 +0200 Subject: [PATCH 05/13] remove dumps --- workflows/bcellmagic.nf | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/workflows/bcellmagic.nf b/workflows/bcellmagic.nf index 6c77880d..a69a8d64 100644 --- a/workflows/bcellmagic.nf +++ b/workflows/bcellmagic.nf @@ -134,7 +134,7 @@ ch_rmarkdown_report = Channel.fromPath( ["$projectDir/assets/repertoire_comparis "$projectDir/assets/references.bibtex", "$projectDir/assets/nf-core_style.css", "$projectDir/assets/nf-core-airrflow_logo_light.png"], - checkIfExists: true).dump(tag: 'report files') + checkIfExists: true) //CHANGEO include { FETCH_DATABASES } from '../modules/local/fetch_databases' @@ -309,14 +309,14 @@ workflow BCELLMAGIC { // Only if threshold is not manually set if (!params.set_cluster_threshold){ SHAZAM_THRESHOLD( - MERGE_TABLES_WF.out.tab.dump(tag: 'merge tables output'), + MERGE_TABLES_WF.out.tab, ch_imgt.collect() ) - ch_tab_for_changeo_defineclones = SHAZAM_THRESHOLD.out.tab.dump(tag:'changeo_defineclones_threshold') + ch_tab_for_changeo_defineclones = SHAZAM_THRESHOLD.out.tab ch_threshold = SHAZAM_THRESHOLD.out.threshold - ch_versions = ch_versions.mix(SHAZAM_THRESHOLD.out.versions.ifEmpty(null)).dump() + ch_versions = ch_versions.mix(SHAZAM_THRESHOLD.out.versions.ifEmpty(null)) } else { - ch_tab_for_changeo_defineclones = MERGE_TABLES_WF.out.tab.dump(tag:'changeo_defineclones_threshold') + ch_tab_for_changeo_defineclones = MERGE_TABLES_WF.out.tab ch_threshold = file('EMPTY') } @@ -338,7 +338,7 @@ workflow BCELLMAGIC { // Lineage reconstruction alakazam if (!params.skip_lineage) { ALAKAZAM_LINEAGE( - CHANGEO_CREATEGERMLINES.out.tab.dump(tag:'creategermlines_output') + CHANGEO_CREATEGERMLINES.out.tab ) ch_versions = ch_versions.mix(ALAKAZAM_LINEAGE.out.versions.ifEmpty(null)) } @@ -346,7 +346,6 @@ workflow BCELLMAGIC { ch_all_tabs_repertoire = CHANGEO_CREATEGERMLINES.out.tab .map{ it -> [ it[1] ] } .collect() - .dump(tag:'repertoire_all') // Process logs parsing: getting sequence numbers PARSE_LOGS( @@ -376,6 +375,11 @@ workflow BCELLMAGIC { ch_versions = ch_versions.mix(ALAKAZAM_SHAZAM_REPERTOIRES.out.versions.ifEmpty(null)) } + // Software versions + CUSTOM_DUMPSOFTWAREVERSIONS ( + ch_versions.unique().collectFile(name: 'collated_versions.yml') + ) + // // MODULE: MultiQC // @@ -398,11 +402,6 @@ workflow BCELLMAGIC { multiqc_report = MULTIQC.out.report.toList() ch_versions = ch_versions.mix( MULTIQC.out.versions ) } - - // Software versions - CUSTOM_DUMPSOFTWAREVERSIONS ( - ch_versions.unique().collectFile(name: 'collated_versions.yml') - ) } /* From 396d1f27d585f1865dc59a2cd4714f09c404599a Mon Sep 17 00:00:00 2001 From: ggabernet Date: Sat, 23 Apr 2022 11:06:23 +0200 Subject: [PATCH 06/13] fix annoying hyphen --- conf/{test_no-umi.config => test_no_umi.config} | 0 nextflow.config | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename conf/{test_no-umi.config => test_no_umi.config} (100%) diff --git a/conf/test_no-umi.config b/conf/test_no_umi.config similarity index 100% rename from conf/test_no-umi.config rename to conf/test_no_umi.config diff --git a/nextflow.config b/nextflow.config index d85c3458..fc993f61 100644 --- a/nextflow.config +++ b/nextflow.config @@ -180,7 +180,7 @@ profiles { test_full { includeConfig 'conf/test_full.config' } test_tcr { includeConfig 'conf/test_tcr.config' } test_tcr_thr { includeConfig 'conf/test_tcr_thr.config' } - test_no_umi { includeConfig 'conf/test_no-umi.config' } + test_no_umi { includeConfig 'conf/test_no_umi.config' } test_reveal { includeConfig 'conf/test_reveal.config' } test_reveal_no_cc { includeConfig 'conf/test_reveal_no_cc.config' } test_nocluster { includeConfig 'conf/test_nocluster.config' } From 386f47c36b6158a180641f59d2fc47ac36d7b54c Mon Sep 17 00:00:00 2001 From: ggabernet Date: Sat, 23 Apr 2022 11:26:29 +0200 Subject: [PATCH 07/13] fix results folder changeo --- conf/modules.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 03bda144..50617884 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -224,19 +224,19 @@ process { withName: CHANGEO_DEFINECLONES { publishDir = [ - path: { "${params.outdir}/shazam/06-define-clones/${meta.id}" }, + path: { "${params.outdir}/changeo/06-define-clones/${meta.id}" }, ] } withName: CHANGEO_CREATEGERMLINES { publishDir = [ - path: { "${params.outdir}/shazam/07-create-germlines/${meta.id}" }, + path: { "${params.outdir}/changeo/07-create-germlines/${meta.id}" }, ] } withName: CHANGEO_BUILDTREES { publishDir = [ - path: { "${params.outdir}/shazam/08-build-trees/${meta.id}" }, + path: { "${params.outdir}/changeo/08-build-trees/${meta.id}" }, ] ext.args = '--igphyml --collapse' } From 4e8e48332d326a76b2ce12204d247aef3c34244e Mon Sep 17 00:00:00 2001 From: ggabernet Date: Sat, 23 Apr 2022 11:43:09 +0200 Subject: [PATCH 08/13] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf89528..9effe74f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [#150](https://github.com/nf-core/airrflow/pull/150) Added option to search for reverse primers. - [#159](https://github.com/nf-core/airrflow/pull/159) Template update to nf-core tools v2.3.1, v2.3.1 - [#161](https://github.com/nf-core/airrflow/pull/161) Add option to skip clustering sequences in the UMI workflow +- [#163](https://github.com/nf-core/airrflow/pull/163) Added process labels and software version emitting to all modules. Fixed output folder name for changeo processes. ### `Fixed` From 2f68777a3c9717bec914e6c6c117dea9a90e2202 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Tue, 26 Apr 2022 09:31:51 +0200 Subject: [PATCH 09/13] kableextra version --- modules/local/alakazam/alakazam_shazam_repertoires.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index 4ae89743..47619f8f 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -26,7 +26,6 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { alakazam: \$(Rscript -e "library(alakazam); cat(paste(packageVersion('alakazam'), collapse='.'))") shazam: \$(Rscript -e "library(shazam); cat(paste(packageVersion('shazam'), collapse='.'))") stringr: \$(Rscript -e "library(stringr); cat(paste(packageVersion('stringr'), collapse='.'))") - kableextra: \$(Rscript -e "library(kableextra); cat(paste(packageVersion('kableextra'), collapse='.'))") stringr: \$(Rscript -e "library(stringr); cat(paste(packageVersion('stringr'), collapse='.'))") dplyr: \$(Rscript -e "library(dplyr); cat(paste(packageVersion('dplyr'), collapse='.'))") knitr: \$(Rscript -e "library(knitr); cat(paste(packageVersion('knitr'), collapse='.'))") From c9efa085dba3b52e58f4be5878edfe9eb9bd6a47 Mon Sep 17 00:00:00 2001 From: Gisela Gabernet Date: Tue, 26 Apr 2022 12:35:51 +0200 Subject: [PATCH 10/13] Update modules/local/alakazam/alakazam_shazam_repertoires.nf Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> --- modules/local/alakazam/alakazam_shazam_repertoires.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index 47619f8f..196116aa 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -26,7 +26,6 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { alakazam: \$(Rscript -e "library(alakazam); cat(paste(packageVersion('alakazam'), collapse='.'))") shazam: \$(Rscript -e "library(shazam); cat(paste(packageVersion('shazam'), collapse='.'))") stringr: \$(Rscript -e "library(stringr); cat(paste(packageVersion('stringr'), collapse='.'))") - stringr: \$(Rscript -e "library(stringr); cat(paste(packageVersion('stringr'), collapse='.'))") dplyr: \$(Rscript -e "library(dplyr); cat(paste(packageVersion('dplyr'), collapse='.'))") knitr: \$(Rscript -e "library(knitr); cat(paste(packageVersion('knitr'), collapse='.'))") R: \$(echo \$(R --version 2>&1) | awk -F' ' '{print \$3}') From 420524e1ba0e6b98cb0a10ed640e8e6d2687c248 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Tue, 26 Apr 2022 13:37:28 +0200 Subject: [PATCH 11/13] clean modules --- modules/local/alakazam/alakazam_shazam_repertoires.nf | 2 +- modules/local/changeo/changeo_convertdb_fasta.nf | 2 +- modules/local/changeo/changeo_creategermlines.nf | 2 +- modules/local/changeo/changeo_defineclones.nf | 2 +- modules/local/changeo/changeo_makedb.nf | 2 +- modules/local/changeo/changeo_parsedb_select.nf | 2 +- modules/local/changeo/changeo_parsedb_split.nf | 2 +- modules/local/presto/presto_assemblepairs.nf | 2 +- modules/local/presto/presto_buildconsensus.nf | 2 +- modules/local/presto/presto_clustersets.nf | 2 +- modules/local/presto/presto_collapseseq.nf | 2 +- modules/local/presto/presto_filterseq.nf | 2 +- modules/local/presto/presto_filterseq_postassembly.nf | 2 +- modules/local/presto/presto_maskprimers.nf | 2 +- modules/local/presto/presto_pairseq.nf | 2 +- modules/local/presto/presto_parse_cluster.nf | 2 +- modules/local/presto/presto_parseheaders.nf | 2 +- modules/local/presto/presto_parseheaders_metadata.nf | 2 +- modules/local/presto/presto_parseheaders_primers.nf | 2 +- modules/local/presto/presto_postconsensus_pairseq.nf | 2 +- modules/local/presto/presto_splitseq.nf | 2 +- modules/local/shazam/shazam_threshold.nf | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/modules/local/alakazam/alakazam_shazam_repertoires.nf b/modules/local/alakazam/alakazam_shazam_repertoires.nf index 196116aa..0f3fea1b 100644 --- a/modules/local/alakazam/alakazam_shazam_repertoires.nf +++ b/modules/local/alakazam/alakazam_shazam_repertoires.nf @@ -2,7 +2,7 @@ process ALAKAZAM_SHAZAM_REPERTOIRES { tag "report" label 'process_high' - conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda::r-alakazam=1.2.0 bioconda::r-shazam=1.1.0 conda-forge::r-kableextra=1.3.4 conda-forge::r-knitr=1.33 conda-forge::r-stringr=1.4.0 conda-forge::r-dplyr=1.0.6" : null) // Conda package + conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda::r-alakazam=1.2.0 bioconda::r-shazam=1.1.0 conda-forge::r-kableextra=1.3.4 conda-forge::r-knitr=1.33 conda-forge::r-stringr=1.4.0 conda-forge::r-dplyr=1.0.6" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-3c44411d6bed445c86c3f3bb91b5464377669d0f:37d81bcb128d0d1b27c8746e089087e19ddfe3fb-0' : 'quay.io/biocontainers/mulled-v2-3c44411d6bed445c86c3f3bb91b5464377669d0f:37d81bcb128d0d1b27c8746e089087e19ddfe3fb-0' }" diff --git a/modules/local/changeo/changeo_convertdb_fasta.nf b/modules/local/changeo/changeo_convertdb_fasta.nf index 12e93516..c1d94965 100644 --- a/modules/local/changeo/changeo_convertdb_fasta.nf +++ b/modules/local/changeo/changeo_convertdb_fasta.nf @@ -3,7 +3,7 @@ process CHANGEO_CONVERTDB_FASTA { label 'process_low' label 'immcantation' - conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) // Conda package + conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' : 'quay.io/biocontainers/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' }" diff --git a/modules/local/changeo/changeo_creategermlines.nf b/modules/local/changeo/changeo_creategermlines.nf index 287e7862..f00f5bf6 100644 --- a/modules/local/changeo/changeo_creategermlines.nf +++ b/modules/local/changeo/changeo_creategermlines.nf @@ -2,7 +2,7 @@ process CHANGEO_CREATEGERMLINES { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) // Conda package + conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' : 'quay.io/biocontainers/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' }" diff --git a/modules/local/changeo/changeo_defineclones.nf b/modules/local/changeo/changeo_defineclones.nf index f1bdec4c..39e1cf3e 100644 --- a/modules/local/changeo/changeo_defineclones.nf +++ b/modules/local/changeo/changeo_defineclones.nf @@ -2,7 +2,7 @@ process CHANGEO_DEFINECLONES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) // Conda package + conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' : 'quay.io/biocontainers/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' }" diff --git a/modules/local/changeo/changeo_makedb.nf b/modules/local/changeo/changeo_makedb.nf index 842bfa72..dab4bc18 100644 --- a/modules/local/changeo/changeo_makedb.nf +++ b/modules/local/changeo/changeo_makedb.nf @@ -2,7 +2,7 @@ process CHANGEO_MAKEDB { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) // Conda package + conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' : 'quay.io/biocontainers/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' }" diff --git a/modules/local/changeo/changeo_parsedb_select.nf b/modules/local/changeo/changeo_parsedb_select.nf index 781b9066..42606fc6 100644 --- a/modules/local/changeo/changeo_parsedb_select.nf +++ b/modules/local/changeo/changeo_parsedb_select.nf @@ -2,7 +2,7 @@ process CHANGEO_PARSEDB_SELECT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) // Conda package + conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' : 'quay.io/biocontainers/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' }" diff --git a/modules/local/changeo/changeo_parsedb_split.nf b/modules/local/changeo/changeo_parsedb_split.nf index c5ed7b74..7b0a75a9 100644 --- a/modules/local/changeo/changeo_parsedb_split.nf +++ b/modules/local/changeo/changeo_parsedb_split.nf @@ -3,7 +3,7 @@ process CHANGEO_PARSEDB_SPLIT { label 'process_low' label 'immcantation' - conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) // Conda package + conda (params.enable_conda ? "bioconda::changeo=1.2.0 bioconda::igblast=1.17.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' : 'quay.io/biocontainers/mulled-v2-2665a8a48fa054ad1fcccf53e711669939b3eac1:f479475bceae84156e57e303cfe804ab5629d62b-0' }" diff --git a/modules/local/presto/presto_assemblepairs.nf b/modules/local/presto/presto_assemblepairs.nf index 88e7bf7f..48113afd 100644 --- a/modules/local/presto/presto_assemblepairs.nf +++ b/modules/local/presto/presto_assemblepairs.nf @@ -2,7 +2,7 @@ process PRESTO_ASSEMBLEPAIRS { tag "$meta.id" label 'process_long_parallelized' - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_buildconsensus.nf b/modules/local/presto/presto_buildconsensus.nf index 52df4321..21b0cc8f 100644 --- a/modules/local/presto/presto_buildconsensus.nf +++ b/modules/local/presto/presto_buildconsensus.nf @@ -2,7 +2,7 @@ process PRESTO_BUILDCONSENSUS { tag "$meta.id" label "process_long_parallelized" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_clustersets.nf b/modules/local/presto/presto_clustersets.nf index 1e9e0997..b08faeed 100644 --- a/modules/local/presto/presto_clustersets.nf +++ b/modules/local/presto/presto_clustersets.nf @@ -2,7 +2,7 @@ process PRESTO_CLUSTERSETS { tag "$meta.id" label "process_long_parallelized" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_collapseseq.nf b/modules/local/presto/presto_collapseseq.nf index b17129dc..5d04afb8 100644 --- a/modules/local/presto/presto_collapseseq.nf +++ b/modules/local/presto/presto_collapseseq.nf @@ -2,7 +2,7 @@ process PRESTO_COLLAPSESEQ { tag "$meta.id" label "process_medium" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_filterseq.nf b/modules/local/presto/presto_filterseq.nf index 4c862225..9f6704dc 100644 --- a/modules/local/presto/presto_filterseq.nf +++ b/modules/local/presto/presto_filterseq.nf @@ -2,7 +2,7 @@ process PRESTO_FILTERSEQ { tag "$meta.id" label "process_medium" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_filterseq_postassembly.nf b/modules/local/presto/presto_filterseq_postassembly.nf index 52a12e9f..fc2c5fc6 100644 --- a/modules/local/presto/presto_filterseq_postassembly.nf +++ b/modules/local/presto/presto_filterseq_postassembly.nf @@ -2,7 +2,7 @@ process PRESTO_FILTERSEQ_POSTASSEMBLY { tag "$meta.id" label "process_medium" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_maskprimers.nf b/modules/local/presto/presto_maskprimers.nf index 6415157e..6e2f3df8 100644 --- a/modules/local/presto/presto_maskprimers.nf +++ b/modules/local/presto/presto_maskprimers.nf @@ -2,7 +2,7 @@ process PRESTO_MASKPRIMERS { tag "$meta.id" label "process_high" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_pairseq.nf b/modules/local/presto/presto_pairseq.nf index 852b6c8d..f0532e8e 100644 --- a/modules/local/presto/presto_pairseq.nf +++ b/modules/local/presto/presto_pairseq.nf @@ -2,7 +2,7 @@ process PRESTO_PAIRSEQ { tag "$meta.id" label "process_low" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_parse_cluster.nf b/modules/local/presto/presto_parse_cluster.nf index aa1b5723..dbb23457 100644 --- a/modules/local/presto/presto_parse_cluster.nf +++ b/modules/local/presto/presto_parse_cluster.nf @@ -2,7 +2,7 @@ process PRESTO_PARSE_CLUSTER { tag "$meta.id" label "process_low" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_parseheaders.nf b/modules/local/presto/presto_parseheaders.nf index 8c30af56..ad9d59ab 100644 --- a/modules/local/presto/presto_parseheaders.nf +++ b/modules/local/presto/presto_parseheaders.nf @@ -2,7 +2,7 @@ process PRESTO_PARSEHEADERS { tag "$meta.id" label "process_low" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_parseheaders_metadata.nf b/modules/local/presto/presto_parseheaders_metadata.nf index 5fd77b47..717fdcc8 100644 --- a/modules/local/presto/presto_parseheaders_metadata.nf +++ b/modules/local/presto/presto_parseheaders_metadata.nf @@ -2,7 +2,7 @@ process PRESTO_PARSEHEADERS_METADATA { tag "$meta.id" label "process_low" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_parseheaders_primers.nf b/modules/local/presto/presto_parseheaders_primers.nf index bbdfbc76..49de701f 100644 --- a/modules/local/presto/presto_parseheaders_primers.nf +++ b/modules/local/presto/presto_parseheaders_primers.nf @@ -2,7 +2,7 @@ process PRESTO_PARSEHEADERS_PRIMERS { tag "$meta.id" label "process_low" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_postconsensus_pairseq.nf b/modules/local/presto/presto_postconsensus_pairseq.nf index 00c7c960..868e50b9 100644 --- a/modules/local/presto/presto_postconsensus_pairseq.nf +++ b/modules/local/presto/presto_postconsensus_pairseq.nf @@ -2,7 +2,7 @@ process PRESTO_POSTCONSENSUS_PAIRSEQ { tag "$meta.id" label "process_low" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/presto/presto_splitseq.nf b/modules/local/presto/presto_splitseq.nf index 801d7e97..97a50924 100644 --- a/modules/local/presto/presto_splitseq.nf +++ b/modules/local/presto/presto_splitseq.nf @@ -2,7 +2,7 @@ process PRESTO_SPLITSEQ { tag "$meta.id" label "process_low" - conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) // Conda package + conda (params.enable_conda ? "bioconda::presto=0.7.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/presto:0.7.0--pyhdfd78af_0' : 'quay.io/biocontainers/presto:0.7.0--pyhdfd78af_0' }" diff --git a/modules/local/shazam/shazam_threshold.nf b/modules/local/shazam/shazam_threshold.nf index 0133d06b..0aaa6d30 100644 --- a/modules/local/shazam/shazam_threshold.nf +++ b/modules/local/shazam/shazam_threshold.nf @@ -1,7 +1,7 @@ process SHAZAM_THRESHOLD { tag "$meta.id" - conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda::r-shazam=1.1.0" : null) // Conda package + conda (params.enable_conda ? "conda-forge::r-base=4.1.2 bioconda::r-shazam=1.1.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-db80433cc6df75bc43a5fd7bfa7529a7df8cfe15:f0e1329252bbc0f36a8656cfa655cf205da30e5b-0' : 'quay.io/biocontainers/mulled-v2-db80433cc6df75bc43a5fd7bfa7529a7df8cfe15:f0e1329252bbc0f36a8656cfa655cf205da30e5b-0' }" From 0198e03949888a339ca764ecf0a357883fadf683 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Wed, 27 Apr 2022 15:57:21 +0200 Subject: [PATCH 12/13] fix lint warnings --- .nf-core.yml | 4 ++ conf/test_reveal_no_cc.config | 2 - modules.json | 6 +-- modules/nf-core/modules/fastqc/main.nf | 12 +++++ modules/nf-core/modules/multiqc/main.nf | 12 +++++ nextflow_schema.json | 58 ++++++++++++++++++++----- 6 files changed, 78 insertions(+), 16 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index 3805dc81..40647053 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1 +1,5 @@ +lint: + files_exist: + - conf/igenomes.config + - lib/WorkflowAirrflow.groovy repository_type: pipeline diff --git a/conf/test_reveal_no_cc.config b/conf/test_reveal_no_cc.config index ef28108c..dbb67163 100644 --- a/conf/test_reveal_no_cc.config +++ b/conf/test_reveal_no_cc.config @@ -17,8 +17,6 @@ params { max_time = 6.h // Input data - // TODO nf-core: Specify the paths to your test data on nf-core/test-datasets - // TODO nf-core: Give any required params for the test so that command line flags are not needed subworkflow = 'reveal' input = 'https://raw.githubusercontent.com/nf-core/test-datasets/airrflow/testdata-reveal/test_reveal_metadata.tsv' outdir = 'test-reveal-results-no-cc' diff --git a/modules.json b/modules.json index 967efabe..f24e58b5 100644 --- a/modules.json +++ b/modules.json @@ -7,11 +7,11 @@ "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" }, "fastqc": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + "git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe" }, "multiqc": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" + "git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe" } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/modules/fastqc/main.nf b/modules/nf-core/modules/fastqc/main.nf index ed6b8c50..05730368 100644 --- a/modules/nf-core/modules/fastqc/main.nf +++ b/modules/nf-core/modules/fastqc/main.nf @@ -44,4 +44,16 @@ process FASTQC { END_VERSIONS """ } + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.html + touch ${prefix}.zip + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) + END_VERSIONS + """ } diff --git a/modules/nf-core/modules/multiqc/main.nf b/modules/nf-core/modules/multiqc/main.nf index 1264aac1..ae019dbf 100644 --- a/modules/nf-core/modules/multiqc/main.nf +++ b/modules/nf-core/modules/multiqc/main.nf @@ -28,4 +28,16 @@ process MULTIQC { multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) END_VERSIONS """ + + stub: + """ + touch multiqc_data + touch multiqc_plots + touch multiqc_report.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ } diff --git a/nextflow_schema.json b/nextflow_schema.json index 69759384..dffb0281 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -10,7 +10,10 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir"], + "required": [ + "input", + "outdir" + ], "properties": { "subworkflow": { "type": "string", @@ -18,7 +21,10 @@ "fa_icon": "fas fa-project-diagram", "hidden": true, "description": "Specify the subworkflow to be executed.", - "enum": ["bcellmagic", "reveal"] + "enum": [ + "bcellmagic", + "reveal" + ] }, "input": { "type": "string", @@ -51,7 +57,12 @@ "type": "string", "fa_icon": "fas fa-flask", "description": "Protocol used for the V(D)J amplicon sequencing library generation.", - "enum": ["specific_pcr_umi", "specific_pcr", "dt_5p_race", "dt_5p_race_umi"], + "enum": [ + "specific_pcr_umi", + "specific_pcr", + "dt_5p_race", + "dt_5p_race_umi" + ], "help_text": "Available protocols are:\n- `specific_pcr_umi`: RT-PCR using transcript-specific primers containing UMIs.\n- `specific_pcr`: RT-PCR using transcript-specific primers.\n- `dt_5p_race_umi`: 5\u2019-RACE PCR using oligo-dT primers and template switch primers containing UMI.\n- `dt_5p_race`: 5\u2019-RACE PCR (i.e. RT is followed by a template switch (TS) step) using oligo-dT primers." }, "race_linker": { @@ -88,7 +99,10 @@ "type": "string", "default": "human", "description": "Species to perform Igblast. Choose from: human, mouse.", - "enum": ["human", "mouse"] + "enum": [ + "human", + "mouse" + ] } }, "help_text": "", @@ -127,7 +141,10 @@ "default": "R1", "fa_icon": "fas fa-dna", "description": "Indicate if C region primers are in the R1 or R2 reads.", - "enum": ["R1", "R2"] + "enum": [ + "R1", + "R2" + ] }, "primer_revpr": { "type": "boolean", @@ -154,7 +171,10 @@ "default": "R1", "description": "Indicate if UMI indices are recorded in the R1 (default) or R1 fastq file.", "help_text": "The pipeline requires UMI barcodes for identifying unique transcripts. These barcodes are typically read from an index file but sometimes can be provided merged with the start of the R1 or R2 reads. If provided in an additional index file, set the `--index_file` parameter, if provided merged with the R1 or R2 reads, set the `--umi_position` parameter to R1 or R2, respectively.", - "enum": ["R1", "R2"], + "enum": [ + "R1", + "R2" + ], "fa_icon": "fas fa-barcode" }, "umi_length": { @@ -200,7 +220,12 @@ "type": "string", "default": "cut", "description": "Masking mode for the Presto MaskPrimer step. Available: cut, mask, trim, tag.", - "enum": ["cut", "mask", "trim", "tag"], + "enum": [ + "cut", + "mask", + "trim", + "tag" + ], "help_text": "The primer masking modes will perform the following actions:\n\n* `cut`: remove both the primer region and the preceding sequence.\n* `mask`: replace the primer region with Ns and remove the preceding sequence.\n* `trim`: remove the region preceding the primer, but leave the primer region intact.\n* `tag`: leave the input sequence unmodified.", "fa_icon": "fas fa-mask" }, @@ -423,7 +448,14 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ], "hidden": true }, "email_on_fail": { @@ -520,7 +552,10 @@ "description": "Whether to apply the chimera removal filter" }, "threshold": { - "type": ["string", "number"], + "type": [ + "string", + "number" + ], "default": "auto", "description": "Use `auto` to automatically set a threshold to identify clonally related sequences. Set" }, @@ -531,7 +566,8 @@ }, "singlecell": { "type": "string", - "default": "single_cell" + "default": "single_cell", + "description": "Whether input samples include single cell sequencing samples" } } } @@ -580,4 +616,4 @@ "$ref": "#/definitions/subworkflow_reveal" } ] -} +} \ No newline at end of file From d74004af17ab65c5c5cf2b545b807b4c4845f85b Mon Sep 17 00:00:00 2001 From: ggabernet Date: Wed, 27 Apr 2022 15:59:06 +0200 Subject: [PATCH 13/13] fix prettier --- modules.json | 2 +- nextflow_schema.json | 55 ++++++++------------------------------------ 2 files changed, 11 insertions(+), 46 deletions(-) diff --git a/modules.json b/modules.json index f24e58b5..0317fdc3 100644 --- a/modules.json +++ b/modules.json @@ -14,4 +14,4 @@ } } } -} \ No newline at end of file +} diff --git a/nextflow_schema.json b/nextflow_schema.json index dffb0281..90733faa 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -10,10 +10,7 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": [ - "input", - "outdir" - ], + "required": ["input", "outdir"], "properties": { "subworkflow": { "type": "string", @@ -21,10 +18,7 @@ "fa_icon": "fas fa-project-diagram", "hidden": true, "description": "Specify the subworkflow to be executed.", - "enum": [ - "bcellmagic", - "reveal" - ] + "enum": ["bcellmagic", "reveal"] }, "input": { "type": "string", @@ -57,12 +51,7 @@ "type": "string", "fa_icon": "fas fa-flask", "description": "Protocol used for the V(D)J amplicon sequencing library generation.", - "enum": [ - "specific_pcr_umi", - "specific_pcr", - "dt_5p_race", - "dt_5p_race_umi" - ], + "enum": ["specific_pcr_umi", "specific_pcr", "dt_5p_race", "dt_5p_race_umi"], "help_text": "Available protocols are:\n- `specific_pcr_umi`: RT-PCR using transcript-specific primers containing UMIs.\n- `specific_pcr`: RT-PCR using transcript-specific primers.\n- `dt_5p_race_umi`: 5\u2019-RACE PCR using oligo-dT primers and template switch primers containing UMI.\n- `dt_5p_race`: 5\u2019-RACE PCR (i.e. RT is followed by a template switch (TS) step) using oligo-dT primers." }, "race_linker": { @@ -99,10 +88,7 @@ "type": "string", "default": "human", "description": "Species to perform Igblast. Choose from: human, mouse.", - "enum": [ - "human", - "mouse" - ] + "enum": ["human", "mouse"] } }, "help_text": "", @@ -141,10 +127,7 @@ "default": "R1", "fa_icon": "fas fa-dna", "description": "Indicate if C region primers are in the R1 or R2 reads.", - "enum": [ - "R1", - "R2" - ] + "enum": ["R1", "R2"] }, "primer_revpr": { "type": "boolean", @@ -171,10 +154,7 @@ "default": "R1", "description": "Indicate if UMI indices are recorded in the R1 (default) or R1 fastq file.", "help_text": "The pipeline requires UMI barcodes for identifying unique transcripts. These barcodes are typically read from an index file but sometimes can be provided merged with the start of the R1 or R2 reads. If provided in an additional index file, set the `--index_file` parameter, if provided merged with the R1 or R2 reads, set the `--umi_position` parameter to R1 or R2, respectively.", - "enum": [ - "R1", - "R2" - ], + "enum": ["R1", "R2"], "fa_icon": "fas fa-barcode" }, "umi_length": { @@ -220,12 +200,7 @@ "type": "string", "default": "cut", "description": "Masking mode for the Presto MaskPrimer step. Available: cut, mask, trim, tag.", - "enum": [ - "cut", - "mask", - "trim", - "tag" - ], + "enum": ["cut", "mask", "trim", "tag"], "help_text": "The primer masking modes will perform the following actions:\n\n* `cut`: remove both the primer region and the preceding sequence.\n* `mask`: replace the primer region with Ns and remove the preceding sequence.\n* `trim`: remove the region preceding the primer, but leave the primer region intact.\n* `tag`: leave the input sequence unmodified.", "fa_icon": "fas fa-mask" }, @@ -448,14 +423,7 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": [ - "symlink", - "rellink", - "link", - "copy", - "copyNoFollow", - "move" - ], + "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], "hidden": true }, "email_on_fail": { @@ -552,10 +520,7 @@ "description": "Whether to apply the chimera removal filter" }, "threshold": { - "type": [ - "string", - "number" - ], + "type": ["string", "number"], "default": "auto", "description": "Use `auto` to automatically set a threshold to identify clonally related sequences. Set" }, @@ -616,4 +581,4 @@ "$ref": "#/definitions/subworkflow_reveal" } ] -} \ No newline at end of file +}