I have 2 BAMs of the some reads, but mapped to different genome. I extracted MAPQ from both, and get some index which correspond to reads that have the same MAPQ in both BAMs (using R). Then I can export those index in txt format.
Now how do I use the index found, for example, 2,3,4,5,8,9, to subset one of the BAM file?
The real problem is a bit more complex, as there are more than 2 BAMs, and I need to summarize the MAPQ across them.
Many thanks!