Hello, I am trying to filter a pairend bam file to get only forward reads in Galaxy. A bam filter from bamtools does not seem do exactly what I mean, in fact it seems that it filters both read 1 and read 2 but I would like to only have read 1 filtered in order to obtain only fragments mapped to forward strand. Could you please suggest a correct way to do this?
Heads up! This is a static archive of our support site. Please go to help.galaxyproject.org if you want to reach the Galaxy community. If you want to search this archive visit the Galaxy Hub search
Question: filtering pair-end bam file
0
npetr • 0 wrote:
0
Jennifer Hillman Jackson ♦ 25k wrote:
Hello,
Try the tool NGS: BamTools > Filter BAM datasets on a variety of attributes. There is an option to filter on "isReverseStrand" that can be used as a negative, to then leave only forward stranded reads if "isMapped" is also set.
You can filter in more advanced ways: properly paired reads, first or second read in the pair, and strand - all in one query. This tutorial covers how: https://galaxyproject.org/tutorials/ngs/#flag-field
Thanks, Jen, Galaxy team
Please log in to add an answer.
Use of this site constitutes acceptance of our User
Agreement
and Privacy
Policy.
Powered by Biostar
version 16.09
Traffic: 169 users visited in the last hour
Hey, thank you very much for your reply Jen, so do you mean this filtering result in Pair End bam file containing only pairs where read 1 is mapped to forward strand? best Natalia
This filters to leave reads that are mapped to the forward strand. These are not necessarily the first read in a properly paired mapped pair.