Skip to content
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

Add cnvkit genemetrics #1223

Merged
merged 18 commits into from
Oct 16, 2023
Merged
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 @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- [#1113](https://github.com/nf-core/sarek/pull/1113) - Adding CNVkit genemetrics module
- [#1193](https://github.com/nf-core/sarek/pull/1193) - Adding support for Sentieon's DnaScope for germline variant-calling including joint-germline
- [#1271](https://github.com/nf-core/sarek/pull/1271) - Back to dev

Expand Down
4 changes: 4 additions & 0 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ process {
cpus = { check_max( 24 * task.attempt, 'cpus' ) }
memory = { check_max( 30.GB * task.attempt, 'memory' ) }
}
withName:'CNVKIT_BATCH' {
label = "process_high"
memory = { check_max( 36.GB * task.attempt, 'memory' ) }
}
withName: 'GATK4_MARKDUPLICATES|GATK4_MARKDUPLICATESSPARK' {
cpus = { check_max( 6 * task.attempt, 'cpus' ) }
memory = { check_max( 30.GB * task.attempt, 'memory' ) }
Expand Down
10 changes: 10 additions & 0 deletions conf/modules/cnvkit.config
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,14 @@ process {
pattern: "*{bed,cnn,cnr,cns,pdf,png}"
]
}
// CNVKIT
withName: 'CNVKIT_GENEMETRICS' {
ext.prefix = { "${cnr.baseName}.genemetrics" }
ext.when = { params.tools && params.tools.split(',').contains('cnvkit') }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/cnvkit/${meta.id}/" },
pattern: "*{tsv}"
]
}
}
7 changes: 5 additions & 2 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,9 @@ The file `<tumorsample_vs_normalsample>.cnvs.txt` contains all segments predicte
- file containing copy number segment information
- `<sample>.call.cns`
- file containing copy number segment information

</details>
- `<sample>.genemetrics.tsv`
- file containing per gene copy number information (if input files are annotated)
</details>
grantn5 marked this conversation as resolved.
Show resolved Hide resolved

<details markdown="1">
<summary>Output files for tumor/normal samples</summary>
Expand All @@ -745,6 +746,8 @@ The file `<tumorsample_vs_normalsample>.cnvs.txt` contains all segments predicte
- file containing copy number segment information
- `<tumorsample>.call.cns`
- file containing copy number segment information
- `<tumorsample>.genemetrics.tsv`
- file containing per gene copy number information (if input files are annotated)
</details>

#### Control-FREEC
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"git_sha": "3b63e1df297ef474b0070aa5fabb30d732173671",
"installed_by": ["modules"]
},
"cnvkit/genemetrics": {
"branch": "master",
"git_sha": "3b63e1df297ef474b0070aa5fabb30d732173671",
"installed_by": ["modules"]
},
"cnvkit/reference": {
"branch": "master",
"git_sha": "3b63e1df297ef474b0070aa5fabb30d732173671",
Expand Down
39 changes: 39 additions & 0 deletions modules/nf-core/cnvkit/genemetrics/main.nf

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

47 changes: 47 additions & 0 deletions modules/nf-core/cnvkit/genemetrics/meta.yml

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

8 changes: 7 additions & 1 deletion subworkflows/local/bam_variant_calling_cnvkit/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// A when clause condition is defined in the conf/modules.config to determine if the module should be run

include { CNVKIT_BATCH } from '../../../modules/nf-core/cnvkit/batch/main'
include { CNVKIT_GENEMETRICS } from '../../../modules/nf-core/cnvkit/genemetrics/main'

workflow BAM_VARIANT_CALLING_CNVKIT {
take:
Expand All @@ -15,11 +16,16 @@ workflow BAM_VARIANT_CALLING_CNVKIT {
reference // channel: [] cnn

main:
versions = Channel.empty()
generate_pon = false

CNVKIT_BATCH(cram, fasta, fasta_fai, targets, reference, generate_pon)

versions = CNVKIT_BATCH.out.versions
ch_genemetrics = CNVKIT_BATCH.out.cnr.join(CNVKIT_BATCH.out.cns).map{ meta, cnr, cns -> [meta, cnr, cns[2]]}
CNVKIT_GENEMETRICS(ch_genemetrics)

versions = versions.mix(CNVKIT_BATCH.out.versions)
versions = versions.mix(CNVKIT_GENEMETRICS.out.versions)

emit:
versions // channel: [ versions.yml ]
Expand Down