mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Trackster: better comments and help text.
This commit is contained in:
@@ -21,9 +21,11 @@ class SummaryTree:
|
||||
self.chrom_stats = {}
|
||||
|
||||
def find_block( self, num, level ):
|
||||
""" Returns block that num is in for level. """
|
||||
return ( num / self.block_size ** level )
|
||||
|
||||
def insert_range( self, chrom, start, end ):
|
||||
""" Inserts a feature at chrom:start-end into the tree. """
|
||||
if chrom in self.chrom_blocks:
|
||||
blocks = self.chrom_blocks[ chrom ]
|
||||
else:
|
||||
@@ -44,7 +46,7 @@ class SummaryTree:
|
||||
block_level[ block ] = 1
|
||||
|
||||
def finish( self ):
|
||||
''' Checks for cutoff and only stores levels above it '''
|
||||
""" Checks for cutoff and only stores levels above it """
|
||||
for chrom, blocks in self.chrom_blocks.iteritems():
|
||||
cur_best = 999
|
||||
for level in range( self.levels, MIN_LEVEL-1, -1 ):
|
||||
@@ -65,6 +67,7 @@ class SummaryTree:
|
||||
self.chrom_blocks[ chrom ] = dict( [ ( key, value ) for key, value in blocks.iteritems() if key >= cur_best ] )
|
||||
|
||||
def query( self, chrom, start, end, level ):
|
||||
""" Queries tree for data. """
|
||||
if chrom in self.chrom_blocks:
|
||||
stats = self.chrom_stats[ chrom ]
|
||||
if "detail_level" in stats and level <= stats[ "detail_level" ]:
|
||||
@@ -84,6 +87,7 @@ class SummaryTree:
|
||||
return None
|
||||
|
||||
def write( self, filename ):
|
||||
""" Writes tree to file. """
|
||||
self.finish()
|
||||
cPickle.dump( self, open( filename, 'wb' ), 2 )
|
||||
|
||||
|
||||
@@ -415,8 +415,8 @@ var
|
||||
DATA_ERROR = "There was an error in indexing this dataset. ",
|
||||
DATA_NOCONVERTER = "A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",
|
||||
DATA_NONE = "No data for this chrom/contig.",
|
||||
DATA_PENDING = "Preparing data. This is very fast for a small dataset but can take a long time for a large dataset. \
|
||||
If visualization is saved and closed, preparation will continue in the background.",
|
||||
DATA_PENDING = "Preparing data. This can take a while for a large dataset. \
|
||||
If the visualization is saved and closed, preparation will continue in the background.",
|
||||
DATA_CANNOT_RUN_TOOL = "Tool cannot be rerun: ",
|
||||
DATA_LOADING = "Loading data...",
|
||||
DATA_OK = "Ready for display",
|
||||
|
||||
Reference in New Issue
Block a user