]> git.donarmstrong.com Git - samtools.git/blobdiff - bam.h
* samtools-0.1.4-8 (r338)
[samtools.git] / bam.h
diff --git a/bam.h b/bam.h
index a784a1f3f7f919d38e771a38a1a2d7b5d35cde2e..c635e72767e31852ddf8b2759a3d9493d13e58bc 100644 (file)
--- a/bam.h
+++ b/bam.h
@@ -100,7 +100,7 @@ typedef struct {
        int32_t n_targets;
        char **target_name;
        uint32_t *target_len;
-       void *hash;
+       void *hash, *rg2lib;
        int l_text;
        char *text;
 } bam_header_t;
@@ -190,7 +190,6 @@ typedef struct {
        bam1_core_t core;
        int l_aux, data_len, m_data;
        uint8_t *data;
-       void *hash; // for backward compatibility. It is NEVER used.
 } bam1_t;
 
 #define bam1_strand(b) (((b)->core.flag&BAM_FREVERSE) != 0)
@@ -318,9 +317,16 @@ extern "C" {
 
        bam_header_t *sam_header_read(tamFile fp);
        int sam_header_parse(bam_header_t *h);
+       int sam_header_parse_rg(bam_header_t *h);
 
 #define sam_write1(header, b) bam_view1(header, b)
 
+       int bam_strmap_put(void *strmap, const char *rg, const char *lib);
+       const char *bam_strmap_get(const void *strmap, const char *rg);
+       void *bam_strmap_dup(const void*);
+       void *bam_strmap_init();
+       void bam_strmap_destroy(void *strmap);
+
        /*!
          @abstract Initialize a header structure.
          @return   the pointer to the header structure
@@ -593,7 +599,8 @@ extern "C" {
        void bam_parse_region(bam_header_t *header, const char *str, int *ref_id, int *begin, int *end);
 
        void bam_aux_append(bam1_t *b, const char tag[2], char type, int len, uint8_t *data);
-       uint8_t *bam_aux_get(bam1_t *b, const char tag[2]);
+       // uint8_t *bam_aux_get_core(bam1_t *b, const char tag[2]); // an alias of bam_aux_get()
+       uint8_t *bam_aux_get(const bam1_t *b, const char tag[2]);
        int32_t bam_aux2i(const uint8_t *s);
        float bam_aux2f(const uint8_t *s);
        double bam_aux2d(const uint8_t *s);