Skip to content

Commit

Permalink
update rename module
Browse files Browse the repository at this point in the history
  • Loading branch information
ramprasadn committed Jan 7, 2025
1 parent 06b8c2e commit 3fbae07
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion modules/local/rename_align_files.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ process RENAME_ALIGN_FILES {
val(extension)

output:
path("*.{bam,bai}"), emit: output
tuple val(meta), path("*.{bam,bai}"), emit: output
path "versions.yml", emit: versions

when:
Expand Down
33 changes: 18 additions & 15 deletions workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -472,20 +472,8 @@ workflow RAREDISEASE {
*/

if ( params.analysis_type.equals("wgs") && (!params.skip_smncopynumbercaller || !params.skip_repeat_calling)) {
RENAME_BAM(ch_mapped.genome_marked_bam, "bam").output
.collect{it}
.toList()
.set { ch_bam_list }

RENAME_BAI(ch_mapped.genome_marked_bai, "bam.bai").output
.collect{it}
.toList()
.set { ch_bai_list }

ch_case_info
.combine(ch_bam_list)
.combine(ch_bai_list)
.set { ch_bams_bais }
RENAME_BAM(ch_mapped.genome_marked_bam, "bam")
RENAME_BAI(ch_mapped.genome_marked_bai, "bam.bai")
}

/*
Expand All @@ -496,7 +484,7 @@ workflow RAREDISEASE {

if (!params.skip_repeat_calling && params.analysis_type.equals("wgs") ) {
CALL_REPEAT_EXPANSIONS (
ch_bams_bais,
RENAME_BAM.out.output.join(RENAME_BAI.out.output, failOnMismatch:true, failOnDuplicate:true),
ch_variant_catalog,
ch_case_info,
ch_genome_fasta,
Expand Down Expand Up @@ -791,6 +779,21 @@ workflow RAREDISEASE {

if ( params.analysis_type.equals("wgs") && !params.skip_smncopynumbercaller ) {

RENAME_BAM.out.output
.collect{it[1]}
.toList()
.set { ch_bam_list }

RENAME_BAI.out.output
.collect{it[1]}
.toList()
.set { ch_bai_list }

ch_case_info
.combine(ch_bam_list)
.combine(ch_bai_list)
.set { ch_bams_bais }

SMNCOPYNUMBERCALLER (
ch_bams_bais
)
Expand Down

0 comments on commit 3fbae07

Please sign in to comment.