Adding stubs to PicardLiftovervcf, GATK4_mergevcfs and filterMutectCalls (#1621)

* feat added stubs to picard_liftovervcf

* feat adding stubs to gatk4_mergevcfs

* feat adding stubs to gatk4_filtermutectcalls

* fix tests

* fix output name filtermutectcalls

* fix test

* fix added missing [

* Update tests/modules/gatk4/mergevcfs/test.yml

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>

* Update tests/modules/gatk4/filtermutectcalls/test.yml

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>

* Update tests/modules/picard/liftovervcf/test.yml

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>

* Update modules/gatk4/filtermutectcalls/main.nf

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>

* Update modules/gatk4/filtermutectcalls/main.nf

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>

* Update modules/gatk4/mergevcfs/main.nf

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>

* Update modules/gatk4/mergevcfs/main.nf

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>

* Update modules/picard/liftovervcf/main.nf

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>

* Trying something on picard_liftovervcf

* fix adding test data for stubs

* fix added bracket and unindented workflow

* fix picard 2.27.1 -> 2.27.0 to solve PaddingError

* Update main.nf

fix added tbi to stub

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>
Co-authored-by: Matthieu Muffato <mm49@sanger.ac.uk>
This commit is contained in:
Lucpen 2022-09-28 09:50:11 +02:00 committed by GitHub
parent ec22f9a907
commit f434d0c671
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 109 additions and 1 deletions

View file

@ -54,4 +54,17 @@ process GATK4_FILTERMUTECTCALLS {
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.vcf.gz
touch ${prefix}.vcf.gz.tbi
touch ${prefix}.vcf.gz.filteringStats.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -44,4 +44,16 @@ process GATK4_MERGEVCFS {
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.vcf.gz
touch ${prefix}.vcf.gz.tbi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -43,7 +43,19 @@ process PICARD_LIFTOVERVCF {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
picard: \$(picard LiftoverVcf --version 2>&1 | grep -o 'Version.*' | cut -f2- -d:)
picard: \$(echo \$(picard LiftoverVcf --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:)
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.lifted.vcf.gz
touch ${prefix}.unlifted.vcf.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
picard: \$(echo \$(picard LiftoverVcf --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:)
END_VERSIONS
"""
}

View file

@ -63,3 +63,23 @@ workflow test_gatk4_filtermutectcalls_use_val {
GATK4_FILTERMUTECTCALLS ( input, fasta, fai, dict )
}
workflow test_gatk4_filtermutectcalls_base_stubs {
input = [
[ id:'test'], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_test2_paired_mutect2_calls_vcf_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_test2_paired_mutect2_calls_vcf_gz_tbi'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_test2_paired_mutect2_calls_vcf_gz_stats'], checkIfExists: true),
[],
[],
[],
[]
]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
GATK4_FILTERMUTECTCALLS ( input, fasta, fai, dict )
}

View file

@ -33,3 +33,14 @@
md5sum: 95cc3e37705bd3b97a292c5d46ab82f3
- path: output/gatk4/test.filtered.vcf.gz.tbi
- path: output/gatk4/versions.yml
- name: gatk4 filtermutectcalls test_gatk4_filtermutectcalls_base_stubs
command: nextflow run ./tests/modules/gatk4/filtermutectcalls -entry test_gatk4_filtermutectcalls_base_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/filtermutectcalls/nextflow.config -stub-run
tags:
- gatk4
- gatk4/filtermutectcalls
files:
- path: output/gatk4/test.filtered.vcf.gz
- path: output/gatk4/test.filtered.vcf.gz.filteringStats.tsv
- path: output/gatk4/test.filtered.vcf.gz.tbi
- path: output/gatk4/versions.yml

View file

@ -24,3 +24,12 @@ workflow test_gatk4_mergevcfs_no_dict {
GATK4_MERGEVCFS ( input, [] )
}
workflow test_gatk4_mergevcfs_no_dict_stubs {
input = [ [ id:'test' ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ]
]
GATK4_MERGEVCFS ( input, [] )
}

View file

@ -19,3 +19,12 @@
- path: output/gatk4/test.vcf.gz
md5sum: 5b289bda88d3a3504f2e19ee8cff177c
- path: output/gatk4/versions.yml
- name: gatk4 mergevcfs test_gatk4_mergevcfs_no_dict_stubs
command: nextflow run ./tests/modules/gatk4/mergevcfs -entry test_gatk4_mergevcfs_no_dict_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergevcfs/nextflow.config -stub-run
tags:
- gatk4/mergevcfs
- gatk4
files:
- path: output/gatk4/test.vcf.gz
- path: output/gatk4/versions.yml

View file

@ -15,3 +15,15 @@ workflow test_picard_liftovervcf {
PICARD_LIFTOVERVCF ( input_vcf, dict, chain, fasta )
}
workflow test_picard_liftovervcf_stubs {
input_vcf = [ [ id:'test' ],
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true)
]
dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
chain = file(params.test_data['homo_sapiens']['genome']['genome_chain_gz'], checkIfExists: true)
fasta = [ file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ]
PICARD_LIFTOVERVCF ( input_vcf, dict, chain, fasta )
}

View file

@ -9,3 +9,13 @@
- "chr22"
- path: output/picard/test.unlifted.vcf.gz
- path: output/picard/versions.yml
- name: picard liftovervcf test_picard_liftovervcf_stubs
command: nextflow run tests/modules/picard/liftovervcf -entry test_picard_liftovervcf_stubs -c tests/config/nextflow.config -stub-run
tags:
- picard/liftovervcf
- picard
files:
- path: output/picard/test.lifted.vcf.gz
- path: output/picard/test.unlifted.vcf.gz
- path: output/picard/versions.yml