Skip to content

Commit

Permalink
Merge pull request nf-core#657 from nf-core/fix_samplename
Browse files Browse the repository at this point in the history
Remove suffixes sample name in repeat call vcfs
  • Loading branch information
ramprasadn authored Jan 8, 2025
2 parents 1e410c6 + b619087 commit 8ea8d23
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 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
36 changes: 25 additions & 11 deletions workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ include { SMNCOPYNUMBERCALLER } from '../modules/nf-core/smncopynumbercaller/mai
// MODULE: Local modules
//

include { RENAME_ALIGN_FILES as RENAME_BAM_FOR_SMNCALLER } from '../modules/local/rename_align_files'
include { RENAME_ALIGN_FILES as RENAME_BAI_FOR_SMNCALLER } from '../modules/local/rename_align_files'
include { CREATE_HGNCIDS_FILE } from '../modules/local/create_hgncids_file'
include { CREATE_PEDIGREE_FILE } from '../modules/local/create_pedigree_file'
include { RENAME_ALIGN_FILES as RENAME_BAM } from '../modules/local/rename_align_files'
include { RENAME_ALIGN_FILES as RENAME_BAI } from '../modules/local/rename_align_files'
include { CREATE_HGNCIDS_FILE } from '../modules/local/create_hgncids_file'
include { CREATE_PEDIGREE_FILE } from '../modules/local/create_pedigree_file'

//
// SUBWORKFLOWS
Expand Down Expand Up @@ -464,6 +464,18 @@ workflow RAREDISEASE {
)
ch_versions = ch_versions.mix(QC_BAM.out.versions)


/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RENAME ALIGNMENT FILES FOR SMNCOPYNUMBERCALLER & REPEATCALLING
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

if ( params.analysis_type.equals("wgs") && (!params.skip_smncopynumbercaller || !params.skip_repeat_calling)) {
RENAME_BAM(ch_mapped.genome_marked_bam, "bam")
RENAME_BAI(ch_mapped.genome_marked_bai, "bam.bai")
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CALL AND ANNOTATE REPEAT EXPANSIONS
Expand All @@ -472,7 +484,7 @@ workflow RAREDISEASE {

if (!params.skip_repeat_calling && params.analysis_type.equals("wgs") ) {
CALL_REPEAT_EXPANSIONS (
ch_mapped.genome_bam_bai,
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 @@ -766,13 +778,14 @@ workflow RAREDISEASE {
*/

if ( params.analysis_type.equals("wgs") && !params.skip_smncopynumbercaller ) {
RENAME_BAM_FOR_SMNCALLER(ch_mapped.genome_marked_bam, "bam").output
.collect{it}

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

RENAME_BAI_FOR_SMNCALLER(ch_mapped.genome_marked_bai, "bam.bai").output
.collect{it}
RENAME_BAI.out.output
.collect{it[1]}
.toList()
.set { ch_bai_list }

Expand All @@ -784,10 +797,11 @@ workflow RAREDISEASE {
SMNCOPYNUMBERCALLER (
ch_bams_bais
)
ch_versions = ch_versions.mix(RENAME_BAM_FOR_SMNCALLER.out.versions)
ch_versions = ch_versions.mix(RENAME_BAI_FOR_SMNCALLER.out.versions)
ch_versions = ch_versions.mix(RENAME_BAM.out.versions)
ch_versions = ch_versions.mix(RENAME_BAI.out.versions)
ch_versions = ch_versions.mix(SMNCOPYNUMBERCALLER.out.versions)
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PEDDY
Expand Down

0 comments on commit 8ea8d23

Please sign in to comment.