Question: Is PICARD CollectInsertSizeMetrics use soft-clipping information to compute the insert size ?
1
gravatar for Nicolas Rosewick
2.5 years ago by
Belgium, Brussels
Nicolas Rosewick8.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 2.5 years ago by Pierre Lindenbaum126k • written 2.5 years ago by Nicolas Rosewick8.6k
1
gravatar for Pierre Lindenbaum
2.5 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum126k 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 2.5 years ago by Pierre Lindenbaum126k

ok thanks. FYI I used bowtie2

ADD REPLYlink written 2.5 years ago by Nicolas Rosewick8.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: 1802 users visited in the last hour