X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam.h;h=4045684230a7cba886a0ed0fa390db3340866f91;hb=41586185b43962c1ffb3f82e93066a480254aa17;hp=92e7a36da97299d50aaa89e2576fb1242cf1576f;hpb=63e4e54189bc9e7f43852edf865f95e713b93dc4;p=samtools.git diff --git a/bam.h b/bam.h index 92e7a36..4045684 100644 --- 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.