fulcrumgenomics / fgbio

Tools for working with genomic and high throughput sequencing data.
http://fulcrumgenomics.github.io/fgbio/
MIT License
309 stars 67 forks source link

feat: raise exception if CollectDuplexSeqMetrics run on consensus BAM #1003

Closed znorgaard closed 1 month ago

znorgaard commented 1 month ago

Closes #992.

This PR adds a new isConsensusRead method to Umis.scala which is then used in CollectDuplexSeqMetrics to raise an exception if the first record is a consensus record.

In addition to the unit tests, I ran this on a consensus BAM locally and generated the expected error message. Running on the preceding grouped BAM generated the expected outputs as well.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.62%. Comparing base (9a4b01d) to head (c3aa60c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1003 +/- ## ======================================= Coverage 95.62% 95.62% ======================================= Files 126 126 Lines 7382 7388 +6 Branches 497 510 +13 ======================================= + Hits 7059 7065 +6 Misses 323 323 ``` | [Flag](https://app.codecov.io/gh/fulcrumgenomics/fgbio/pull/1003/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fulcrumgenomics) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/fulcrumgenomics/fgbio/pull/1003/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fulcrumgenomics) | `95.62% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fulcrumgenomics#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.