@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:
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)
@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)
/*!
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.