Skip to content

Commit

Permalink
fix joining
Browse files Browse the repository at this point in the history
  • Loading branch information
FriederikeHanssen committed Nov 23, 2023
1 parent 6bf0a4e commit b75a8f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions subworkflows/local/bam_merge_index_samtools/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ workflow BAM_MERGE_INDEX_SAMTOOLS {
// Only when using intervals
MERGE_BAM(bam_to_merge.multiple, [ [ id:'null' ], []], [ [ id:'null' ], []])

// Mix intervals and no_intervals channels together
// Join with the bai file
bam_bai_merged = MERGE_BAM.out.bam.join(MERGE_BAM.out.bai, failOnDuplicate: true, failOnMismatch: true)

// Index single bams, merged ones are indexed on the fly
INDEX_MERGE_BAM(bam_to_merge.single)
bam_bai_single = bam_to_merge.single.join(INDEX_MERGE_BAM.out.bai, failOnDuplicate: true, failOnMismatch: true)

// Join with the bai file
// Mix intervals and no_intervals channels together
bam_bai = bam_bai_merged.mix(bam_bai_single)

// Gather versions of all tools used
Expand Down
8 changes: 4 additions & 4 deletions subworkflows/local/cram_merge_index_samtools/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ workflow CRAM_MERGE_INDEX_SAMTOOLS {
// Only when using intervals
MERGE_CRAM(cram_to_merge.multiple, fasta.map{ it -> [ [ id:'fasta' ], it ] }, fasta_fai.map{ it -> [ [ id:'fasta_fai' ], it ] })

// Mix intervals and no_intervals channels together
// Join with the crai file
cram_crai_merged = MERGE_CRAM.out.cram.join(MERGE_CRAM.out.crai, failOnDuplicate: true, failOnMismatch: true)

// Index cram
// Index cram, multiple ones are indexed on the fly
INDEX_CRAM(cram_to_merge.single)
cram_crai_single = cram_to_merge.single.join(INDEX_CRAM.out.bai, failOnDuplicate: true, failOnMismatch: true)
cram_crai_single = cram_to_merge.single.join(INDEX_CRAM.out.crai, failOnDuplicate: true, failOnMismatch: true)

// Join with the crai file
// Mix intervals and no_intervals channels together
cram_crai = cram_crai_merged.mix(cram_crai_single)

// Gather versions of all tools used
Expand Down

0 comments on commit b75a8f7

Please sign in to comment.