mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Fix for displaying peek columns if a column contains no data.
This commit is contained in:
@@ -255,7 +255,7 @@ class Interval( Tabular ):
|
||||
>>> Interval().sniff( fname )
|
||||
True
|
||||
"""
|
||||
headers = get_headers( filename, '\t' )
|
||||
headers = get_headers( filename, '\t' )
|
||||
try:
|
||||
"""
|
||||
If we got here, we already know the file is_column_based and is not bed,
|
||||
@@ -266,8 +266,10 @@ class Interval( Tabular ):
|
||||
if len(hdr) < 3:
|
||||
return False
|
||||
try:
|
||||
int( hdr[1] )
|
||||
int( hdr[2] )
|
||||
# Assume chrom start and end are in column positions 1 and 2
|
||||
# respectively ( for 0 based columns )
|
||||
check = int( hdr[1] )
|
||||
check = int( hdr[2] )
|
||||
except:
|
||||
return False
|
||||
return True
|
||||
|
||||
@@ -57,7 +57,6 @@ class Tabular( data.Text ):
|
||||
if i == 100:
|
||||
# We're about to end our loop, so default col_type to 'str'
|
||||
col_type = 'str'
|
||||
column_types.append( col_type )
|
||||
else:
|
||||
# Missing a column value, so go to the next line
|
||||
column_types = []
|
||||
|
||||
Reference in New Issue
Block a user