Hello, I have a mapped bam files (from bwa) and I want to extract which base on the read overlaps a specific base pair in the genome (ie base 4 of 55). I also want to extract the base is at that position.
I've made some progress on this in terms of obtaining reads which overlap the site, getting the read lengths, and getting the starting positions of the read. However, I'm having a hard time figuring out how to extract the specific base, and whether that is affected by whether the read is in the forward or reverse direction.
For an example, I'd like to extract position 96244549 from the following 2 reads. Any help would be appreciated!
MYRUN 16 chr5 96244500 37 100M * 0 0 CAAGATTACTCAGCTAGTCAGTGGCAGAGCTAAGGTTTAAACTGAATGGTCCAGCTATAATGACCTACTTCTGTTATTGTTCTCTCTTTCATATTTGTTT DDDDDIIIIIIIIIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIIIIIIIII MYRUN 16 chr5 96244531 37 62M * 0 0 AAGATTTAAACTGAATGGCCCAGCTATAATGACCTACTTCTGTTATTGTTCTCTATTTCATA JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ