X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam_rmdupse.c;h=e7dbdc77d05f05d9c9622b484557df3504d6f4c1;hb=0ccd9d36ebf35ce620a8248ecf4336c84065e6c0;hp=edc73a4c720e3481127e4868114911c0158dc586;hpb=56ae21c41704d35a30a642fb8a3ea9e39f6460b9;p=samtools.git diff --git a/bam_rmdupse.c b/bam_rmdupse.c index edc73a4..e7dbdc7 100644 --- a/bam_rmdupse.c +++ b/bam_rmdupse.c @@ -117,13 +117,11 @@ void bam_rmdupse_core(samfile_t *in, samfile_t *out, int force_se) push_queue(queue, b, endpos, score); } else { const char *lib; - const uint8_t *rg; lib_aux_t *q; besthash_t *h; uint32_t key; int ret; - rg = bam_aux_get(b, "RG"); - lib = (rg == 0)? 0 : bam_strmap_get(in->header->rg2lib, (char*)(rg + 1)); + lib = bam_get_library(in->header, b); q = lib? get_aux(aux, lib) : get_aux(aux, "\t"); ++q->n_checked; h = (c->flag&BAM_FREVERSE)? q->rght : q->left;