How to extract exon from bam file
1
0
Entering edit mode
3.5 years ago
9521ljh ▴ 50

Hi,

i have a bam file which is genome data(DNA sequencing). it has 'exonic', 'intergenic' 'intronic' UTR3 ... positions.

However i want to use the tool 'VarScan 2' which is appropriate to exon sequencing.

So, anyone know? how to extract only exon position from Bamfile???

SNP genome sequencing sequence • 1.4k views
ADD COMMENT
0
Entering edit mode

Why wouldn't Varscan 2 be an option for whole genome sequencing? Where did you read that?

You probably shouldn't start extracting positions from your bam file. If you absolutely want to filter you could do that afterwards as well.

ADD REPLY
0
Entering edit mode

Get an annotation file for exons (please use google and the search function, make a bed file out of it and then use the -L option of samtools view).

ADD REPLY
0
Entering edit mode
3.5 years ago
Buffo ★ 1.9k

To see reads mapped to specific location:

samtools view file.bam "chr:coordinate1-coordinate2"

To see reads mapped to specific location and save them as bam:

samtools view -b file.bam "chr:coordinate1-coordinate2"  > my_new_bam.bam
ADD COMMENT

Login before adding your answer.

Traffic: 1521 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6