ok thanks. FYI I used bowtie2
Is PICARD CollectInsertSizeMetrics use soft-clipping information to compute the insert size ?
Hi,
I've a basic question concerning picard CollectInsertSizeMetrics (tool that computes insert size metrics). Are the soft-clipping bases take into account for the insert size measure ?
Here's a quick draw of my question. So is the insert size computed x (without soft-clipping) or y (with soft-clipping)
Thanks

• 4,324 views
•
link
1 answer
it uses the information stored in the BAM file (TLEN): so it's not dependent of picard.
final int insertSize = Math.abs(samRecord.getInferredInsertSize());
So is the insert size computed x (without soft-clipping)
in bwa mem; the cigar string is used: https://github.com/lh3/bwa/blob/master/bwamem.c , but I would say that clipping is ignored (?).
int64_t p0 = p->pos + (p->is_rev? get_rlen(p->n_cigar, p->cigar) - 1 : 0);
int64_t p1 = m->pos + (m->is_rev? get_rlen(m->n_cigar, m->cigar) - 1 : 0);
static inline int get_rlen(int n_cigar, const uint32_t *cigar)
{
int k, l;
for (k = l = 0; k < n_cigar; ++k) {
int op = cigar[k]&0xf;
if (op == 0 || op == 2)
l += cigar[k]>>4;
}
return l;
}
• 0 views
•
link
• 0 views
•
link
Log in to answer this question.