Skip to content

Commit 6f12f08

Browse files
committed
remove redundant lines in final report
1 parent 3bda2a8 commit 6f12f08

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

main.nf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,13 @@ workflow {
280280
ch_versions = ch_versions.mix( mapbam.out.versions )
281281

282282
mapped = mapbam.out.bam
283+
283284
mapped.branch{
284285
dedup: it[0].ReadsMapped > 0
285286
nodedup: true
286287
}
287288
.set{ mapped }
288289

289-
ch_empty = mapped.nodedup.map{ it[0] }
290-
ch_final.mix( ch_empty ).set{ ch_final }
291-
292290
//
293291
// 6. Dedup the mapped bam
294292
//
@@ -309,14 +307,17 @@ workflow {
309307
// if default.best is empty it would throw an index error,
310308
// best: reduce the 1 "best" hit per family
311309

312-
best = deduped.best
310+
deduped.best.mix( mapped.nodedup ).set{ best }
311+
312+
best = best
313313
.map{meta,bam -> [meta.id, meta.Family, meta.CoveredBP, meta, bam]}
314314
.toSortedList({ a,b -> a[0]+a[1] <=> b[0]+b[1] ?: a[2] <=> b[2]})
315315
.flatten()
316316
.collate(5)
317317
.groupTuple(by:[0,1]) //[[rg, fam, [covered_bp < .. < covered_bp][meta,meta,meta],[bam,bam,bam]]
318318
.map{n -> [n[3][-1], n[4][-1]]} // from the highest, the [meta, bam]
319319

320+
best.view()
320321
//
321322
// 7. Run Intersect Bed
322323
//

workflows/09_reports.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ workflow write_reports {
1111
//
1212
//
1313

14-
// write the reports to file...
14+
// write the versions to file...
1515
ch_versions.unique().collectFile(name: 'pipeline_versions.yml', storeDir:"${basedir}/")
1616

1717
// calculate proportion mapped, duplication rate, expected breadth

0 commit comments

Comments
 (0)