Fix for history item html for taxonomy data type, eliminated the type from the registry-not quite ready for prime time. Fix for cleanup_datasets script.

This commit is contained in:
Greg Von Kuster
2008-03-05 13:22:01 +00:00
parent f5b8b81a3d
commit 5392fc0ab8
3 changed files with 8 additions and 9 deletions
-2
View File
@@ -52,7 +52,6 @@ class Registry( object ):
'qualityscore': qualityscore.QualityScore(),
'scf' : images.Scf(),
'tabular' : tabular.Tabular(),
'taxonomy' : tabular.Taxonomy(),
'txt' : data.Text(),
'txtseq.zip' : images.Txtseq(),
'wig' : interval.Wiggle()
@@ -73,7 +72,6 @@ class Registry( object ):
'qualityscore': 'text/plain',
'scf' : 'application/octet-stream',
'tabular' : 'text/plain',
'taxonomy' : 'text/plani',
'txt' : 'text/plain',
'txtseq.zip' : 'application/zip',
'wig' : 'text/plain'
+7 -7
View File
@@ -155,17 +155,17 @@ class Taxonomy( Tabular ):
continue
elems = line.split( '\t' )
# This data type requires at least 24 columns in the data
int_col_headers = len( elems ) - len( self.column_names )
if first: #generate header
first = False
out.append( '<tr>' )
for index, elem in enumerate( elems[0:int_col_headers] ):
out.append( "<th>%s</th>" % ( index+1 ) )
for index, name in enumerate( self.column_names ):
out.append( "<th>%s</th>" % name )
out.append( '</tr>' )
out.append( "<th>%s.%s</th>" % ( str( index+1 ), name ) )
# This data type requires at least 24 columns in the data
num_col_headers = len( elems ) - len( self.column_names )
if num_col_headers > 0:
for index in range( len( self.column_names ), len( elems ) ):
out.append( "<th>%s</th>" % ( index+1 ) )
out.append( '</tr>' )
while len( comments ) > 0:
out.append( '<tr><td colspan="100%">' )
+1
View File
@@ -148,6 +148,7 @@ def purge_histories( h, cutoff_time, remove_from_disk ):
start = time.clock()
histories = h.query().filter( where ).options( eagerload( 'datasets' ) )
for history in histories:
errors = False
for dataset in history.datasets:
if not dataset.purged:
file_size = dataset.file_size