Question: Search A Dna Sequence Motif In Bam File?
gravatar for newDNASeqer
5.2 years ago by
United States
newDNASeqer630 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 • 4.6k views
ADD COMMENTlink modified 5.2 years ago by JC7.8k • written 5.2 years ago by newDNASeqer630
gravatar for JC
5.2 years ago by
JC7.8k 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 5.2 years ago by JC7.8k

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

ADD REPLYlink written 5.2 years ago by newDNASeqer630
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: 1826 users visited in the last hour