nf-core / eager

A fully reproducible and state-of-the-art ancient DNA analysis pipeline
https://nf-co.re/eager
MIT License
148 stars 81 forks source link

Use Sample-level merged BAMs for sample-level statistics #1065

Closed TCLamnidis closed 1 month ago

TCLamnidis commented 6 months ago

Qualimap needs an ext.prefix.

Additionally, Qualimap results are meant to be at the sample level, but are currently at the Library level. We need to use post-Library-merge BAMs as input for this module.

The additional complication is that MERGE_LIBRARIES currently runs on the BAMs specified by genotyping_source, but other modules probably should run on the raw ones. Maybe always merge the raw ones and only merge trimmed/pmd/rescaled when asked? Then the raw merged sample-level bams can go to Qualimap.

This might also apply to BEDTOOLS_COVERAGE, though I am not entirely sure. @aidaanva ?

aidaanva commented 6 months ago

Yes, BEDTOOLS_COVERAGE should run on raw merged ones since the user may want to run those with mapping quality 0, which will not be appropriate for genotyping.