]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_stat.c
* samtools-0.1.2-3
[samtools.git] / bam_stat.c
index 3f58686d4830d269b961001c4778187add3ed1bb..142933666d687e261367664aaabcdbfcb4e3107f 100644 (file)
@@ -58,14 +58,15 @@ int bam_flagstat(int argc, char *argv[])
        printf("%lld in total\n", s->n_reads);
        printf("%lld QC failure\n", s->n_qcfail);
        printf("%lld duplicates\n", s->n_dup);
-       printf("%lld mapped\n", s->n_mapped);
+       printf("%lld mapped (%.2f%%)\n", s->n_mapped, (float)s->n_mapped / s->n_reads * 100.0);
        printf("%lld paired in sequencing\n", s->n_pair_all);
        printf("%lld read1\n", s->n_read1);
        printf("%lld read2\n", s->n_read2);
-       printf("%lld properly paired\n", s->n_pair_good);
-       printf("%lld with both itself and its mate mapped\n", s->n_pair_map);
-       printf("%lld singletons\n", s->n_sgltn);
-       printf("%lld with its mate mapped to a different chr\n", s->n_diffchr);
+       printf("%lld properly paired (%.2f%%)\n", s->n_pair_good, (float)s->n_pair_good / s->n_reads * 100.0);
+       printf("%lld with itself and mate mapped\n", s->n_pair_map);
+       printf("%lld singletons (%.2f%%)\n", s->n_sgltn, (float)s->n_sgltn / s->n_reads * 100.0);
+       printf("%lld with mate mapped to a different chr\n", s->n_diffchr);
+       printf("%lld with mate mapped to a different chr (mapQ>=5)\n", s->n_diffhigh);
        free(s);
        bam_header_destroy(header);
        bam_close(fp);