Question: Search A Dna Sequence Motif In Bam File?
gravatar for newDNASeqer
6.0 years ago by
United States
newDNASeqer680 wrote:

I need to find a short DNA sequence motif from a BAM file, because the wet biologist found a potential mutation from Sanger sequencing. I need to double check if this finding is also present in the RNA-Seq reads aligned to human hg19 reference genome (in a BAM). Is there any way to do this effectively?

I tried to use IGV and used the motif search (in Tools menu), but have no luck locating the sequenc (15 bp long). Any other approaches available?


bam motif dna • 5.4k views
ADD COMMENTlink modified 6.0 years ago by JC9.7k • written 6.0 years ago by newDNASeqer680
gravatar for JC
6.0 years ago by
JC9.7k wrote:

You can pull out the reads matching your motif using perl or grep, just remember to do in both directions:

samtools view *file.bam* | grep *motif* > sequences.sam
samtools view *file.bam* | grep *reverse_complement_motif* >> sequences.sam

But it's better if your wet-biologist gives you the expected coordinates, the you can extract the reads mapped to that location or view in IGV or other browser.

samtools view *file.bam* chr:start-end
ADD COMMENTlink written 6.0 years ago by JC9.7k

thanks JC. If they could tell me the coordinates, I would be able to just view it in IGV :)

ADD REPLYlink written 6.0 years ago by newDNASeqer680
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1166 users visited in the last hour