Insert Size For Each Bam Entry
2
0
Entering edit mode
10.7 years ago

Hi,

I've a bam file and I want to know the insert size for each entry. I know that picard CollectInsertSizeMetrics gives me statistics about insert size, but is it possible to have it for every entry ?

thanks

bam • 9.9k views
ADD COMMENT
1
Entering edit mode
10.7 years ago

The ninth column of the SAM file (TLEN) approximately represents the insert size. Subtract length of a read (For example 75 bp or 100 bp) from TLEN to get the insert size.

See this earlier post from me:

estimating Insert size from paired end data.

ADD COMMENT
0
Entering edit mode

I know I'm late. But, given the information at http://thegenomefactory.blogspot.de/2013/08/paired-end-read-confusion-library.html, are you sure about subtracting?

ADD REPLY
0
Entering edit mode
10.7 years ago
Vitis ★ 2.6k

Please see Bio::DB::Sam perl API for accessing SAM and BAM files. It has an explicit function to fetch the insert size for each mapped read pair. http://search.cpan.org/~lds/Bio-SamTools/lib/Bio/DB/Sam.pm#BAM_Files

ADD COMMENT

Login before adding your answer.

Traffic: 1959 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