diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f64d02f..61f767d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,4 @@ jobs: if [[ $NXF_VER = '' ]]; then sleep 1200; fi - name: BASIC Run the basic pipeline with docker run: | - nextflow run ${GITHUB_WORKSPACE} -profile test,docker - - name: BASIC Run the basic pipeline when --runcontig set to "ALT_HLA" (contigs does not exist in bam) - run: | - nextflow run ${GITHUB_WORKSPACE} -profile test,docker --runcontigs "ALT_HLA" \ No newline at end of file + nextflow run ${GITHUB_WORKSPACE} -profile test,docker \ No newline at end of file diff --git a/.gitignore b/.gitignore index a9cfb02..bc7f825 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__ output/ results/ result/ +results2/ results37/ test.xml test_output/ @@ -19,3 +20,4 @@ work/ testdata_hg37/ .github/CODEOWNERS-tmp bin/vcfparser.pyc +singularity/ diff --git a/assets/samplesheet_hg38_WGS.csv b/assets/samplesheet_hg38_WGS.csv index 1867eb4..5b241fd 100644 --- a/assets/samplesheet_hg38_WGS.csv +++ b/assets/samplesheet_hg38_WGS.csv @@ -1,3 +1,2 @@ sample,tumor,tumor_index,control,control_index -SEQC2_LL1,/omics/odcf/analysis/OE0526_projects/public_data_analyses/seqc2/sequencing/whole_genome_sequencing/results_per_pid/SEQC2_LL1/alignment/tumor01_SEQC2_LL1_merged.mdup.bam,/omics/odcf/analysis/OE0526_projects/public_data_analyses/seqc2/sequencing/whole_genome_sequencing/results_per_pid/SEQC2_LL1/alignment/tumor01_SEQC2_LL1_merged.mdup.bam.bai,/omics/odcf/analysis/OE0526_projects/public_data_analyses/seqc2/sequencing/whole_genome_sequencing/results_per_pid/SEQC2_LL1/alignment/control01_SEQC2_LL1_merged.mdup.bam,/omics/odcf/analysis/OE0526_projects/public_data_analyses/seqc2/sequencing/whole_genome_sequencing/results_per_pid/SEQC2_LL1/alignment/control01_SEQC2_LL1_merged.mdup.bam.bai -SEQC2_LL2,/omics/odcf/project/public_data/seqc2/sequencing/whole_genome_sequencing/view-by-pid/SEQC2_IL2/tumor01/paired/merged-alignment/tumor01_SEQC2_IL2_merged.mdup.bam,/omics/odcf/project/public_data/seqc2/sequencing/whole_genome_sequencing/view-by-pid/SEQC2_IL2/tumor01/paired/merged-alignment/tumor01_SEQC2_IL2_merged.mdup.bam.bai,/omics/odcf/project/public_data/seqc2/sequencing/whole_genome_sequencing/view-by-pid/SEQC2_IL2/control01/paired/merged-alignment/control01_SEQC2_IL2_merged.mdup.bam,/omics/odcf/project/public_data/seqc2/sequencing/whole_genome_sequencing/view-by-pid/SEQC2_IL2/control01/paired/merged-alignment/control01_SEQC2_IL2_merged.mdup.bam.bai \ No newline at end of file +SEQC2_LL1,/omics/odcf/analysis/OE0526_projects/public_data_analyses/seqc2/sequencing/whole_genome_sequencing/results_per_pid/SEQC2_LL1/alignment/tumor01_SEQC2_LL1_merged.mdup.bam,/omics/odcf/analysis/OE0526_projects/public_data_analyses/seqc2/sequencing/whole_genome_sequencing/results_per_pid/SEQC2_LL1/alignment/tumor01_SEQC2_LL1_merged.mdup.bam.bai,/omics/odcf/analysis/OE0526_projects/public_data_analyses/seqc2/sequencing/whole_genome_sequencing/results_per_pid/SEQC2_LL1/alignment/control01_SEQC2_LL1_merged.mdup.bam,/omics/odcf/analysis/OE0526_projects/public_data_analyses/seqc2/sequencing/whole_genome_sequencing/results_per_pid/SEQC2_LL1/alignment/control01_SEQC2_LL1_merged.mdup.bam.bai \ No newline at end of file diff --git a/conf/modules.config b/conf/modules.config index d3cc3d7..a32597d 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -64,7 +64,7 @@ process { mode: params.publish_dir_mode ] } - withName: FILE_CONCATENATOR { + withName: SORT_NONSTANDARD_VCF { publishDir = [ path: {"${params.outdir}/${meta.id}"}, pattern: "*{.vcf.gz,vcf.gz.tbi}", @@ -175,12 +175,6 @@ process { ] ] } - withName: 'CONVERT_TO_VCF' { - publishDir = [ - path: { "${params.outdir}/test" }, - enabled: false - ] - } withName: 'BCFTOOLS_SORT' { publishDir = [ path: { "${params.outdir}/${meta.id}/standard_vcf/" }, @@ -199,7 +193,7 @@ process { // Don't publish results for these processes // process { - withName: 'GREP_SAMPLENAME|ANNOVAR|MUTATION_DISTANCE|CONTEXT_FREQUENCIES|ANNOTATE_VCF|FILTER_BY_CRIT|SNV_RELIABILITY_PIPE|DBSNP_COUNTER|FLAG_BIAS|CONFIDENCE_ANNOTATION' { + withName: 'GREP_SAMPLENAME|ANNOVAR|MUTATION_DISTANCE|CONTEXT_FREQUENCIES|ANNOTATE_VCF|FILTER_BY_CRIT|SNV_RELIABILITY_PIPE|DBSNP_COUNTER|FLAG_BIAS|CONFIDENCE_ANNOTATION|CONVERT_TO_VCF|FILE_CONCATENATOR' { publishDir = [ path: { "${params.outdir}/test" }, enabled: false diff --git a/modules/local/file_concatenator.nf b/modules/local/file_concatenator.nf index 678ab24..c3602aa 100644 --- a/modules/local/file_concatenator.nf +++ b/modules/local/file_concatenator.nf @@ -21,9 +21,9 @@ process FILE_CONCATENATOR { def prefix = task.ext.prefix ?: "${meta.id}" """ - headeredFileConcatenator.pl $vcfs > snvs_${prefix}_raw.vcf + headeredFileConcatenator.pl $vcfs > snvs_${prefix}.vcf - bgzip snvs_${prefix}_raw.vcf && tabix -p vcf snvs_${prefix}_raw.vcf.gz + bgzip snvs_${prefix}.vcf && tabix -p vcf snvs_${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/seq_context_annotator.nf b/modules/local/seq_context_annotator.nf index 1cc1393..5e46085 100644 --- a/modules/local/seq_context_annotator.nf +++ b/modules/local/seq_context_annotator.nf @@ -26,11 +26,8 @@ process SEQ_CONTEXT_ANNOTATOR { """ seqContext_annotator.pl fastaFromBed $vcf $fasta 10 | \\ rawSnvFilter.py --outf=${prefix}.${intervals}.bias.vcf.temp $args - - (head -n 5000 ${prefix}.${intervals}.bias.vcf.temp | \\ - grep "#" ; cat ${prefix}.${intervals}.bias.vcf.temp | \\ - grep -v "#" | \\ - sort -T . -k1,1V -n -k2,2n ) > ${prefix}.${intervals}.bias.vcf + + awk '/^#/ {print; next} {print | "sort -T . -k1,1V -k2,2n"}' ${prefix}.${intervals}.bias.vcf.temp > ${prefix}.${intervals}.bias.vcf bcftools stats ${prefix}.${intervals}.bias.vcf > ${prefix}.${intervals}.bias.bcftools_stats.txt diff --git a/modules/local/sort_nonstandard_vcf.nf b/modules/local/sort_nonstandard_vcf.nf new file mode 100644 index 0000000..aba1c50 --- /dev/null +++ b/modules/local/sort_nonstandard_vcf.nf @@ -0,0 +1,33 @@ +process SORT_NONSTANDARD_VCF { + tag "$meta.id" + label 'process_single' + + conda (params.enable_conda ? "" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'docker://kubran/samtools:v1.9':'kubran/samtools:v1.9' }" + + input: + tuple val(meta), path(vcf_gz), path(index) + + output: + tuple val(meta), path("*_raw.vcf.gz"),path("*_raw.vcf.gz.tbi") , emit: output + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + zcat $vcf_gz | \ + awk 'BEGIN {header=1} /^#/ {print; next} {header=0; print | "sort -T . -k1,1V -k2,2n"}' | \ + bgzip > snvs_${prefix}_raw.vcf.gz + + tabix -p vcf snvs_${prefix}_raw.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ + +} \ No newline at end of file diff --git a/modules/nf-core/modules/bcftools/mpileup/main.nf b/modules/nf-core/modules/bcftools/mpileup/main.nf index 263311c..a2f02e3 100644 --- a/modules/nf-core/modules/bcftools/mpileup/main.nf +++ b/modules/nf-core/modules/bcftools/mpileup/main.nf @@ -4,8 +4,7 @@ process BCFTOOLS_MPILEUP { conda (params.enable_conda ? "bioconda::bcftools=1.9" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.9--h47928c2_2': - 'quay.io/biocontainers/bcftools:1.9--h47928c2_2' }" + 'docker://kubran/bcftools:1.9':'kubran/bcftools:1.9' }" input: tuple val(meta), path(tumor), path(tumor_bai), path(control), path(control_bai), val(tumorname), val(controlname), val(intervals), path(interval_file) diff --git a/modules/nf-core/modules/bcftools/reheader/environment.yml b/modules/nf-core/modules/bcftools/reheader/environment.yml deleted file mode 100644 index aab0dc9..0000000 --- a/modules/nf-core/modules/bcftools/reheader/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: bcftools_reheader -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::bcftools=1.18 diff --git a/modules/nf-core/modules/bcftools/reheader/main.nf b/modules/nf-core/modules/bcftools/reheader/main.nf deleted file mode 100644 index 25716cb..0000000 --- a/modules/nf-core/modules/bcftools/reheader/main.nf +++ /dev/null @@ -1,74 +0,0 @@ -process BCFTOOLS_REHEADER { - tag "$meta.id" - label 'process_low' - - //conda "${moduleDir}/environment.yml" - conda (params.enable_conda ? "${moduleDir}/environment.yml" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'quay.io/biocontainers/bcftools:1.18--h8b25389_0' }" - - input: - tuple val(meta), path(vcf), path(header), path(samples) - tuple val(meta2), path(fai) - - output: - tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}"), emit: vcf - 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 fai_argument = fai ? "--fai $fai" : "" - def header_argument = header ? "--header $header" : "" - def samples_argument = samples ? "--samples $samples" : "" - - def args2 = task.ext.args2 ?: '--output-type z' - def extension = args2.contains("--output-type b") || args2.contains("-Ob") ? "bcf.gz" : - args2.contains("--output-type u") || args2.contains("-Ou") ? "bcf" : - args2.contains("--output-type z") || args2.contains("-Oz") ? "vcf.gz" : - args2.contains("--output-type v") || args2.contains("-Ov") ? "vcf" : - "vcf" - def vcf_name = vcf.getExtension() == "gz" ? vcf.getBaseName() : vcf.getName() - vcf_name = vcf_name.take(vcf_name.size() - 4) - - """ - bcftools \\ - reheader \\ - $fai_argument \\ - $header_argument \\ - $samples_argument \\ - $args \\ - --threads $task.cpus \\ - $vcf \\ - | bcftools view \\ - $args2 \\ - --output ${vcf_name}.header.${extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') - END_VERSIONS - """ - - stub: - def args2 = task.ext.args2 ?: '--output-type z' - def prefix = task.ext.prefix ?: "${meta.id}" - - def extension = args2.contains("--output-type b") || args2.contains("-Ob") ? "bcf.gz" : - args2.contains("--output-type u") || args2.contains("-Ou") ? "bcf" : - args2.contains("--output-type z") || args2.contains("-Oz") ? "vcf.gz" : - args2.contains("--output-type v") || args2.contains("-Ov") ? "vcf" : - "vcf" - """ - touch ${prefix}.${extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/modules/bcftools/reheader/meta.yml b/modules/nf-core/modules/bcftools/reheader/meta.yml deleted file mode 100644 index 690d4ea..0000000 --- a/modules/nf-core/modules/bcftools/reheader/meta.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: bcftools_reheader -description: Reheader a VCF file -keywords: - - reheader - - vcf - - update header -tools: - - reheader: - description: | - Modify header of VCF/BCF files, change sample names. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://samtools.github.io/bcftools/bcftools.html#reheader - doi: 10.1093/gigascience/giab008 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: VCF/BCF file - pattern: "*.{vcf.gz,vcf,bcf}" - - header: - type: file - description: New header to add to the VCF - pattern: "*.{header.txt}" - - samples: - type: file - description: File containing sample names to update (one sample per line) - pattern: "*.{samples.txt}" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'genome' ] - - fai: - type: file - description: Fasta index to update header sequences with - pattern: "*.{fai}" -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" - - vcf: - type: file - description: VCF with updated header, bgzipped per default - pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" -authors: - - "@bjohnnyd" - - "@jemten" - - "@ramprasadn" -maintainers: - - "@bjohnnyd" - - "@jemten" - - "@ramprasadn" diff --git a/modules/nf-core/modules/bcftools/reheader/tests/bcf.config b/modules/nf-core/modules/bcftools/reheader/tests/bcf.config deleted file mode 100644 index 2b7dff5..0000000 --- a/modules/nf-core/modules/bcftools/reheader/tests/bcf.config +++ /dev/null @@ -1,4 +0,0 @@ -process { - ext.args2 = { "--no-version --output-type b" } - ext.prefix = "tested" -} \ No newline at end of file diff --git a/modules/nf-core/modules/bcftools/reheader/tests/main.nf.test b/modules/nf-core/modules/bcftools/reheader/tests/main.nf.test deleted file mode 100644 index f3200cb..0000000 --- a/modules/nf-core/modules/bcftools/reheader/tests/main.nf.test +++ /dev/null @@ -1,197 +0,0 @@ -nextflow_process { - - name "Test Process BCFTOOLS_REHEADER" - script "../main.nf" - process "BCFTOOLS_REHEADER" - tag "modules" - tag "modules_nfcore" - tag "bcftools" - tag "bcftools/reheader" - - test("sarscov2 - [vcf, [], []], fai - vcf output") { - - config "./vcf.config" - when { - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - [], - [] - ] - input[1] = [ - [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - [vcf, [], []], fai - vcf.gz output") { - - config "./vcf.gz.config" - when { - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - [], - [] - ] - input[1] = [ - [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - [vcf, [], []], fai - bcf output") { - - config "./bcf.config" - when { - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - [], - [] - ] - input[1] = [ - [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - [vcf, header, []], []") { - - config "./vcf.config" - when { - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), - [] - ] - input[1] = [ - [ id:'genome' ], // meta map - [] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - [vcf, [], samples], fai") { - - config "./vcf.config" - when { - - process { - """ - ch_no_samples = Channel.of([ - [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - [] - ]) - ch_samples = Channel.of(["samples.txt", "new_name"]) - .collectFile(newLine:true) - input[0] = ch_no_samples.combine(ch_samples) - input[1] = [ - [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - [vcf, [], []], fai - stub") { - - options "-stub" - config "./vcf.config" - when { - - process { - """ - input[0] = [ - [ id:'test', single_end:false ], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - [], - [] - ] - input[1] = [ - [ id:'genome' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.vcf[0][1]).name, - process.out.versions, - ).match() } - ) - } - - } - -} diff --git a/modules/nf-core/modules/bcftools/reheader/tests/main.nf.test.snap b/modules/nf-core/modules/bcftools/reheader/tests/main.nf.test.snap deleted file mode 100644 index 112736a..0000000 --- a/modules/nf-core/modules/bcftools/reheader/tests/main.nf.test.snap +++ /dev/null @@ -1,166 +0,0 @@ -{ - "sarscov2 - [vcf, [], []], fai - vcf output": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.vcf:md5,8e722884ffb75155212a3fc053918766" - ] - ], - "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.vcf:md5,8e722884ffb75155212a3fc053918766" - ] - ], - "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ] - } - ], - "timestamp": "2023-11-29T13:05:44.058376693" - }, - "sarscov2 - [vcf, [], []], fai - bcf output": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.bcf.gz:md5,c31d9afd8614832c2a46d9a55682c97a" - ] - ], - "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.bcf.gz:md5,c31d9afd8614832c2a46d9a55682c97a" - ] - ], - "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ] - } - ], - "timestamp": "2023-11-29T13:06:03.793372514" - }, - "sarscov2 - [vcf, [], []], fai - vcf.gz output": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.vcf.gz:md5,a1e45fe6d2b386fc2611766e5d2937ee" - ] - ], - "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.vcf.gz:md5,a1e45fe6d2b386fc2611766e5d2937ee" - ] - ], - "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ] - } - ], - "timestamp": "2023-11-29T13:05:53.954090441" - }, - "sarscov2 - [vcf, [], []], fai - stub": { - "content": [ - "tested.vcf", - [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ] - ], - "timestamp": "2023-11-29T13:06:33.549685303" - }, - "sarscov2 - [vcf, [], samples], fai": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.vcf:md5,c64c373c10b0be24b29d6f18708ec1e8" - ] - ], - "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.vcf:md5,c64c373c10b0be24b29d6f18708ec1e8" - ] - ], - "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ] - } - ], - "timestamp": "2023-11-29T13:06:23.474745156" - }, - "sarscov2 - [vcf, header, []], []": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.vcf:md5,3189bc9a720d5d5d3006bf72d91300cb" - ] - ], - "1": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ], - "vcf": [ - [ - { - "id": "test", - "single_end": false - }, - "tested.vcf:md5,3189bc9a720d5d5d3006bf72d91300cb" - ] - ], - "versions": [ - "versions.yml:md5,fbf8ac8da771b6295a47392003f983ce" - ] - } - ], - "timestamp": "2023-11-29T13:06:13.841648691" - } -} \ No newline at end of file diff --git a/modules/nf-core/modules/bcftools/reheader/tests/tags.yml b/modules/nf-core/modules/bcftools/reheader/tests/tags.yml deleted file mode 100644 index c252941..0000000 --- a/modules/nf-core/modules/bcftools/reheader/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -bcftools/reheader: - - modules/nf-core/bcftools/reheader/** diff --git a/modules/nf-core/modules/bcftools/reheader/tests/vcf.config b/modules/nf-core/modules/bcftools/reheader/tests/vcf.config deleted file mode 100644 index 820f2ae..0000000 --- a/modules/nf-core/modules/bcftools/reheader/tests/vcf.config +++ /dev/null @@ -1,4 +0,0 @@ -process { - ext.args2 = { "--no-version" } - ext.prefix = "tested" -} \ No newline at end of file diff --git a/modules/nf-core/modules/bcftools/reheader/tests/vcf.gz.config b/modules/nf-core/modules/bcftools/reheader/tests/vcf.gz.config deleted file mode 100644 index c3031c3..0000000 --- a/modules/nf-core/modules/bcftools/reheader/tests/vcf.gz.config +++ /dev/null @@ -1,4 +0,0 @@ -process { - ext.args2 = { "--no-version --output-type z" } - ext.prefix = "tested" -} \ No newline at end of file diff --git a/modules/nf-core/modules/bcftools/sort/main.nf b/modules/nf-core/modules/bcftools/sort/main.nf index ef2513f..993b97e 100644 --- a/modules/nf-core/modules/bcftools/sort/main.nf +++ b/modules/nf-core/modules/bcftools/sort/main.nf @@ -5,8 +5,7 @@ process BCFTOOLS_SORT { //conda "${moduleDir}/environment.yml" conda (params.enable_conda ? "${moduleDir}/environment.yml" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': - 'quay.io/biocontainers/bcftools:1.18--h8b25389_0' }" + 'docker://kubran/bcftools:1.9':'kubran/bcftools:1.9' }" input: tuple val(meta), path(vcf), path(index) @@ -32,7 +31,7 @@ process BCFTOOLS_SORT { """ bcftools \\ sort \\ - --output ${vcf_name}.sorted.${extension} \\ + --output-file ${vcf_name}.sorted.${extension} \\ --temp-dir . \\ $args \\ $vcf diff --git a/run_pipeline.sh b/run_pipeline.sh index 5ce5fac..82fb564 100644 --- a/run_pipeline.sh +++ b/run_pipeline.sh @@ -1,3 +1,3 @@ #!/bin/bash module load nextflow/22.07.1-edge -nextflow run main.nf -profile dkfz_cluster_hg38,singularity --outdir results \ No newline at end of file +nextflow run main.nf -profile dkfz_cluster_hg38,singularity --outdir results2 --input assets/samplesheet_hg38_WGS.csv -resume \ No newline at end of file diff --git a/subworkflows/local/mpileup_snv_call.nf b/subworkflows/local/mpileup_snv_call.nf index 125d0b0..417108f 100644 --- a/subworkflows/local/mpileup_snv_call.nf +++ b/subworkflows/local/mpileup_snv_call.nf @@ -8,6 +8,7 @@ include { BCFTOOLS_MPILEUP } from '../../modules/nf-core/modules/bcftools/m include { MPILEUP_COMPARE } from '../../modules/local/mpileup_compare.nf' addParams( options: params.options ) include { SEQ_CONTEXT_ANNOTATOR } from '../../modules/local/seq_context_annotator.nf' addParams( options: params.options ) include { FILE_CONCATENATOR } from '../../modules/local/file_concatenator.nf' addParams( options: params.options ) +include { SORT_NONSTANDARD_VCF } from '../../modules/local/sort_nonstandard_vcf.nf' addParams( options: params.options ) workflow MPILEUP_SNV_CALL { @@ -120,7 +121,17 @@ workflow MPILEUP_SNV_CALL { combined_vcf ) versions = versions.mix(FILE_CONCATENATOR.out.versions) - vcf_ch=FILE_CONCATENATOR.out.vcf + + // + // MODULE: SORT_NONSTANDARD_VCF + // + // Sort raw file + SORT_NONSTANDARD_VCF( + FILE_CONCATENATOR.out.vcf + ) + versions = versions.mix(SORT_NONSTANDARD_VCF.out.versions) + vcf_ch=SORT_NONSTANDARD_VCF.out.output + emit: vcf_ch