From: Heng Li Date: Tue, 14 Apr 2009 21:04:19 +0000 (+0000) Subject: * samtools-0.1.2-25 X-Git-Url: https://git.donarmstrong.com/?p=samtools.git;a=commitdiff_plain;h=65467e102237a46ec6bda3727cfd1448a6b69c05 * samtools-0.1.2-25 * change the pileup indel line to shows the number of alignments actually containing indels --- diff --git a/bam_maqcns.c b/bam_maqcns.c index 6b2b5e0..60a1945 100644 --- a/bam_maqcns.c +++ b/bam_maqcns.c @@ -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; diff --git a/bam_plcmd.c b/bam_plcmd.c index b85fb86..5f20c1e 100644 --- a/bam_plcmd.c +++ b/bam_plcmd.c @@ -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 1dac729..096cb90 100644 --- 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[]); diff --git a/samtools.1 b/samtools.1 index 6b1879a..9f6381a 100644 --- a/samtools.1 +++ b/samtools.1 @@ -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