Skip to content
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

Add a method to calculate MD and NM tags. #84

Open
nh13 opened this issue Dec 22, 2023 · 0 comments
Open

Add a method to calculate MD and NM tags. #84

nh13 opened this issue Dec 22, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nh13
Copy link
Member

nh13 commented Dec 22, 2023

This is useful for when we perform clipping or other modifications to a SAM record that would affect these values.

For a code example, see htsjdk's calculateMdAndNmTags. I think an additional parameter to make the output compatible with samtools makes sense (i.e. do not treat N->N as a match). See how this is used in fgbio both here and here, which handle unmapped reads.

Bonus points for adding another method that takes a iterator over Templates (and/or pysam.AlignedSegments) and a pysam.FastaFile and updates the records.

@emmcauley emmcauley self-assigned this Jun 11, 2024
@nh13 nh13 added enhancement New feature or request good first issue Good for newcomers labels Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants