This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get MD tag sequence of a read from a sam file given a bed file?

Hello! I am attempting to get a MD tag sequence from a read given a bed file with start and stop positions. For example, my sam file has a read like:

chr1    0   chr1    78142606    60  78278871S73M2D...

and I have a bed file with a line like:

chr1    78142736    78143236

I want to get the sequence from indexed position 78142736-78143236 so that I can calculate a percent identity score for that specific bin. I've attempted using samtools view but I can't seem to get it to do what I want it to. Please help!

samtools bed sam cigar

What was the exact options you used with samtools view and what were the results?

0 answers

No answers yet.

Log in to answer this question.