Samtools mpileup meaning of IMF and IDV
2
2
Entering edit mode
9.2 years ago
cruckert8 ▴ 30

Can someone explain in more detail (or point me to the corresponding documentation) the calculation of IDV (=Maximum number of reads supporting an indel) and IMF (=Maximum fraction of reads supporting an indel) samtools mpileup is adding to the vcf output. Which reads are considered as "supporting an indel"? These values significantly differ from the number of reads for the alt allele given in DP4.

Thanks,

Christian

samtools mpileup vcf • 3.4k views
ADD COMMENT
0
Entering edit mode

What software is making vcfs with those tags?

ADD REPLY
2
Entering edit mode
6.5 years ago
elzedleeu ▴ 20

IDV 1 Integer Maximum number of reads supporting an indel
IMF 1 Float Maximum fraction of reads supporting an indel

based on the introduction here: https://support.bioconductor.org/p/78318/

ADD COMMENT
0
Entering edit mode
6.5 years ago
vo2 • 0

It doesn't appear to be documented.

The relevant section from the samtools code is

for (s = 0; s < n; ++s) {
    int na = 0, nt = 0;
    for (i = 0; i < n_plp[s]; ++i) {
        const bam_pileup1_t *p = plp[s] + i;
        if (rghash == 0 || p->aux == 0) {
            ++nt;
            if (p->indel != 0) {
                ++na;
                aux[m++] = MINUS_CONST + p->indel;
            }
        }
        j = bam_cigar2qlen(p->b->core.n_cigar, bam_get_cigar(p->b));
        if (j > max_rd_len) max_rd_len = j;
    }
    double frac = (double)na/nt;
    if ( !indel_support_ok && na >= bca->min_support && frac >= bca->min_frac )
        indel_support_ok = 1;
    if ( na > bca->max_support && frac > 0 ) bca->max_support = na, bca->max_frac = frac;
    n_alt += na;
    n_tot += nt;
}

IDV is bca->max_support and IMF is bca->max_frac.

ADD COMMENT

Login before adding your answer.

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