Filtering reads in a BAM dataset

Dear @cjain,
(1) You can use bedtools intersect (bedtools Intersect intervals find overlapping intervals in various ways) it works with bam files. You would need to provide an annotation for your CDS or tRNAs.

(2) You can use BAM filter Removes reads from a BAM file based on criteria

(3) This is actually not that straightforward (to my knowledge) and would need samtools (see this post Extracting Reads Containing A Specific Variant From A Bam File). The question that comes immediately to my mind is, why you want to filter reads with a specific mismatch? Because if you want to investigate specific variants and count how many reads support which variant, then this goes into variant callling (see here Galaxy Training!).

Best wishes,
Florian

1 Like