Merge pull request #3033 from nsoranzo/fix_for_3001

Increase min number of columns for pileup sniffing to 5
This commit is contained in:
John Chilton
2016-10-17 13:23:40 -04:00
committed by GitHub
+3 -2
View File
@@ -644,12 +644,13 @@ class Pileup( Tabular ):
try:
for hdr in headers:
if hdr and not hdr[0].startswith( '#' ):
if len( hdr ) < 3:
if len( hdr ) < 5:
return False
try:
# chrom start in column 1 (with 0-based columns)
# and reference base is in column 2
int( hdr[1] )
chrom = int( hdr[1] )
assert chrom >= 0
assert hdr[2] in [ 'A', 'C', 'G', 'T', 'N', 'a', 'c', 'g', 't', 'n' ]
except:
return False