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?
Insert Size For Each Bam Entry
2 answers
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:
• 69 views
•
link
• 0 views
•
link
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
• 0 views
•
link
Log in to answer this question.