]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_aux.c
*
[samtools.git] / bam_aux.c
index 894ae628c11958dc0ed0ca49ca95d170e54ab9c7..6a82d9affb8e4d0341cf3ae26997e4e1bc72f594 100644 (file)
--- a/bam_aux.c
+++ b/bam_aux.c
@@ -28,7 +28,7 @@ uint8_t *bam_aux_get_core(bam1_t *b, const char tag[2])
 #define __skip_tag(s) do { \
                int type = toupper(*(s));                                                                               \
                ++(s);                                                                                                                  \
-               if (type == 'C') ++(s);                                                                                 \
+               if (type == 'C' || type == 'A') ++(s);                                                  \
                else if (type == 'S') (s) += 2;                                                                 \
                else if (type == 'I' || type == 'F') (s) += 4;                                  \
                else if (type == 'D') (s) += 8;                                                                 \
@@ -42,6 +42,7 @@ uint8_t *bam_aux_get(const bam1_t *b, const char tag[2])
        s = bam1_aux(b);
        while (s < b->data + b->data_len) {
                int x = (int)s[0]<<8 | s[1];
+               printf("%c%c\n", s[0], s[1]);
                s += 2;
                if (x == y) return s;
                __skip_tag(s);