X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sam_header.c;h=f49b2d463cff3301ee9351ec956a69d6d2c185c4;hb=50706bea83d8a1518485283876333279f4ae7137;hp=05d75deb2c4ced014c6ae5f8612260d05b34660a;hpb=e6ca3f825fea0a18b6068905e3173ff19104e756;p=samtools.git diff --git a/sam_header.c b/sam_header.c index 05d75de..f49b2d4 100644 --- a/sam_header.c +++ b/sam_header.c @@ -563,6 +563,7 @@ void *sam_header_parse2(const char *headerText) const char *text; char *buf=NULL; size_t nbuf = 0; + int tovalidate = 0; if ( !headerText ) return 0; @@ -571,7 +572,7 @@ void *sam_header_parse2(const char *headerText) while ( (text=nextline(&buf, &nbuf, text)) ) { hline = sam_header_line_parse(buf); - if ( hline && sam_header_line_validate(hline) ) + if ( hline && (!tovalidate || sam_header_line_validate(hline)) ) // With too many (~250,000) reference sequences the header parsing was too slow with list_append. hlines = list_append_to_end(hlines, hline); else