]> git.donarmstrong.com Git - samtools.git/blobdiff - bam.h
* samtools-0.1.3-7 (r246)
[samtools.git] / bam.h
diff --git a/bam.h b/bam.h
index 92e7a36da97299d50aaa89e2576fb1242cf1576f..4045684230a7cba886a0ed0fa390db3340866f91 100644 (file)
--- a/bam.h
+++ b/bam.h
@@ -179,7 +179,6 @@ typedef struct {
   @field  data_len   current length of bam1_t::data
   @field  m_data     maximum length of bam1_t::data
   @field  data       all variable-length data, concatenated; structure: cigar-qname-seq-qual-aux
-  @field  hash       hash table for fast retrieval of tag-value pairs; private
 
   @discussion Notes:
  
@@ -191,7 +190,6 @@ typedef struct {
        bam1_core_t core;
        int l_aux, data_len, m_data;
        uint8_t *data;
-       void *hash;
 } bam1_t;
 
 #define bam1_strand(b) (((b)->core.flag&BAM_FREVERSE) != 0)
@@ -401,8 +399,8 @@ extern "C" {
          @abstract  Free the memory allocated for an alignment.
          @param  b  pointer to an alignment
         */
-#define bam_destroy1(b) do {                                           \
-               if ((b)->hash) free((b)->data); free(b);        \
+#define bam_destroy1(b) do {           \
+               free((b)->data); free(b);       \
        } while (0)
 
        /*!
@@ -608,6 +606,35 @@ extern "C" {
        char bam_aux2A(const uint8_t *s);
        char *bam_aux2Z(const uint8_t *s);
 
+       /*!
+        @abstract     Get the color encoding the previous and current base
+        @param b      pointer to an alignment
+        @param i      The i-th position, 0-based
+        @return       color
+
+        @discussion   Returns 0 no color information is found.
+        */
+       char bam_aux_getCSi(bam1_t *b, int i);
+
+       /*!
+        @abstract     Get the color quality of the color encoding the previous and current base
+        @param b      pointer to an alignment
+        @param i      The i-th position, 0-based
+        @return       color quality
+
+        @discussion   Returns 0 no color information is found.
+        */
+       char bam_aux_getCQi(bam1_t *b, int i);
+
+       /*!
+        @abstract     Get the color error profile at the give position    
+        @param b      pointer to an alignment
+        @return       the original color if the color was an error, '-' (dash) otherwise
+
+        @discussion   Returns 0 no color information is found.
+        */
+       char bam_aux_getCEi(bam1_t *b, int i);
+
        /*!  
          @abstract Calculate the rightmost coordinate of an alignment on the
          reference genome.