]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.2-25
authorHeng Li <lh3@live.co.uk>
Tue, 14 Apr 2009 21:04:19 +0000 (21:04 +0000)
committerHeng Li <lh3@live.co.uk>
Tue, 14 Apr 2009 21:04:19 +0000 (21:04 +0000)
 * change the pileup indel line to shows the number of alignments actually
   containing indels

bam_maqcns.c
bam_plcmd.c
bamtk.c
samtools.1

index 6b2b5e03260da470801ce70b8ff18f788c8fd880..60a194525425d711a23a286d6f411358911173f1 100644 (file)
@@ -460,14 +460,11 @@ bam_maqindel_ret_t *bam_maqindel(int n, int pos, const bam_maqindel_opt_t *mi, c
                                        ret->s[1][k+1] = ref[pos + k + 1];
                        } else ret->s[1][0] = '*';
                        // write count
-                       for (j = 0; j < n; ++j) {
-                               if (score[max1_i*n+j] < 0 && score[max2_i*n+j] < 0) ++ret->cnt_anti;
-                               else {
-                                       int diff = score[max1_i*n+j] - score[max2_i*n+j];
-                                       if (diff > mi->ambi_thres) ++ret->cnt1;
-                                       else if (diff < -mi->ambi_thres) ++ret->cnt2;
-                                       else ++ret->cnt_ambi;
-                               }
+                       for (i = 0; i < n; ++i) {
+                               const bam_pileup1_t *p = pl + i;
+                               if (p->indel == ret->indel1) ++ret->cnt1;
+                               else if (p->indel == ret->indel2) ++ret->cnt2;
+                               else ++ret->cnt_anti;
                        }
                        // write gl[]
                        ret->gl[0] = ret->gl[1] = 0;
index b85fb866a140f2e3f8e2b83af5cfbb942cb43a1b..5f20c1ead0f156ce85eb3d771e0b2a0106e6bb53 100644 (file)
@@ -238,7 +238,7 @@ static int pileup_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *p
                printf("%d\t%d\t", max_mapq, n);
                printf("%s\t%s\t", r->s[0], r->s[1]);
                //printf("%d\t%d\t", r->gl[0], r->gl[1]);
-               printf("%d\t%d\t%d\t%d\n", r->cnt1, r->cnt2, r->cnt_ambi, r->cnt_anti);
+               printf("%d\t%d\t%d\n", r->cnt1, r->cnt2, r->cnt_anti);
                bam_maqindel_ret_destroy(r);
        }
        return 0;
diff --git a/bamtk.c b/bamtk.c
index 1dac729ab27bbd18d670f813161de0558db3197c..096cb90003997fe30f4620a4202ef1c54b3110f2 100644 (file)
--- a/bamtk.c
+++ b/bamtk.c
@@ -3,7 +3,7 @@
 #include "bam.h"
 
 #ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.2-24"
+#define PACKAGE_VERSION "0.1.2-25"
 #endif
 
 int bam_taf2baf(int argc, char *argv[]);
index 6b1879aefcb6166ef22a2206122d10d1ece0f7a0..9f6381a2717b3c415dc08d2229e59dbd0f938cd3 100644 (file)
@@ -163,10 +163,9 @@ maximum mapping quality of the reads covering the site will be inserted
 between the `reference base' and the `read bases' columns. An indel
 occupies an additional line. Each indel line consists of chromosome
 name, coordinate, a star, top two high-scoring ins/del sequences, the
-number of reads strongly supporting the first indel, the number of reads
-strongly supporting the second indel, the number of reads that confer
-little information on distinguishing indels and the number of reads that
-contain indels different from the top two ones.
+number of alignments containing the first indel allele, the number of
+alignments containing the second indel allele, and the number of
+alignments containing indels different from the top two alleles.
 
 .B OPTIONS:
 .RS
@@ -324,17 +323,17 @@ In general, more testing is needed to ensure there is no severe bug.
 .IP o 2
 Reference sequence names and lengths are not acquired from the BAM/SAM header.
 .IP o 2
-CIGAR operations N and P may not be properly handled.
+CIGAR operation P is not properly handled at the moment.
 .IP o 2
 There is a small memory leak in the viewer.
 
 .SH AUTHOR
 .PP
-Heng Li from the Sanger Institute is the author of the C version of
-samtools. Bob Handsaker from the Broad Institute implemented the BGZF
-library and Jue Ruan from Beijing Genomics Institute wrote the RAZF
-library. Various people in the 1000Genomes Project contributed to the
-SAM format specification.
+Heng Li from the Sanger Institute wrote the C version of samtools. Bob
+Handsaker from the Broad Institute implemented the BGZF library and Jue
+Ruan from Beijing Genomics Institute wrote the RAZF library. Various
+people in the 1000Genomes Project contributed to the SAM format
+specification.
 
 .SH SEE ALSO
 .PP