insert size via bamtools stats inner or outer ?
1
1
Entering edit mode
9.6 years ago
Siva ▴ 20

Hi guys,

I've a doubt about the meaning of "insert size" from bamtools stats. I've done this: bamtools stats -in $1 -insert input is a bam produced with read1.fastq and read2.fastq (bwa), in each file reads' length is 100 b

and got an insert size of 241 so I supposed it's outer size = R1+R2+insert

**********************************************
Stats for BAM file(s):
**********************************************
Total reads:       820130832 ...

Average insert size (absolute value): 309.402
Median insert size (absolute value): 241

Advance thanks,
Siva

stat bamtools insert • 4.0k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode
9.5 years ago

Test it:

// if the alignment is downstream of mate then you can get the end position of the read.
if(al.Position > al.MatePosition){
int outter = abs(al.MatePosition - al.GetEndPosition());
int inner = al.InsertSize;
if(outter != inner){
cerr << "insert length is inner" << end;
}
ADD COMMENT

Login before adding your answer.

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