Entering edit mode
11.3 years ago
David Quigley
11k
What is the quickest way find the final aligned locations of a list of reads in BAM file? I can call
samtools view my.bam | grep -e uniqueID1 -e uniqueID2 > output
to grep for uniqueID1 and uniqueID2 in my.bam, but crawling through the SAM is quite slow. I'd like to call:
handyTool extractID my.bam -l listOfIdentifiers > output
and get the SAM line for each identifier found in the BAM. Is there a better way?