-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pb deepvariant #7363
base: master
Are you sure you want to change the base?
Update pb deepvariant #7363
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,35 +7,35 @@ process PARABRICKS_DEEPVARIANT { | |
container "nvcr.io/nvidia/clara/clara-parabricks:4.4.0-1" | ||
|
||
input: | ||
tuple val(meta), path(input), path(input_index), path(interval_file) | ||
tuple val(meta), path(bam), path(bai), path(interval_file) | ||
tuple val(ref_meta), path(fasta) | ||
path model_file | ||
|
||
output: | ||
tuple val(meta), path("*.vcf"), optional: true, emit: vcf | ||
tuple val(meta), path("*.g.vcf.gz"), optional: true, emit: gvcf | ||
path "versions.yml", emit: versions | ||
tuple val(meta), path("*.vcf"), optional: true, emit: vcf | ||
tuple val(meta), path("*.g.vcf"), optional: true, emit: gvcf | ||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a possibility to return gzipped vcf files as standard? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right now there is no way for Parabricks directly to return gzipped vcf files. It would have to be added as an additional step. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maye you can add bgzip to the parabricks docker/singularity container? Then we could easily do it in the script section of the module. That would be very helpful! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
path "versions.yml", emit: versions | ||
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you align these nicely? (as it was before) |
||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
// Exit if running this module with -profile conda / -profile mamba | ||
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { | ||
exit 1, "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead." | ||
} | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def output_file = ("--gvcf" =~ task.ext.args)? "${prefix}.g.vcf.gz" : "${prefix}.vcf" | ||
def interval_file_command = interval_file ? interval_file.collect{"--interval-file $it"}.join(' ') : "" | ||
def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" | ||
def output_file = ("--gvcf" =~ task.ext.args)? "${prefix}.g.vcf" : "${prefix}.vcf" | ||
def interval_file_option = interval_file ? interval_file.collect{"--interval-file $it"}.join(' ') : "" | ||
def model_command = model_file ? "--pb-model-file $model_file" : "" | ||
def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' | ||
|
||
""" | ||
pbrun \\ | ||
deepvariant \\ | ||
--ref $fasta \\ | ||
--in-bam $input \\ | ||
--in-bam $bam \\ | ||
--out-variants $output_file \\ | ||
$interval_file_command \\ | ||
$num_gpus \\ | ||
${interval_file_option} \\ | ||
${num_gpus} \\ | ||
${model_command} \\ | ||
$args | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
|
@@ -46,7 +46,7 @@ process PARABRICKS_DEEPVARIANT { | |
|
||
stub: | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def output_cmd = ("--gvcf" =~ task.ext.args)? "echo '' | gzip > ${prefix}.g.vcf.gz" : "touch ${prefix}.vcf" | ||
def output_cmd = ("--gvcf" =~ task.ext.args)? "echo '' | gzip > ${prefix}.g.vcf" : "touch ${prefix}.vcf" | ||
""" | ||
$output_cmd | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,12 @@ nextflow_process { | |
|
||
test("human - bam") { | ||
|
||
config './nextflow.config' | ||
|
||
when { | ||
params { | ||
module_args = '' | ||
} | ||
process { | ||
""" | ||
input[0] = [ | ||
|
@@ -25,6 +30,7 @@ nextflow_process { | |
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
@@ -44,9 +50,15 @@ nextflow_process { | |
|
||
test("human - bam - intervals") { | ||
|
||
config './nextflow.config' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is now added to all tests we can also move it to the top of the file avoiding too much code duplication :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes good idea - we can do that! This seemed to be the pattern used in other module tests, but happy to adjust! |
||
|
||
when { | ||
params { | ||
module_args = '' | ||
} | ||
process { | ||
""" | ||
|
||
input[0] = [ | ||
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
|
@@ -57,6 +69,7 @@ nextflow_process { | |
[ id:'ref'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
@@ -94,6 +107,7 @@ nextflow_process { | |
[ id:'ref'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
@@ -132,6 +146,7 @@ nextflow_process { | |
[ id:'ref'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
@@ -155,6 +170,9 @@ nextflow_process { | |
options "-stub" | ||
|
||
when { | ||
params { | ||
module_args = '' | ||
} | ||
process { | ||
""" | ||
input[0] = [ | ||
|
@@ -167,6 +185,7 @@ nextflow_process { | |
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
@@ -185,7 +204,6 @@ nextflow_process { | |
|
||
test("human - bam - intervals - gvcf - stub") { | ||
|
||
config './nextflow.config' | ||
options "-stub" | ||
|
||
when { | ||
|
@@ -204,6 +222,7 @@ nextflow_process { | |
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also include a test that uses this model file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes good idea - @gburnett-nvidia and I will find a model file and add a test. Will have to also find a way to host the model file... somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the model file can go into nf-core/test-datasets