Skip to content

Commit

Permalink
Merge pull request nf-core#557 from nf-core/refactor
Browse files Browse the repository at this point in the history
Resolve warnings
ramprasadn authored May 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 4d1c398 + 63450a1 commit fce3a49
Showing 7 changed files with 30 additions and 29 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed valid values for sex according to the PED file format [#550](https://github.com/nf-core/raredisease/pull/550)
- Refactored config files [#538](https://github.com/nf-core/raredisease/pull/538)
- Refactored mobile element annotation subworkflow files [#538](https://github.com/nf-core/raredisease/pull/538)
- Refactored to remove "a process is defined more than once" warning [#557](https://github.com/nf-core/raredisease/pull/557)

### `Fixed`

2 changes: 1 addition & 1 deletion conf/modules/align_bwa_bwamem2_bwameme.config
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ process {
ext.when = { params.aligner.equals("bwameme") }
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2_BWAMEME:BWA_MEM' {
withName: '.*ALIGN:ALIGN_BWA_BWAMEM2_BWAMEME:BWA' {
ext.args = { "-M -K 100000000 -R ${meta.read_group}" }
ext.args2 = { "-T ./samtools_sort_tmp" }
ext.prefix = { "${meta.id}_sorted" }
2 changes: 1 addition & 1 deletion conf/modules/annotate_rhocallviz.config
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@

process {

withName: '.*ANNOTATE_GENOME_SNVS:ANNOTATE_RHOCALLVIZ:BCFTOOLS_VIEW' {
withName: '.*ANNOTATE_GENOME_SNVS:ANNOTATE_RHOCALLVIZ:BCFTOOLS_VIEW_RHOCALL' {
ext.prefix = { "${meta.sample}" }
ext.args = { "--output-type z --min-ac 1 --samples ${meta.sample}" }
}
4 changes: 2 additions & 2 deletions conf/modules/qc_bam.config
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ process {
]
}

withName: '.*QC_BAM:PICARD_COLLECTWGSMETRICS' {
withName: '.*QC_BAM:PICARD_COLLECTWGSMETRICS_WG' {
ext.args = "--TMP_DIR ."
ext.when = { !params.aligner.equals("sentieon") }
ext.prefix = { "${meta.id}_wgsmetrics" }
@@ -84,7 +84,7 @@ process {
ext.prefix = { "${meta.id}_wgsmetrics_y" }
}

withName: '.*QC_BAM:SENTIEON_WGSMETRICS' {
withName: '.*QC_BAM:SENTIEON_WGSMETRICS_WG' {
ext.when = { params.aligner.equals("sentieon") }
ext.prefix = { "${meta.id}_wgsmetrics" }
}
8 changes: 4 additions & 4 deletions subworkflows/local/alignment/align_bwa_bwamem2_bwameme.nf
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
// Map to reference, fetch stats for each demultiplexed read pair, merge, mark duplicates, and index.
//

include { BWA_MEM } from '../../../modules/nf-core/bwa/mem/main'
include { BWA_MEM as BWA } from '../../../modules/nf-core/bwa/mem/main'
include { BWA_MEM as BWAMEM_FALLBACK } from '../../../modules/nf-core/bwa/mem/main'
include { BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main'
include { BWAMEME_MEM } from '../../../modules/nf-core/bwameme/mem/main'
@@ -28,9 +28,9 @@ workflow ALIGN_BWA_BWAMEM2_BWAMEME {

// Map, sort, and index
if (params.aligner.equals("bwa")) {
BWA_MEM ( ch_reads_input, ch_bwa_index, true )
ch_align = BWA_MEM.out.bam
ch_versions = ch_versions.mix(BWA_MEM.out.versions.first())
BWA ( ch_reads_input, ch_bwa_index, true )
ch_align = BWA.out.bam
ch_versions = ch_versions.mix(BWA.out.versions.first())
} else if (params.aligner.equals("bwameme")) {
BWAMEME_MEM ( ch_reads_input, ch_bwameme_index, ch_genome_fasta, true )
ch_align = BWAMEME_MEM.out.bam
10 changes: 5 additions & 5 deletions subworkflows/local/annotation/annotate_rhocallviz.nf
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
// A subworkflow to plot binned zygosity and RHO-regions.
//

include { BCFTOOLS_VIEW } from '../../../modules/nf-core/bcftools/view/main'
include { BCFTOOLS_VIEW as BCFTOOLS_VIEW_RHOCALL } from '../../../modules/nf-core/bcftools/view/main'
include { TABIX_TABIX } from '../../../modules/nf-core/tabix/tabix/main'
include { BCFTOOLS_ROH } from '../../../modules/nf-core/bcftools/roh/main'
include { BCFTOOLS_VIEW as BCFTOOLS_VIEW_UNCOMPRESS } from '../../../modules/nf-core/bcftools/view/main'
@@ -25,11 +25,11 @@ workflow ANNOTATE_RHOCALLVIZ {
.map {meta, vcf, tbi, meta2 -> return [meta2,vcf,tbi]}
.set { ch_rhocall_viz }

BCFTOOLS_VIEW(ch_rhocall_viz, [],[],[])
BCFTOOLS_VIEW_RHOCALL(ch_rhocall_viz, [],[],[])

TABIX_TABIX(BCFTOOLS_VIEW.out.vcf)
TABIX_TABIX(BCFTOOLS_VIEW_RHOCALL.out.vcf)

BCFTOOLS_VIEW.out.vcf
BCFTOOLS_VIEW_RHOCALL.out.vcf
.join(TABIX_TABIX.out.tbi)
.set {ch_roh_in }

@@ -43,7 +43,7 @@ workflow ANNOTATE_RHOCALLVIZ {

UCSC_WIGTOBIGWIG(RHOCALL_VIZ.out.wig, ch_genome_chrsizes)

ch_versions = ch_versions.mix(BCFTOOLS_VIEW.out.versions.first())
ch_versions = ch_versions.mix(BCFTOOLS_VIEW_RHOCALL.out.versions.first())
ch_versions = ch_versions.mix(CHROMOGRAPH_AUTOZYG.out.versions.first())
ch_versions = ch_versions.mix(TABIX_TABIX.out.versions.first())
ch_versions = ch_versions.mix(BCFTOOLS_ROH.out.versions.first())
32 changes: 16 additions & 16 deletions subworkflows/local/qc_bam.nf
Original file line number Diff line number Diff line change
@@ -2,18 +2,18 @@
// A quality check subworkflow for processed bams.
//

include { PICARD_COLLECTMULTIPLEMETRICS } from '../../modules/nf-core/picard/collectmultiplemetrics/main'
include { PICARD_COLLECTHSMETRICS } from '../../modules/nf-core/picard/collecthsmetrics/main'
include { CHROMOGRAPH as CHROMOGRAPH_COV } from '../../modules/nf-core/chromograph/main'
include { QUALIMAP_BAMQC } from '../../modules/nf-core/qualimap/bamqc/main'
include { TIDDIT_COV } from '../../modules/nf-core/tiddit/cov/main'
include { MOSDEPTH } from '../../modules/nf-core/mosdepth/main'
include { UCSC_WIGTOBIGWIG } from '../../modules/nf-core/ucsc/wigtobigwig/main'
include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS } from '../../modules/nf-core/picard/collectwgsmetrics/main'
include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS_Y } from '../../modules/nf-core/picard/collectwgsmetrics/main'
include { SENTIEON_WGSMETRICS } from '../../modules/nf-core/sentieon/wgsmetrics/main'
include { SENTIEON_WGSMETRICS as SENTIEON_WGSMETRICS_Y } from '../../modules/nf-core/sentieon/wgsmetrics/main'
include { NGSBITS_SAMPLEGENDER } from '../../modules/nf-core/ngsbits/samplegender/main'
include { PICARD_COLLECTMULTIPLEMETRICS } from '../../modules/nf-core/picard/collectmultiplemetrics/main'
include { PICARD_COLLECTHSMETRICS } from '../../modules/nf-core/picard/collecthsmetrics/main'
include { CHROMOGRAPH as CHROMOGRAPH_COV } from '../../modules/nf-core/chromograph/main'
include { QUALIMAP_BAMQC } from '../../modules/nf-core/qualimap/bamqc/main'
include { TIDDIT_COV } from '../../modules/nf-core/tiddit/cov/main'
include { MOSDEPTH } from '../../modules/nf-core/mosdepth/main'
include { UCSC_WIGTOBIGWIG } from '../../modules/nf-core/ucsc/wigtobigwig/main'
include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS_WG } from '../../modules/nf-core/picard/collectwgsmetrics/main'
include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS_Y } from '../../modules/nf-core/picard/collectwgsmetrics/main'
include { SENTIEON_WGSMETRICS as SENTIEON_WGSMETRICS_WG } from '../../modules/nf-core/sentieon/wgsmetrics/main'
include { SENTIEON_WGSMETRICS as SENTIEON_WGSMETRICS_Y } from '../../modules/nf-core/sentieon/wgsmetrics/main'
include { NGSBITS_SAMPLEGENDER } from '../../modules/nf-core/ngsbits/samplegender/main'

workflow QC_BAM {

@@ -61,13 +61,13 @@ workflow QC_BAM {

// COLLECT WGS METRICS
if (!params.analysis_type.equals("wes")) {
PICARD_COLLECTWGSMETRICS ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs )
PICARD_COLLECTWGSMETRICS_WG ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs )
PICARD_COLLECTWGSMETRICS_Y ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_y )
SENTIEON_WGSMETRICS ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs.map{ interval -> [[:], interval]} )
SENTIEON_WGSMETRICS_WG ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs.map{ interval -> [[:], interval]} )
SENTIEON_WGSMETRICS_Y ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_y.map{ interval -> [[:], interval]} )
ch_cov = Channel.empty().mix(PICARD_COLLECTWGSMETRICS.out.metrics, SENTIEON_WGSMETRICS.out.wgs_metrics)
ch_cov = Channel.empty().mix(PICARD_COLLECTWGSMETRICS_WG.out.metrics, SENTIEON_WGSMETRICS_WG.out.wgs_metrics)
ch_cov_y = Channel.empty().mix(PICARD_COLLECTWGSMETRICS_Y.out.metrics, SENTIEON_WGSMETRICS_Y.out.wgs_metrics)
ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first(), SENTIEON_WGSMETRICS.out.versions.first())
ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS_WG.out.versions.first(), SENTIEON_WGSMETRICS_WG.out.versions.first())
ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS_Y.out.versions.first(), SENTIEON_WGSMETRICS_Y.out.versions.first())
}
// Check sex

0 comments on commit fce3a49

Please sign in to comment.