mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add len_file_path configurable to specify where chrom .len files are stored
This commit is contained in:
@@ -46,6 +46,7 @@ class Configuration( object ):
|
||||
self.enable_openid = string_as_bool( kwargs.get( 'enable_openid', False ) )
|
||||
self.tool_path = resolve_path( kwargs.get( "tool_path", "tools" ), self.root )
|
||||
self.tool_data_path = resolve_path( kwargs.get( "tool_data_path", "tool-data" ), os.getcwd() )
|
||||
self.len_file_path = kwargs.get( "len_file_path", resolve_path(os.path.join(self.tool_data_path, 'shared','ucsc','chrom'), self.root) )
|
||||
self.test_conf = resolve_path( kwargs.get( "test_conf", "" ), self.root )
|
||||
self.tool_config = resolve_path( kwargs.get( 'tool_config_file', 'tool_conf.xml' ), self.root )
|
||||
self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root )
|
||||
|
||||
@@ -130,7 +130,7 @@ class UsesVisualization( SharableItemSecurity ):
|
||||
|
||||
# Read len files.
|
||||
if not self.len_files:
|
||||
len_files = glob.glob(os.path.join( trans.app.config.tool_data_path, 'shared','ucsc','chrom', "*.len" ))
|
||||
len_files = glob.glob( os.path.join(trans.app.config.len_file_path, "*.len") )
|
||||
self.len_files = [ os.path.split(f)[1].split(".len")[0] for f in len_files ] # get xxx.len
|
||||
|
||||
user_keys = {}
|
||||
|
||||
@@ -306,7 +306,7 @@ class TracksController( BaseController, UsesVisualization, UsesHistoryDatasetAss
|
||||
if not len_file:
|
||||
len_ds = trans.db_dataset_for( dbkey )
|
||||
if not len_ds:
|
||||
len_file = os.path.join( trans.app.config.tool_data_path, 'shared','ucsc','chrom', "%s.len" % vis_dbkey )
|
||||
len_file = os.path.join( trans.app.config.len_file_path, "%s.len" % vis_dbkey )
|
||||
else:
|
||||
len_file = len_ds.file_name
|
||||
|
||||
|
||||
@@ -132,6 +132,10 @@ paste.app_factory = galaxy.web.buildapp:app_factory
|
||||
# http://bitbucket.org/galaxy/galaxy-central/wiki/DataIntegration
|
||||
#tool_data_path = tool-data
|
||||
|
||||
# Directory where chrom len files are kept, currently mainly used by trackster
|
||||
#len_file_path = tool-data/shared/ucsc/chrom
|
||||
|
||||
|
||||
# Datatypes config file, defines what data (file) types are available in
|
||||
# Galaxy.
|
||||
#datatypes_config_file = datatypes_conf.xml
|
||||
|
||||
Reference in New Issue
Block a user