Question: Is PICARD CollectInsertSizeMetrics use soft-clipping information to compute the insert size ?
1
gravatar for Nicolas Rosewick
21 months ago by
Belgium, Brussels
Nicolas Rosewick7.6k wrote:

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

ADD COMMENTlink modified 21 months ago by Pierre Lindenbaum120k • written 21 months ago by Nicolas Rosewick7.6k
1
gravatar for Pierre Lindenbaum
21 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum120k wrote:

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 COMMENTlink written 21 months ago by Pierre Lindenbaum120k

ok thanks. FYI I used bowtie2

ADD REPLYlink written 21 months ago by Nicolas Rosewick7.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 537 users visited in the last hour