X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam_rmdup.c;h=f0d2b5d54b462dac998f3cc094fdff1bbaac54bd;hb=0b3418cf166ce4a58cedf0d9a2df5ec3dd4cc5fa;hp=fe6fbeff97f13f427e84d6de72ab2d7e1f5e7deb;hpb=8bee1f18418f068dc0d73ad6ec47084c2f830b32;p=samtools.git diff --git a/bam_rmdup.c b/bam_rmdup.c index fe6fbef..f0d2b5d 100644 --- a/bam_rmdup.c +++ b/bam_rmdup.c @@ -127,11 +127,9 @@ void bam_rmdup_core(samfile_t *in, samfile_t *out) } else if (c->isize > 0) { // paired, head uint64_t key = (uint64_t)c->pos<<32 | c->isize; const char *lib; - const uint8_t *rg; lib_aux_t *q; 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; k = kh_put(pos, q->best_hash, key, &ret);