diff --git a/modules.json b/modules.json index 5d96e99..8eba45c 100644 --- a/modules.json +++ b/modules.json @@ -7,7 +7,7 @@ "msk": { "genotypevariants/all": { "branch": "Subworkflow-traceback", - "git_sha": "5abcf40301834adb05cbc826f8f3e582bea2e769", + "git_sha": "64aa65cb2dc476607b93a3d5f161528891ba5e34", "installed_by": [ "traceback" ] @@ -21,16 +21,16 @@ }, "pvmaf/concat": { "branch": "Subworkflow-traceback", - "git_sha": "5abcf40301834adb05cbc826f8f3e582bea2e769", + "git_sha": "82bc8976b36a187ddcd48be1f516e5f8a5faa09b", "installed_by": [ "traceback" ] }, - "pvmaf/tag": { + "pvmaf/tagtraceback": { "branch": "Subworkflow-traceback", - "git_sha": "5abcf40301834adb05cbc826f8f3e582bea2e769", + "git_sha": "a9e056a4bd1c7d5974013972ed26414d867d28a3", "installed_by": [ - "traceback" + "modules" ] } } @@ -39,7 +39,7 @@ "msk": { "traceback": { "branch": "Subworkflow-traceback", - "git_sha": "601f6f4d95162f922ae7df87d96a361a420d5cf3", + "git_sha": "a0d608c00b9421ac35ae6f12699588115b741ed4", "installed_by": [ "subworkflows" ] diff --git a/modules/msk/genotypevariants/all/main.nf b/modules/msk/genotypevariants/all/main.nf index aac6a85..9ad901c 100644 --- a/modules/msk/genotypevariants/all/main.nf +++ b/modules/msk/genotypevariants/all/main.nf @@ -5,8 +5,8 @@ process GENOTYPEVARIANTS_ALL { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'ghcr.io/msk-access/genotype_variants:sha-7e2c3c8a': - 'ghcr.io/msk-access/genotype_variants:sha-7e2c3c8a' }" + 'ghcr.io/msk-access/genotype_variants:0.3.8': + 'ghcr.io/msk-access/genotype_variants:0.3.8' }" input: tuple val(meta), path(bam_standard), path(bai_standard), path(bam_duplex), path(bai_duplex), path(bam_simplex), path(bai_simplex), path(maf) @@ -59,4 +59,4 @@ process GENOTYPEVARIANTS_ALL { genotypevariants: \$(genotype_variants --version) END_VERSIONS """ -} \ No newline at end of file +} diff --git a/modules/msk/genotypevariants/all/meta.yml b/modules/msk/genotypevariants/all/meta.yml index d2765b9..8b0c909 100644 --- a/modules/msk/genotypevariants/all/meta.yml +++ b/modules/msk/genotypevariants/all/meta.yml @@ -65,7 +65,7 @@ output: e.g. `[ id:'sample1', patient:'patient_1' ]` - maf: type: file - description: Genotyped mafs for each bam type (simplex, duplex, standard) provided and a merged genotyped maf. The maf(s) will be labelled with patient identifier or sample identifier as the prefix, and end with their type (standard, simplex, duplex). The sample identifier is prioritized. + description: Genotyped mafs for each bam provided and a merged genotyped maf. The maf(s) will be labelled with patient identifier or sample identifier as the prefix, and end with the type of bam (duplex, simplex, or standard). The sample identifier is prioritized. pattern: "*.{mafs}" - versions: type: file diff --git a/modules/msk/genotypevariants/all/tests/main.nf.test b/modules/msk/genotypevariants/all/tests/main.nf.test index 7554722..5cfaa93 100644 --- a/modules/msk/genotypevariants/all/tests/main.nf.test +++ b/modules/msk/genotypevariants/all/tests/main.nf.test @@ -7,6 +7,7 @@ nextflow_process { tag "modules" tag "modules_nfcore" + tag "modules_msk" tag "genotypevariants" tag "genotypevariants/all" diff --git a/modules/msk/genotypevariants/all/tests/main.nf.test.snap b/modules/msk/genotypevariants/all/tests/main.nf.test.snap index 273d9ac..eefaa9a 100644 --- a/modules/msk/genotypevariants/all/tests/main.nf.test.snap +++ b/modules/msk/genotypevariants/all/tests/main.nf.test.snap @@ -12,7 +12,7 @@ ] ], "1": [ - "versions.yml:md5,b7680b263124563b4efc85c69b23ce3b" + "versions.yml:md5,55fd807cb50fcc6611e6d352b86e4704" ], "maf": [ [ @@ -24,11 +24,11 @@ ] ], "versions": [ - "versions.yml:md5,b7680b263124563b4efc85c69b23ce3b" + "versions.yml:md5,55fd807cb50fcc6611e6d352b86e4704" ] } ], - "timestamp": "2024-02-12T11:27:25.169131" + "timestamp": "2024-06-18T14:18:45.350503" }, "illumina - duplex and simplex, msk - maf": { "content": [ @@ -48,7 +48,7 @@ ] ], "1": [ - "versions.yml:md5,b7680b263124563b4efc85c69b23ce3b" + "versions.yml:md5,55fd807cb50fcc6611e6d352b86e4704" ], "maf": [ [ @@ -65,11 +65,11 @@ ] ], "versions": [ - "versions.yml:md5,b7680b263124563b4efc85c69b23ce3b" + "versions.yml:md5,55fd807cb50fcc6611e6d352b86e4704" ] } ], - "timestamp": "2024-02-12T11:27:17.612126" + "timestamp": "2024-06-18T14:18:39.109687" }, "illumina - bam, msk - maf": { "content": [ @@ -87,7 +87,7 @@ ] ], "1": [ - "versions.yml:md5,b7680b263124563b4efc85c69b23ce3b" + "versions.yml:md5,55fd807cb50fcc6611e6d352b86e4704" ], "maf": [ [ @@ -102,10 +102,10 @@ ] ], "versions": [ - "versions.yml:md5,b7680b263124563b4efc85c69b23ce3b" + "versions.yml:md5,55fd807cb50fcc6611e6d352b86e4704" ] } ], - "timestamp": "2024-02-12T11:27:06.821575" + "timestamp": "2024-06-18T14:18:29.181063" } } \ No newline at end of file diff --git a/modules/msk/pvmaf/concat/main.nf b/modules/msk/pvmaf/concat/main.nf index 011bc43..df66a43 100644 --- a/modules/msk/pvmaf/concat/main.nf +++ b/modules/msk/pvmaf/concat/main.nf @@ -1,11 +1,11 @@ process PVMAF_CONCAT { tag "$meta.id" label 'process_single' - //ghcr.io/msk-access/postprocessing_variant_calls:0.3.0 + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'ghcr.io/msk-access/postprocessing_variant_calls:remove_variant_by_annot_0.0.05': - 'ghcr.io/msk-access/postprocessing_variant_calls:remove_variant_by_annot_0.0.05' }" + 'ghcr.io/msk-access/postprocessing_variant_calls:0.3.0': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.3.0' }" input: tuple val(meta), path(maf_files) @@ -49,4 +49,4 @@ process PVMAF_CONCAT { pv: \$( pv --version ) END_VERSIONS """ -} \ No newline at end of file +} diff --git a/modules/msk/pvmaf/concat/meta.yml b/modules/msk/pvmaf/concat/meta.yml index acceec9..f676983 100644 --- a/modules/msk/pvmaf/concat/meta.yml +++ b/modules/msk/pvmaf/concat/meta.yml @@ -24,10 +24,6 @@ input: type: file description: list of maf files to concatenate pattern: "*.{maf}" - - header: - type: file - description: header file indicating the columns by which the mafs should be concatenated - pattern: "*.{txt}" output: #Only when we have meta diff --git a/modules/msk/pvmaf/concat/tests/main.nf.test b/modules/msk/pvmaf/concat/tests/main.nf.test index 0c9dc4f..18fcba2 100644 --- a/modules/msk/pvmaf/concat/tests/main.nf.test +++ b/modules/msk/pvmaf/concat/tests/main.nf.test @@ -20,7 +20,6 @@ nextflow_process { file(params.test_data_mskcc['chr22']['chr22maf'], checkIfExists: true), file(params.test_data_mskcc['chr22']['chr22maf'], checkIfExists: true) ] - input[1] = [] """ } } @@ -45,7 +44,6 @@ nextflow_process { input[0] = [ [ id:'chr22', patient:'test'], file(params.test_data_mskcc['chr22']['chr22maf'], checkIfExists: true), file(params.test_data_mskcc['chr22']['chr22maf'], checkIfExists: true) ] - input[1] = [] """ } } diff --git a/modules/msk/pvmaf/concat/tests/nextflow.config b/modules/msk/pvmaf/concat/tests/nextflow.config index a995c95..5ec8ae0 100644 --- a/modules/msk/pvmaf/concat/tests/nextflow.config +++ b/modules/msk/pvmaf/concat/tests/nextflow.config @@ -4,4 +4,4 @@ process { withName: "PVMAF_CONCAT" { ext.args = '' } -} \ No newline at end of file +} diff --git a/modules/msk/pvmaf/tag/environment.yml b/modules/msk/pvmaf/tag/environment.yml deleted file mode 100644 index 0c95e2d..0000000 --- a/modules/msk/pvmaf/tag/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "pvmaf_tag" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "YOUR-TOOL-HERE" diff --git a/modules/msk/pvmaf/tag/main.nf b/modules/msk/pvmaf/tag/main.nf deleted file mode 100644 index 351519e..0000000 --- a/modules/msk/pvmaf/tag/main.nf +++ /dev/null @@ -1,56 +0,0 @@ -process PVMAF_TAG { - tag "$meta.id" - label 'process_single' - //ghcr.io/msk-access/postprocessing_variant_calls:0.2.8 - // TODO nf-core: List required Conda package(s). - // Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). - // For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'ghcr.io/msk-access/postprocessing_variant_calls:type_traceback_0.0.5': - 'ghcr.io/msk-access/postprocessing_variant_calls:type_traceback_0.0.5' }" - - input: - tuple val(meta), path(maf) - val(type) - path(sample_sheets) - - output: - tuple val(meta), path("*.maf"), emit: maf - path "versions.yml" , emit: versions - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix != null ? "${task.ext.prefix}" : (meta.patient != null ? "${meta.patient}" : "") - def sampleFiles = sample_sheets.collect { file -> "-sheet $file" }.join(' ') - def output = prefix ? "${prefix}_${type}.maf": "multi_sample_${type}.maf" - - """ - pv maf tag \\ - $type \\ - -m $maf \\ - $sampleFiles \\ - --output $output \\ - $args - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pv: \$( pv --version ) - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix != null ? "${task.ext.prefix}" : (meta.patient != null ? "${meta.patient}" : "") - def output = prefix ? "${prefix}_${type}.maf": "multi_sample_${type}.maf" - """ - touch $output - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pv: \$( pv --version ) - END_VERSIONS - """ -} \ No newline at end of file diff --git a/modules/msk/pvmaf/tag/meta.yml b/modules/msk/pvmaf/tag/meta.yml deleted file mode 100644 index 56402f1..0000000 --- a/modules/msk/pvmaf/tag/meta.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "pvmaf_tag" -description: a flexible command for tagging maf files -keywords: - - tagging - - maf - - msk-access -tools: - - "pvmaf": - description: "provides a variety of commands for manipulating mafs." - homepage: "https://github.com/msk-access/postprocessing_variant_calls" - documentation: "https://cmo-ci.gitbook.io/postprocessing_variant_calls/" - licence: ["MIT"] - -input: - # Only when we have meta - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', patient:'patient1' ]` - - - maf: - type: file - description: Maf file with columns required for selected tagging type. - pattern: "*.{maf}" - - type: - type: string - description: The type of tagging to be performed. - -output: - #Only when we have meta - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', patient:'patient1' ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - maf: - type: file - description: tagged maf file. - pattern: "*.{maf}" - -authors: - - "@buehlere" -maintainers: - - "@buehlere" diff --git a/modules/msk/pvmaf/tag/tests/main.nf.test b/modules/msk/pvmaf/tag/tests/main.nf.test deleted file mode 100644 index 480c762..0000000 --- a/modules/msk/pvmaf/tag/tests/main.nf.test +++ /dev/null @@ -1,61 +0,0 @@ -nextflow_process { - - name "Test Process PVMAF_TAG" - script "../main.nf" - process "PVMAF_TAG" - config "./nextflow.config" - - tag "modules" - tag "modules_nfcore" - tag "modules_msk" - tag "pvmaf" - tag "pvmaf/tag" - - test("chr22mafstandard - msk - traceback") { - - - when { - process { - """input[0] = [ - [ id:'chr22', patient:'test'], // meta map - file(params.test_data_mskcc['chr22']['chr22mafstandard'], checkIfExists: true), - ] - input[1] = 'traceback' - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("chr22mafstandard - msk - traceback - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'chr22', patient:'test'], file(params.test_data_mskcc['chr22']['chr22mafstandard'], checkIfExists: true), - ] - input[1] = 'traceback' - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/msk/pvmaf/tag/tests/main.nf.test.snap b/modules/msk/pvmaf/tag/tests/main.nf.test.snap deleted file mode 100644 index f858fc5..0000000 --- a/modules/msk/pvmaf/tag/tests/main.nf.test.snap +++ /dev/null @@ -1,64 +0,0 @@ -{ - "chr22mafstandard - msk - traceback": { - "content": [ - { - "0": [ - [ - { - "id": "chr22", - "patient": "test" - }, - "test_traceback.maf:md5,23ca5bc6918acfd84b98fdce78bc008b" - ] - ], - "1": [ - "versions.yml:md5,1f95a3b0ed06d92f31b49e3b61331d23" - ], - "maf": [ - [ - { - "id": "chr22", - "patient": "test" - }, - "test_traceback.maf:md5,23ca5bc6918acfd84b98fdce78bc008b" - ] - ], - "versions": [ - "versions.yml:md5,1f95a3b0ed06d92f31b49e3b61331d23" - ] - } - ], - "timestamp": "2024-02-29T12:21:12.874605" - }, - "chr22mafstandard - msk - traceback - stub": { - "content": [ - { - "0": [ - [ - { - "id": "chr22", - "patient": "test" - }, - "test_traceback.maf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,1f95a3b0ed06d92f31b49e3b61331d23" - ], - "maf": [ - [ - { - "id": "chr22", - "patient": "test" - }, - "test_traceback.maf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,1f95a3b0ed06d92f31b49e3b61331d23" - ] - } - ], - "timestamp": "2024-02-29T12:21:24.705074" - } -} \ No newline at end of file diff --git a/modules/msk/pvmaf/tag/tests/nextflow.config b/modules/msk/pvmaf/tag/tests/nextflow.config deleted file mode 100644 index 2274ef0..0000000 --- a/modules/msk/pvmaf/tag/tests/nextflow.config +++ /dev/null @@ -1,11 +0,0 @@ -params { - enable_conda = false -} - -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: "PVMAF_TAG" { - ext.args = '' - } - } \ No newline at end of file diff --git a/modules/msk/pvmaf/tag/tests/tags.yml b/modules/msk/pvmaf/tag/tests/tags.yml deleted file mode 100644 index 2a51814..0000000 --- a/modules/msk/pvmaf/tag/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -pvmaf/tag: - - "modules/msk/pvmaf/tag/**" diff --git a/modules/nf-core/msk/custom/splitfastqbylane/environment.yml b/modules/nf-core/msk/custom/splitfastqbylane/environment.yml deleted file mode 100644 index 86c5c29..0000000 --- a/modules/nf-core/msk/custom/splitfastqbylane/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "custom_splitfastqbylane" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "anaconda::gawk=5.1.0" diff --git a/modules/nf-core/msk/custom/splitfastqbylane/main.nf b/modules/nf-core/msk/custom/splitfastqbylane/main.nf deleted file mode 100644 index 5bf0938..0000000 --- a/modules/nf-core/msk/custom/splitfastqbylane/main.nf +++ /dev/null @@ -1,45 +0,0 @@ -process CUSTOM_SPLITFASTQBYLANE { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gawk:5.1.0': - 'biocontainers/gawk:5.1.0' }" - - input: - tuple val(meta), path(reads) - - output: - tuple val(meta), path("*.split.fastq.gz"), emit: reads - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def read1 = [reads].flatten()[0] - def read2 = [reads].flatten().size() > 1 ? reads[1] : '' - """ - split_lanes_awk.sh ${prefix} ${read1} ${read2} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gawk: \$(awk -Wversion | sed '1!d; s/.*Awk //; s/,.*//') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch out.split.fastq - gzip out.split.fastq - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gawk: \$(awk -Wversion | sed '1!d; s/.*Awk //; s/,.*//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/msk/custom/splitfastqbylane/meta.yml b/modules/nf-core/msk/custom/splitfastqbylane/meta.yml deleted file mode 100644 index c6a3c83..0000000 --- a/modules/nf-core/msk/custom/splitfastqbylane/meta.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "custom_splitfastqbylane" -description: Split fastq into multiple fastqs by lane -keywords: - - awk - - fastq - - split -tools: - - "custom": - description: "GNU awk" - homepage: "https://www.gnu.org/software/gawk/manual/gawk.html" - licence: ["GPL v3"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - - reads: - type: file - description: Paired end or single end FASTQ file(s) - pattern: "*.{fastq,fastq.gz}" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - reads: - type: file - description: Output fastq files containing only one read lane per file. - pattern: "*.{split.fastq.gz}" - -authors: - - "@anoronh4" -maintainers: - - "@anoronh4" diff --git a/modules/nf-core/msk/custom/splitfastqbylane/resources/usr/bin/split_lanes_awk.sh b/modules/nf-core/msk/custom/splitfastqbylane/resources/usr/bin/split_lanes_awk.sh deleted file mode 100755 index c8fcdca..0000000 --- a/modules/nf-core/msk/custom/splitfastqbylane/resources/usr/bin/split_lanes_awk.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -prefix=$1 -read1=$2 -read2=$3 - - -if [[ "${read1}" == *gz ]] ; then - cat_="zcat" -else - cat_="cat" -fi - -function a() { - awk \ - -v prefix=$3 \ - -v readnumber=$1 \ - ' - BEGIN {FS = ":"} - { - lane=$(NF-3) - flowcell=$(NF-4) - outfastq=prefix"@"flowcell"_L00"lane"_R"readnumber".split.fastq.gz" - print | "gzip > "outfastq - for (i = 1; i <= 3; i++) { - getline - print | "gzip > "outfastq - } - } - ' <( eval "$cat_ $2") -} - -echo "processing read1" -a 1 ${read1} ${prefix} -if [ ! -z ${read2} ] ; then - echo "processing read2" - a 2 ${read2} ${prefix} -fi \ No newline at end of file diff --git a/modules/nf-core/msk/custom/splitfastqbylane/tests/main.nf.test b/modules/nf-core/msk/custom/splitfastqbylane/tests/main.nf.test deleted file mode 100644 index e4e7c3e..0000000 --- a/modules/nf-core/msk/custom/splitfastqbylane/tests/main.nf.test +++ /dev/null @@ -1,66 +0,0 @@ -nextflow_process { - - name "Test Process CUSTOM_SPLITFASTQBYLANE" - script "../main.nf" - process "CUSTOM_SPLITFASTQBYLANE" - - tag "modules" - tag "modules_nfcore" - tag "custom" - tag "custom/splitfastqbylane" - - test("homo_sapiens - fastq") { - config './nextflow.config' - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) - ] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - fastq - stub") { - config './nextflow.config' - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) - ] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/nf-core/msk/custom/splitfastqbylane/tests/main.nf.test.snap b/modules/nf-core/msk/custom/splitfastqbylane/tests/main.nf.test.snap deleted file mode 100644 index 69fa8fb..0000000 --- a/modules/nf-core/msk/custom/splitfastqbylane/tests/main.nf.test.snap +++ /dev/null @@ -1,82 +0,0 @@ -{ - "sarscov2 - fastq - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "out.split.fastq.gz:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,68b779fcdaf62c97ffcd67d49ab59b0e" - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - "out.split.fastq.gz:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,68b779fcdaf62c97ffcd67d49ab59b0e" - ] - } - ], - "timestamp": "2024-01-16T11:28:05.672874" - }, - "homo_sapiens - fastq": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test@HK3MMAFX2_L001_R1.split.fastq.gz:md5,6fdae9563e6f3428ea953435cb71f762", - "test@HK3MMAFX2_L001_R2.split.fastq.gz:md5,a2315ba81e2993823e38af0b83b9e7bd", - "test@HK3MMAFX2_L002_R1.split.fastq.gz:md5,3c5e1d1bf430c964fa2ac1b7faf8c313", - "test@HK3MMAFX2_L002_R2.split.fastq.gz:md5,f3aee4f14f59bd2e26753ec0dda1d5dc", - "test@HK3MMAFX2_L003_R1.split.fastq.gz:md5,c98453d33b9bb4ff224ae5571489913b", - "test@HK3MMAFX2_L003_R2.split.fastq.gz:md5,898a6d549be78b5214c3d5647e7c3c49", - "test@HK3MMAFX2_L004_R1.split.fastq.gz:md5,11b776b50ea9bcc6670aaca952f6a939", - "test@HK3MMAFX2_L004_R2.split.fastq.gz:md5,a50125ecb428a7f534a944c5a22c8109" - ] - ] - ], - "1": [ - "versions.yml:md5,68b779fcdaf62c97ffcd67d49ab59b0e" - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test@HK3MMAFX2_L001_R1.split.fastq.gz:md5,6fdae9563e6f3428ea953435cb71f762", - "test@HK3MMAFX2_L001_R2.split.fastq.gz:md5,a2315ba81e2993823e38af0b83b9e7bd", - "test@HK3MMAFX2_L002_R1.split.fastq.gz:md5,3c5e1d1bf430c964fa2ac1b7faf8c313", - "test@HK3MMAFX2_L002_R2.split.fastq.gz:md5,f3aee4f14f59bd2e26753ec0dda1d5dc", - "test@HK3MMAFX2_L003_R1.split.fastq.gz:md5,c98453d33b9bb4ff224ae5571489913b", - "test@HK3MMAFX2_L003_R2.split.fastq.gz:md5,898a6d549be78b5214c3d5647e7c3c49", - "test@HK3MMAFX2_L004_R1.split.fastq.gz:md5,11b776b50ea9bcc6670aaca952f6a939", - "test@HK3MMAFX2_L004_R2.split.fastq.gz:md5,a50125ecb428a7f534a944c5a22c8109" - ] - ] - ], - "versions": [ - "versions.yml:md5,68b779fcdaf62c97ffcd67d49ab59b0e" - ] - } - ], - "timestamp": "2024-01-16T11:27:57.305806" - } -} \ No newline at end of file diff --git a/modules/nf-core/msk/custom/splitfastqbylane/tests/nextflow.config b/modules/nf-core/msk/custom/splitfastqbylane/tests/nextflow.config deleted file mode 100644 index 8730f1c..0000000 --- a/modules/nf-core/msk/custom/splitfastqbylane/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/modules/nf-core/msk/custom/splitfastqbylane/tests/tags.yml b/modules/nf-core/msk/custom/splitfastqbylane/tests/tags.yml deleted file mode 100644 index a60df41..0000000 --- a/modules/nf-core/msk/custom/splitfastqbylane/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -custom/splitfastqbylane: - - "modules/msk/custom/splitfastqbylane/**" diff --git a/modules/nf-core/msk/gatk4/applybqsr/environment.yml b/modules/nf-core/msk/gatk4/applybqsr/environment.yml deleted file mode 100644 index a690099..0000000 --- a/modules/nf-core/msk/gatk4/applybqsr/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: gatk4_applybqsr -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::gatk4=4.4.0.0 diff --git a/modules/nf-core/msk/gatk4/applybqsr/main.nf b/modules/nf-core/msk/gatk4/applybqsr/main.nf deleted file mode 100644 index 7e49563..0000000 --- a/modules/nf-core/msk/gatk4/applybqsr/main.nf +++ /dev/null @@ -1,51 +0,0 @@ -process GATK4_APPLYBQSR { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gatk4:4.4.0.0--py36hdfd78af_0': - 'biocontainers/gatk4:4.4.0.0--py36hdfd78af_0' }" - - input: - tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals) - path fasta - path fai - path dict - - output: - tuple val(meta), path("*.bam") , emit: bam, optional: true - tuple val(meta), path("*.cram"), emit: cram, optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def interval_command = intervals ? "--intervals $intervals" : "" - - def avail_mem = 3072 - if (!task.memory) { - log.info '[GATK ApplyBQSR] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' - } else { - avail_mem = (task.memory.mega*0.8).intValue() - } - """ - gatk --java-options "-Xmx${avail_mem}M -XX:-UsePerfData" \\ - ApplyBQSR \\ - --input $input \\ - --output ${prefix}.${input.getExtension()} \\ - --reference $fasta \\ - --bqsr-recal-file $bqsr_table \\ - $interval_command \\ - --tmp-dir . \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/msk/gatk4/applybqsr/meta.yml b/modules/nf-core/msk/gatk4/applybqsr/meta.yml deleted file mode 100644 index ab9efea..0000000 --- a/modules/nf-core/msk/gatk4/applybqsr/meta.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: gatk4_applybqsr -description: Apply base quality score recalibration (BQSR) to a bam file -keywords: - - bam - - base quality score recalibration - - bqsr - - cram - - gatk4 -tools: - - gatk4: - description: | - Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools - with a primary focus on variant discovery and genotyping. Its powerful processing engine - and high-performance computing features make it capable of taking on projects of any size. - homepage: https://gatk.broadinstitute.org/hc/en-us - documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s - doi: 10.1158/1538-7445.AM2017-3590 - licence: ["Apache-2.0"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file from alignment - pattern: "*.{bam,cram}" - - input_index: - type: file - description: BAI/CRAI file from alignment - pattern: "*.{bai,crai}" - - bqsr_table: - type: file - description: Recalibration table from gatk4_baserecalibrator - - intervals: - type: file - description: Bed file with the genomic regions included in the library (optional) - - fasta: - type: file - description: The reference fasta file - pattern: "*.fasta" - - fai: - type: file - description: Index of reference fasta file - pattern: "*.fasta.fai" - - dict: - type: file - description: GATK sequence dictionary - pattern: "*.dict" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - bam: - type: file - description: Recalibrated BAM file - pattern: "*.{bam}" - - cram: - type: file - description: Recalibrated CRAM file - pattern: "*.{cram}" -authors: - - "@yocra3" - - "@FriederikeHanssen" -maintainers: - - "@yocra3" - - "@FriederikeHanssen" diff --git a/modules/nf-core/msk/gatk4/applybqsr/tests/main.nf.test b/modules/nf-core/msk/gatk4/applybqsr/tests/main.nf.test deleted file mode 100644 index 5ee53d5..0000000 --- a/modules/nf-core/msk/gatk4/applybqsr/tests/main.nf.test +++ /dev/null @@ -1,95 +0,0 @@ -nextflow_process { - - name "Test Process GATK4_APPLYBQSR" - script "../main.nf" - process "GATK4_APPLYBQSR" - - tag "modules" - tag "modules_nfcore" - tag "gatk4" - tag "gatk4/applybqsr" - - test("sarscov2 - bam") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true), - [] - ] - input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - input[3] = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - bam - intervals") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) - ] - input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - input[3] = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("sarscov2 - cram") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_baserecalibrator_table'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) - ] - input[1] = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - input[2] = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - input[3] = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.versions).match() }, - { assert snapshot(file(process.out.cram[0][1]).name).match("test.cram") } - ) - } - } - -} diff --git a/modules/nf-core/msk/gatk4/applybqsr/tests/main.nf.test.snap b/modules/nf-core/msk/gatk4/applybqsr/tests/main.nf.test.snap deleted file mode 100644 index 1473d66..0000000 --- a/modules/nf-core/msk/gatk4/applybqsr/tests/main.nf.test.snap +++ /dev/null @@ -1,86 +0,0 @@ -{ - "sarscov2 - bam - intervals": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.bam:md5,13f8358467c9cda8a95194a1498ce605" - ] - ], - "1": [ - - ], - "2": [ - "versions.yml:md5,369f8733e6ead8380588819a648acf7a" - ], - "bam": [ - [ - { - "id": "test" - }, - "test.bam:md5,13f8358467c9cda8a95194a1498ce605" - ] - ], - "cram": [ - - ], - "versions": [ - "versions.yml:md5,369f8733e6ead8380588819a648acf7a" - ] - } - ], - "timestamp": "2023-12-09T03:10:32.612468954" - }, - "sarscov2 - cram": { - "content": [ - [ - "versions.yml:md5,369f8733e6ead8380588819a648acf7a" - ] - ], - "timestamp": "2023-12-09T03:10:46.692732651" - }, - "test.cram": { - "content": [ - "test.cram" - ], - "timestamp": "2023-12-09T03:10:46.70859771" - }, - "sarscov2 - bam": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.bam:md5,e025e4351c5a3ff426bb5521cb353e0f" - ] - ], - "1": [ - - ], - "2": [ - "versions.yml:md5,369f8733e6ead8380588819a648acf7a" - ], - "bam": [ - [ - { - "id": "test" - }, - "test.bam:md5,e025e4351c5a3ff426bb5521cb353e0f" - ] - ], - "cram": [ - - ], - "versions": [ - "versions.yml:md5,369f8733e6ead8380588819a648acf7a" - ] - } - ], - "timestamp": "2023-12-09T03:10:19.704738169" - } -} \ No newline at end of file diff --git a/modules/nf-core/msk/gatk4/applybqsr/tests/tags.yml b/modules/nf-core/msk/gatk4/applybqsr/tests/tags.yml deleted file mode 100644 index d0a5a0a..0000000 --- a/modules/nf-core/msk/gatk4/applybqsr/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -gatk4/applybqsr: - - "modules/msk/gatk4/applybqsr/**" diff --git a/subworkflows/local/module4.nf b/subworkflows/local/module4.nf index db83c93..38241dc 100755 --- a/subworkflows/local/module4.nf +++ b/subworkflows/local/module4.nf @@ -4,6 +4,7 @@ //include { TABIX_BGZIPTABIX } from '../../modules/nf-core/tabix/bgziptabix/main' include { VCF2MAF } from '../../modules/nf-core/vcf2maf/main' include { TRACEBACK } from '../../subworkflows/msk/traceback/main' +include { PVMAF_TAGTRACEBACK } from '../../modules/msk/pvmaf/tagtraceback' @@ -43,9 +44,10 @@ workflow MODULE4 { case_bams_for_traceback.mix(aux_bams).mix(normal_bams).set{ bams } // simplex/duplex channel input - - - TRACEBACK( bams,mafs,fasta,fasta_fai ) + TRACEBACK( bams, mafs, fasta, fasta_fai) + // Tag with traceback columns aka combine ref stats from access and impact + PVMAF_TAGTRACEBACK(TRACEBACK.out.genotyped_maf, [params.input, params.aux_bams]) + //TRACEBACK.out.individual_genotyped_mafs.view() TRACEBACK.out.genotyped_maf.view() diff --git a/subworkflows/msk/traceback/main.nf b/subworkflows/msk/traceback/main.nf index 326747c..8d4210b 100644 --- a/subworkflows/msk/traceback/main.nf +++ b/subworkflows/msk/traceback/main.nf @@ -1,6 +1,5 @@ include { PVMAF_CONCAT as PVMAFCONCAT_INITIAL} from '../../../modules/msk/pvmaf/concat' include { PVMAF_CONCAT as PVMAFCONCAT_GENOTYPE} from '../../../modules/msk/pvmaf/concat' -include { PVMAF_TAG } from '../../../modules/msk/pvmaf/tag' include { GENOTYPEVARIANTS_ALL as GENOTYPEVARIANTS_ALL} from '../../../modules/msk/genotypevariants/all' workflow TRACEBACK { @@ -13,11 +12,12 @@ workflow TRACEBACK { mafs // channel: [[patient:null], [maf1,...,maf2] ] reference // file(reference) reference_fai // file(reference.fai) - main: + // declare versions channel ch_versions = Channel.empty() + // Concat Input Mafs PVMAFCONCAT_INITIAL(mafs) ch_versions = ch_versions.mix(PVMAFCONCAT_INITIAL.out.versions.first()) @@ -64,10 +64,7 @@ workflow TRACEBACK { PVMAFCONCAT_GENOTYPE(all_genotype) ch_versions = ch_versions.mix(PVMAFCONCAT_GENOTYPE.out.versions.first()) - // Tag with traceback columns aka combine ref stats from access and impact - PVMAF_TAG(PVMAFCONCAT_GENOTYPE.out.maf, 'traceback', [params.input, params.aux_bams]) - ch_versions = ch_versions.mix(PVMAF_TAG.out.versions.first()) - genotyped_maf = PVMAF_TAG.out.maf + genotyped_maf = PVMAFCONCAT_GENOTYPE.out.maf emit: individual_genotyped_mafs = individual_genotype diff --git a/subworkflows/msk/traceback/meta.yml b/subworkflows/msk/traceback/meta.yml index ab9cee8..96b2e82 100644 --- a/subworkflows/msk/traceback/meta.yml +++ b/subworkflows/msk/traceback/meta.yml @@ -11,54 +11,45 @@ keywords: components: - genotypevariants/all - pvmaf/concat - - pvmaf/tag + - pvmaf/tagtraceback input: - bams: type: channel description: | - The input channel containing impact or access bams files - Structure: - [[patient:null, id:'sample'], standard.bam, standard.bam.bai, [], [], [], []] or - [[patient:null, id:'sample'], [], [], duplex.bam, duplex.bam.bai, simplex.bam, simplex.bam.bai] + An input channel containing impact or access bams files: + impact: Channel.of([patient:null, id:'sample'], standard.bam, standard.bam.bai, [], [], [], []) + access: Channel.of([patient:null, id:'sample'], [], [], duplex.bam, duplex.bam.bai, simplex.bam, simplex.bam.bai]) pattern: "*.{bam/cram/sam}" - mafs: type: channel description: | - The input channel containing maf files - Structure: // channel: [[patient:null], [maf1,...,maf2] ] - pattern: "*.{maf,txt,tsv}" - - header: - type: map - description: | - A map specifying header files to be used when concatenating the maf files. - initial: which columns to use when concatenating provided mafs - genotype: which columns to use when concatenating genotyped mafs - Structure: // [initial: 'header.txt', genotype: 'header2.txt'] + An input channel containing maf files + Structure: // channel: Channel.of([[patient:null, id:'sample'], [maf1,...,maf2]], [[patient:null, id:'sample'], [maf1,...,maf2] ]]) pattern: "*.{maf,txt,tsv}" - fasta: type: file description: | A file containing the reference FASTA file - Structure: [ path(fasta) ] + Structure: path(fasta) pattern: "*.{fasta,fa}" - fai: type: file description: | A file containing the index of the reference FASTA file - Structure: [ path(fai) ] + Structure: path(fai) pattern: "*.{fai}" output: - genotyped_maf: type: channel description: | - Channel containing genotyped maf file + Channel containing combined genotyped maf for all provided bams. Structure: [ val(meta), path(maf) ] pattern: "*.maf" - individual_genotyped_mafs: type: channel description: | - Channel containing a un-concatenated, genotyped mafs for each provided bam. + Channel containing genotyped mafs for each provided bam. Structure: [ val(meta), [maf,..,maf] ] pattern: "*.maf" - versions: diff --git a/subworkflows/msk/traceback/tests/main.nf.test b/subworkflows/msk/traceback/tests/main.nf.test index ee76c1c..9a9b521 100644 --- a/subworkflows/msk/traceback/tests/main.nf.test +++ b/subworkflows/msk/traceback/tests/main.nf.test @@ -11,27 +11,21 @@ nextflow_workflow { tag "subworkflows/traceback" tag "genotypevariants/all" tag "pvmaf/concat" - tag "pvmaf/tag" + tag "pvmaf/tagtraceback" test("standard and access bams - stub") { options "-stub" when { workflow { """ input[0] = Channel.of( - [[id:'sample1', patient: 'patient1'], - file('sample1.bam'), - file('sample1.bam.bai'), - [], [], [], [] - ], - [[id:'sample2', patient:'patient2'], [], [], - file('sample2-duplex.bam'), - file('sample2-duplex.bam.bai'), - file('sample2-simplex.bam'), - file('sample2-simplex.bam.bai') + [[id:'sample1', patient: 'patient1'],file('sample1.bam'),file('sample1.bam.bai'),[], [], [], []],[[id:'sample2', patient:'patient2'], [], [], + file('sample2-duplex.bam'), + file('sample2-duplex.bam.bai'), + file('sample2-simplex.bam'),file('sample2-simplex.bam.bai') ]) input[1] = Channel.of( - [[patient: 'patient1'], + [[patient: 'patient1'], [file('patient1.txt'),] ], [[patient: 'patient2'], @@ -39,7 +33,6 @@ nextflow_workflow { ) input[2] = [] input[3] = [] - input[4] = [] """ } } diff --git a/subworkflows/msk/traceback/tests/main.nf.test.snap b/subworkflows/msk/traceback/tests/main.nf.test.snap index 99193de..628c6c0 100644 --- a/subworkflows/msk/traceback/tests/main.nf.test.snap +++ b/subworkflows/msk/traceback/tests/main.nf.test.snap @@ -9,7 +9,7 @@ ], "2": [ - "versions.yml:md5,d8528dd2b53c5e8f814def1788328193", + "versions.yml:md5,bb5f5880ef3572733a2349212e8ab549", "versions.yml:md5,f31415b0aae41057f59e929b99af930f" ], "genotyped_maf": [ @@ -19,11 +19,11 @@ ], "versions": [ - "versions.yml:md5,d8528dd2b53c5e8f814def1788328193", + "versions.yml:md5,bb5f5880ef3572733a2349212e8ab549", "versions.yml:md5,f31415b0aae41057f59e929b99af930f" ] } ], - "timestamp": "2024-03-04T16:25:14.45872" + "timestamp": "2024-06-18T13:38:00.215685" } } \ No newline at end of file