Skip to content

Commit

Permalink
integrate review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlhoff committed Oct 20, 2023
1 parent 2cf99e1 commit 6e2abeb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 5 additions & 8 deletions subworkflows/local/map.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ workflow MAP {
.map{
// create meta consistent with rest of workflow
meta, bam ->
new_meta = meta.clone()
new_meta.reference = meta.id_index
new_meta = meta + [ reference: meta.id_index ]
[ new_meta, bam ]
}

Expand All @@ -41,10 +40,9 @@ workflow MAP {
.combine( index )
.multiMap {
meta, reads, meta2, index ->
new_meta = meta.clone()
new_meta.reference = meta2.id
new_meta = meta + [ reference: meta2.id ]
reads: [ new_meta, reads ]
index: [ meta2, index]
index: [ meta2, index ]
}

BWA_MEM ( ch_input_for_mapping.reads, ch_input_for_mapping.index, true )
Expand All @@ -60,10 +58,9 @@ workflow MAP {
.combine( index )
.multiMap {
meta, reads, meta2, index ->
new_meta = meta.clone()
new_meta.reference = meta2.id
new_meta = meta + [ reference: meta2.id ]
reads: [ new_meta, reads ]
index: [ meta2, index]
index: [ meta2, index ]
}

BOWTIE2_ALIGN ( ch_input_for_mapping.reads, ch_input_for_mapping.index, false, true )
Expand Down
2 changes: 2 additions & 0 deletions workflows/eager.nf
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,14 @@ workflow EAGER {
bam: [ meta, bam ]
snp_capture_bed: [ snp_capture_bed ]
}

QUALIMAP_BAMQC_WITHBED( ch_qualimap_input_with.bam, ch_qualimap_input_with.snp_capture_bed )
ch_qualimap_input_without = ch_qualimap_input.nobed
.map{
ignore_meta, meta, bam, meta2, snp_capture_bed ->
[ meta, bam ]
}

QUALIMAP_BAMQC_NOBED( ch_qualimap_input_without, [] )
ch_qualimap_output = QUALIMAP_BAMQC_WITHBED.out.results.mix( QUALIMAP_BAMQC_NOBED.out.results )
ch_versions = ch_versions.mix( QUALIMAP_BAMQC_NOBED.out.versions ).mix( QUALIMAP_BAMQC_WITHBED.out.versions )
Expand Down

0 comments on commit 6e2abeb

Please sign in to comment.