Skip to content

Add BAQ computation to index reader #485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

berndbohmeier
Copy link

@berndbohmeier berndbohmeier commented Aug 18, 2025

This is a WIP PR to start discussion on how to get BAQ computation in this library (#482).
BAQ can greatly improve follow up variant calls as it will remove bias from wrong alignments by down weighting ambiguous alignments.

I followed the implementation in samtools https://github.com/samtools/samtools/blob/3952c89e5552a44ee926446627272fab0b305131/cut_target.c#L149

I know that this might be not be how we want it, but I wanted to first create a (for me) working example and then go from there.

I think questions to answer are:

  • Is it okay to extent IndexReader or do we want a new e.g BAQIndexReader or similar?
  • To spend less compute time on computations of BAQ which is pretty compute heavy, it is better to filter before doing BAQ. Is it okay to extend IndexReader by filtering, or do you not want this here?
  • Do you think it is okay to give the necessary setting directly to the indexedReader via a setter function, or should it go as parameters into .pileup, or a new function .pileup_with_baq or similar (I tried this but failed so far as I was not able to pass the data around)?
  • Do think this should be done completely different?

@berndbohmeier berndbohmeier marked this pull request as draft August 18, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant