Is PICARD CollectInsertSizeMetrics use soft-clipping information to compute the insert size ?
1
2
Entering edit mode
7.2 years ago

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

enter image description here

picard insert size soft-clipping • 3.7k views
ADD COMMENT
2
Entering edit mode
7.2 years ago

it uses the information stored in the BAM file (TLEN): so it's not dependent of picard.

https://github.com/broadinstitute/picard/blob/master/src/main/java/picard/analysis/directed/InsertSizeMetricsCollector.java#L53

        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;
}
ADD COMMENT
0
Entering edit mode

ok thanks. FYI I used bowtie2

ADD REPLY

Login before adding your answer.

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