Skip to content

Commit

Permalink
Merge pull request #1400 from nschcolnicov/dev
Browse files Browse the repository at this point in the history
ASSESS_SIGNIFICANCE fails with Rscript error fix
  • Loading branch information
maxulysse authored Feb 29, 2024
2 parents 0fa5bcb + 16055ad commit 03c04ac
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 49 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1381](https://github.com/nf-core/sarek/pull/1381) - Swap NGSCheckMate bed file for GATK.GRCh37 to one without the `chr` prefix
- [#1383](https://github.com/nf-core/sarek/pull/1383) - Fix `--three_prime_clip_r{1,2}` parameter documentation
- [#1390](https://github.com/nf-core/sarek/pull/1390) - Fix badges in README
- [#1400](https://github.com/nf-core/sarek/pull/1400) - Fixed input channel for ASSESS_SIGNIFICANCE module, updated makegraph to makegraph2.
- [#1403](https://github.com/nf-core/sarek/pull/1403) - Fix intervals usage with dot in chromosome names

### Removed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ We thank the following people for their extensive assistance in the development
- [Malin Larsson](https://github.com/malinlarsson)
- [Marcel Martin](https://github.com/marcelm)
- [Nick Smith](https://github.com/nickhsmith)
- [Nicolas Schcolnicov](https://github.com/nschcolnicov)
- [Nilesh Tawari](https://github.com/nilesh-tawari)
- [Olga Botvinnik](https://github.com/olgabot)
- [Oskar Wacker](https://github.com/WackerO)
Expand Down
3 changes: 1 addition & 2 deletions conf/modules/controlfreec.config
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ process {
]
}

withName: 'MAKEGRAPH' {
ext.args = { "${params.cf_ploidy}" }
withName: 'MAKEGRAPH2' {
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/controlfreec/${meta.id}/" },
Expand Down
7 changes: 3 additions & 4 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"controlfreec/makegraph": {
"controlfreec/makegraph2": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"],
"patch": "modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff"
"git_sha": "a7bae48d8bccfae99e3b862fa07bbd50a8df6b82",
"installed_by": ["modules"]
},
"deepvariant": {
"branch": "master",
Expand Down
23 changes: 0 additions & 23 deletions modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff

This file was deleted.

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

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include { CONTROLFREEC_FREEC as FREEC_SOMATIC } from '../../.
include { CONTROLFREEC_ASSESSSIGNIFICANCE as ASSESS_SIGNIFICANCE } from '../../../modules/nf-core/controlfreec/assesssignificance/main'
include { CONTROLFREEC_FREEC2BED as FREEC2BED } from '../../../modules/nf-core/controlfreec/freec2bed/main'
include { CONTROLFREEC_FREEC2CIRCOS as FREEC2CIRCOS } from '../../../modules/nf-core/controlfreec/freec2circos/main'
include { CONTROLFREEC_MAKEGRAPH as MAKEGRAPH } from '../../../modules/nf-core/controlfreec/makegraph/main'
include { CONTROLFREEC_MAKEGRAPH2 as MAKEGRAPH2 } from '../../../modules/nf-core/controlfreec/makegraph2/main'

workflow BAM_VARIANT_CALLING_SOMATIC_CONTROLFREEC {
take:
Expand All @@ -27,16 +27,39 @@ workflow BAM_VARIANT_CALLING_SOMATIC_CONTROLFREEC {

FREEC_SOMATIC(controlfreec_input, fasta, fasta_fai, [], dbsnp, dbsnp_tbi, chr_files, mappability, intervals_bed, [])

ASSESS_SIGNIFICANCE(FREEC_SOMATIC.out.CNV.join(FREEC_SOMATIC.out.ratio, failOnDuplicate: true, failOnMismatch: true))
//Filter the files that come out of freec somatic as ASSESS_SIGNIFICANCE only takes one cnv and one ratio file
//Creates empty channel if file is missing
cnv_files = FREEC_SOMATIC.out.CNV
.map{ meta, cnv ->
def tumor_file = cnv instanceof List ? cnv.find { it.toString().endsWith("gz_CNVs") } : cnv //only find if its a list, else it returns only the filename without the path
if (!tumor_file){
error("CNVs tumor file not found for sample $meta.id")
}
[meta,tumor_file]
}

ratio_files = FREEC_SOMATIC.out.ratio
.map{ meta, ratio ->
def tumor_file = ratio instanceof List ? ratio.find { it.toString().endsWith("gz_ratio.txt") } : ratio //same here as cnv
if (!tumor_file){
error("Ratio tumor file not found for sample $meta.id")
}
[meta,tumor_file]
}

//Join the pairs
assess_significance_input = cnv_files.join(ratio_files, failOnDuplicate: true, failOnMismatch: true)

ASSESS_SIGNIFICANCE(assess_significance_input)
FREEC2BED(FREEC_SOMATIC.out.ratio)
FREEC2CIRCOS(FREEC_SOMATIC.out.ratio)
MAKEGRAPH(FREEC_SOMATIC.out.ratio.join(FREEC_SOMATIC.out.BAF, failOnDuplicate: true, failOnMismatch: true))
MAKEGRAPH2(FREEC_SOMATIC.out.ratio.join(FREEC_SOMATIC.out.BAF, failOnDuplicate: true, failOnMismatch: true))

ch_versions = ch_versions.mix(FREEC_SOMATIC.out.versions)
ch_versions = ch_versions.mix(ASSESS_SIGNIFICANCE.out.versions)
ch_versions = ch_versions.mix(FREEC2BED.out.versions)
ch_versions = ch_versions.mix(FREEC2CIRCOS.out.versions)
ch_versions = ch_versions.mix(MAKEGRAPH.out.versions)
ch_versions = ch_versions.mix(MAKEGRAPH2.out.versions)

emit:
versions = ch_versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include { CONTROLFREEC_FREEC as FREEC_TUMORONLY } from '../../.
include { CONTROLFREEC_ASSESSSIGNIFICANCE as ASSESS_SIGNIFICANCE } from '../../../modules/nf-core/controlfreec/assesssignificance/main'
include { CONTROLFREEC_FREEC2BED as FREEC2BED } from '../../../modules/nf-core/controlfreec/freec2bed/main'
include { CONTROLFREEC_FREEC2CIRCOS as FREEC2CIRCOS } from '../../../modules/nf-core/controlfreec/freec2circos/main'
include { CONTROLFREEC_MAKEGRAPH as MAKEGRAPH } from '../../../modules/nf-core/controlfreec/makegraph/main'
include { CONTROLFREEC_MAKEGRAPH2 as MAKEGRAPH2 } from '../../../modules/nf-core/controlfreec/makegraph2/main'

workflow BAM_VARIANT_CALLING_TUMOR_ONLY_CONTROLFREEC {
take:
Expand All @@ -30,13 +30,13 @@ workflow BAM_VARIANT_CALLING_TUMOR_ONLY_CONTROLFREEC {
ASSESS_SIGNIFICANCE(FREEC_TUMORONLY.out.CNV.join(FREEC_TUMORONLY.out.ratio, failOnDuplicate: true, failOnMismatch: true))
FREEC2BED(FREEC_TUMORONLY.out.ratio)
FREEC2CIRCOS(FREEC_TUMORONLY.out.ratio)
MAKEGRAPH(FREEC_TUMORONLY.out.ratio.join(FREEC_TUMORONLY.out.BAF, failOnDuplicate: true, failOnMismatch: true))
MAKEGRAPH2(FREEC_TUMORONLY.out.ratio.join(FREEC_TUMORONLY.out.BAF, failOnDuplicate: true, failOnMismatch: true))

ch_versions = ch_versions.mix(FREEC_TUMORONLY.out.versions)
ch_versions = ch_versions.mix(ASSESS_SIGNIFICANCE.out.versions)
ch_versions = ch_versions.mix(FREEC2BED.out.versions)
ch_versions = ch_versions.mix(FREEC2CIRCOS.out.versions)
ch_versions = ch_versions.mix(MAKEGRAPH.out.versions)
ch_versions = ch_versions.mix(MAKEGRAPH2.out.versions)

emit:
versions = ch_versions
Expand Down
2 changes: 1 addition & 1 deletion tests/config/pytesttags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ controlfreec:
- modules/nf-core/controlfreec/freec/**
- modules/nf-core/controlfreec/freec2bed/**
- modules/nf-core/controlfreec/freec2circos/**
- modules/nf-core/controlfreec/makegraph/**
- modules/nf-core/controlfreec/makegraph2/**
- modules/nf-core/samtools/mpileup/**
- subworkflows/local/bam_variant_calling_mpileup/**
- subworkflows/local/bam_variant_calling_somatic_all/**
Expand Down

0 comments on commit 03c04ac

Please sign in to comment.