Skip to content

Commit

Permalink
Merge pull request #522 from genomic-medicine-sweden/smncopynumber-up…
Browse files Browse the repository at this point in the history
…date

Fix samplenames in smncopynumbercaller
  • Loading branch information
ramprasadn authored Feb 29, 2024
2 parents 7bf014f + 34c2cfd commit 7e004ad
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
30 changes: 30 additions & 0 deletions modules/local/rename_align_files.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
process RENAME_ALIGN_FILES {
tag "$meta.id"
label 'process_single'

conda "conda-forge::coreutils=8.31"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gnu-wget:1.18--0' :
'biocontainers/gnu-wget:1.18--0' }"

input:
tuple val(meta), path(input)
val(extension)

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

when:
task.ext.when == null || task.ext.when

script:
"""
ln -s $input ${meta.sample}.${extension}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
ln: \$(echo \$(ln --version 2>&1 | head -n 1 | cut -d ' ' -f4))
END_VERSIONS
"""
}
23 changes: 16 additions & 7 deletions workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,16 @@ if (missingParamsCount>0) {
// MODULE: Installed directly from nf-core/modules
//

include { FASTQC } from '../modules/nf-core/fastqc/main'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { SMNCOPYNUMBERCALLER } from '../modules/nf-core/smncopynumbercaller/main'
include { FASTQC } from '../modules/nf-core/fastqc/main'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { SMNCOPYNUMBERCALLER } from '../modules/nf-core/smncopynumbercaller/main'

//
// 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'

//
// SUBWORKFLOWS
Expand Down Expand Up @@ -578,13 +585,13 @@ workflow RAREDISEASE {
}

// STEP 1.7: SMNCOPYNUMBERCALLER
ch_mapped.genome_bam_bai
.collect{it[1]}
RENAME_BAM_FOR_SMNCALLER(ch_mapped.genome_marked_bam, "bam").output
.collect{it}
.toList()
.set { ch_bam_list }

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

Expand All @@ -596,6 +603,8 @@ 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(SMNCOPYNUMBERCALLER.out.versions)

// ped correspondence, sex check, ancestry check
Expand Down

0 comments on commit 7e004ad

Please sign in to comment.