Skip to content

Commit 1aeaa20

Browse files
committed
Rename channel
1 parent 2c342b8 commit 1aeaa20

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

workflows/chrcheck/main.nf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,47 +30,47 @@ workflow CHRCHECK {
3030
}
3131

3232
// Check if channel is empty
33-
ch_vcf_branched = Channel.empty()
33+
ch_vcf_split = Channel.empty()
3434
// Extract the contig names from the VCF files
3535
VCF_CHR_EXTRACT(ch_input.vcf.map{ meta, file, _index, _chr -> [meta, file] })
3636
ch_versions = ch_versions.mix(VCF_CHR_EXTRACT.out.versions)
37-
ch_vcf_branched = checkChr(VCF_CHR_EXTRACT.out.chr, ch_input.vcf)
37+
ch_vcf_split = checkChr(VCF_CHR_EXTRACT.out.chr, ch_input.vcf)
3838

39-
ch_bam_branched = Channel.empty()
39+
ch_bam_split = Channel.empty()
4040
// Extract the contig names from the BAM files
4141
BAM_CHR_EXTRACT(ch_input.bam.map{ meta, file, _index, _chr -> [meta, file] })
4242
ch_versions = ch_versions.mix(BAM_CHR_EXTRACT.out.versions)
43-
ch_bam_branched = checkChr(BAM_CHR_EXTRACT.out.chr, ch_input.bam)
43+
ch_bam_split = checkChr(BAM_CHR_EXTRACT.out.chr, ch_input.bam)
4444

4545
if (params.rename_chr == true) {
4646
ch_bam_renamed = Channel.empty()
4747
// Rename the contigs in the BAM files
4848
BAM_CHR_RENAME_SAMTOOLS(
49-
ch_bam_branched.to_rename.map{meta, bam, csi, _diff, prefix -> [meta, bam, csi, prefix]}
49+
ch_bam_split.to_rename.map{meta, bam, csi, _diff, prefix -> [meta, bam, csi, prefix]}
5050
)
5151
ch_versions = ch_versions.mix(BAM_CHR_RENAME_SAMTOOLS.out.versions)
5252
ch_bam_renamed = BAM_CHR_RENAME_SAMTOOLS.out.bam_renamed
5353

5454
ch_vcf_renamed = Channel.empty()
5555
// Rename the contigs in the VCF files
56-
VCF_CHR_RENAME_BCFTOOLS(ch_vcf_branched.to_rename)
56+
VCF_CHR_RENAME_BCFTOOLS(ch_vcf_split.to_rename)
5757
ch_versions = ch_versions.mix(VCF_CHR_RENAME_BCFTOOLS.out.versions)
5858
ch_vcf_renamed = VCF_CHR_RENAME_BCFTOOLS.out.vcf_renamed
5959
} else {
60-
ch_vcf_branched.to_rename.map {
60+
ch_vcf_split.to_rename.map {
6161
def chr_names = it[3].size() > params.max_chr_names ? it[3][0..params.max_chr_names - 1] + ['...'] : it[3]
6262
error "Contig names: ${chr_names} in VCF: ${it[1]} are not present in reference genome with same writing. Please set `rename_chr` to `true` to rename the contigs."
6363
}
64-
ch_bam_branched.to_rename.map {
64+
ch_bam_split.to_rename.map {
6565
def chr_names = it[3].size() > params.max_chr_names ? it[3][0..params.max_chr_names - 1] + ['...'] : it[3]
6666
error "Contig names: ${chr_names} in BAM: ${it[1]} are not present in reference genome with same writing. Please set `rename_chr` to `true` to rename the contigs."
6767
}
6868
ch_vcf_renamed = Channel.empty()
6969
ch_bam_renamed = Channel.empty()
7070
}
7171

72-
ch_output = ch_bam_branched.no_rename
73-
.mix(ch_vcf_branched.no_rename)
72+
ch_output = ch_bam_split.no_rename
73+
.mix(ch_vcf_split.no_rename)
7474
.mix(ch_bam_renamed)
7575
.mix(ch_vcf_renamed)
7676
emit:

0 commit comments

Comments
 (0)