X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=samtools.git;a=blobdiff_plain;f=sample.c;h=4e4b8a455ed445bd9676ed7e1ffe4abbe8f52048;hp=3efc559dfda52ff5b8a706feb4036a79a7d1c6f8;hb=b301e959d73eee0955c57004f344f17af00703f4;hpb=8a8212c76299ff302cdd41be704d8e0308bd2b1b diff --git a/sample.c b/sample.c index 3efc559..4e4b8a4 100644 --- a/sample.c +++ b/sample.c @@ -55,6 +55,10 @@ int bam_smpl_add(bam_sample_t *sm, const char *fn, const char *txt) kstring_t buf; int n = 0; khash_t(sm) *sm2id = (khash_t(sm)*)sm->sm2id; + if (txt == 0) { + add_pair(sm, sm2id, fn, fn); + return 0; + } memset(&buf, 0, sizeof(kstring_t)); while ((q = strstr(p, "@RG")) != 0) { p = q + 3;