Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- A new analysis option `mito` to call and annotate only mitochondrial variants [#608](https://github.com/nf-core/raredisease/pull/608)
- An option to restrict analysis to specific contigs [#644](https://github.com/nf-core/raredisease/pull/644)
- Fastp and ngsbits output files as input of MultiQC [#647](https://github.com/nf-core/raredisease/pull/647/).
- Replace DeepVariant process with a subworkflow [#651](https://github.com/nf-core/raredisease/pull/651)

### `Changed`

Expand Down
13 changes: 11 additions & 2 deletions conf/modules/call_snv_deepvariant.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,20 @@ process {
ext.when = params.variant_caller.equals("deepvariant")
}

withName: '.*CALL_SNV_DEEPVARIANT:DEEPVARIANT' {
withName: '.*CALL_SNV_DEEPVARIANT:DEEPVARIANT:DEEPVARIANT_MAKEEXAMPLES' {
ext.args = { [
"--model_type=${params.analysis_type.toUpperCase()}",
"--channels insert_size",
meta.sex == "1" ? params.genome == 'GRCh37' ? '--haploid_contigs="X,Y"' : '--haploid_contigs="chrX,chrY"' : ''
].join(' ') }
}

withName: '.*CALL_SNV_DEEPVARIANT:DEEPVARIANT:DEEPVARIANT_CALLVARIANTS' {
ext.args = { [
"--checkpoint /opt/models/${params.analysis_type.toLowerCase()}",
].join(' ') }
}

withName: '.*CALL_SNV_DEEPVARIANT:DEEPVARIANT:DEEPVARIANT_POSTPROCESSVARIANTS' {
ext.prefix = { "${meta.id}_deepvar" }
}

Expand Down
2 changes: 1 addition & 1 deletion conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ process {
withName: 'MARKDUPLICATES' {
memory = { check_max( 90.GB * task.attempt, 'memory' ) }
}
withName: 'DEEPVARIANT' {
withName: '.*:DEEPVARIANT:DEEPVARIANT_CALLVARIANTS' {
cpus = 24
memory = { check_max( 90.GB * task.attempt, 'memory' ) }
}
Expand Down
19 changes: 19 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -560,3 +560,22 @@ plugins {
```

This should go in your Nextflow configuration file, specified with `-c <YOURCONFIG>` when running the pipeline.

### Calling variants on the GPU with DeepVariant

To use GPU for variant calling you have to override the container image. The GPU-enabled DeepVariant image is very large, so it's not used by default. You need to identify the DeepVariant version used by raredisease. Then replace the container image of the `DEEPVARIANT_CALLVARIANTS` process with one from Google's Docker Hub, `docker.io/google/deepvariant:X.Y.Z-gpu`, changing "X.Y.Z" to the version.

For singularity / apptainer you can use containerOptions = '--nv' to enable GPU access. For Docker, use the `--gpus` option.

If using a queue system like SLURM, or the Cloud, you usually have to enable certain options to get access to GPUs, e.g. the `queue` directive. If you run locally on a server with a single GPU, you can set `maxForks = 1` to prevent starting simultaneous GPU jobs for different samples.

Configuration example:

```
withName:"DEEPVARIANT_CALLVARIANTS" {
cpus = 6
containerOptions = '--nv'
container = 'docker.io/google/deepvariant:1.6.1-gpu'
maxForks = 1
}
```
19 changes: 17 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,20 @@
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"deepvariant/rundeepvariant": {
"deepvariant/callvariants": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
"installed_by": ["deepvariant"]
},
"deepvariant/makeexamples": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["deepvariant"]
},
"deepvariant/postprocessvariants": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["deepvariant"]
},
"eklipse": {
"branch": "master",
Expand Down Expand Up @@ -517,6 +527,11 @@
},
"subworkflows": {
"nf-core": {
"deepvariant": {
"branch": "master",
"git_sha": "f1236caa87bac87e75698af65281a795cded208c",
"installed_by": ["subworkflows"]
},
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "3aa0aec1d52d492fe241919f0c6100ebf0074082",
Expand Down
58 changes: 58 additions & 0 deletions modules/nf-core/deepvariant/callvariants/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions modules/nf-core/deepvariant/callvariants/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions modules/nf-core/deepvariant/callvariants/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions modules/nf-core/deepvariant/callvariants/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions modules/nf-core/deepvariant/callvariants/tests/nextflow.config

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions modules/nf-core/deepvariant/callvariants/tests/tags.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading