Entering edit mode
8.6 years ago
biotech
▴
570
I need to know if there is any read mapping to certain region in an alignment file (.sam). In fact, I have a list of 20 regions I'm interested. I'm talking about the third column in the sam file. Also, the reads I want to filter must map with an alignment score greater than a certain value.
I'm starting from 6 sam files.
Maybe a custom script is better than samtools?
Thanks Pierre. I just need all reads mapping to certain chromosome. Would this ease the process? Not looking for coordinates.
Am I right with this shortcut? I have no output, shell running... Possibly due to large *sam files.
Note that this would filter out unmapped reads but not mapped mates, giving a file with singletons and pairs.
And this one? Still no output
Please actually read the first link that Pierre posted. Grep should never be needed here.
Is this more or less what you suggested? 'specifics.locus' contains my interesting bed file first columns IDs that I'm trying to filter.
BTW, this would be much faster if you made a sorted BAM file.