Changeset 1101:9afb001ae21a

Show
Ignore:
Timestamp:
03/25/08 10:09:27 (10 months ago)
Author:
Greg Von Kuster <greg@bx.psu.edu>
branch:
default
convert_revision:
svn:9bcadc22-80f8-0310-8a53-c8f022958886/galaxy/trunk@2460
Message:

Changed GALAXY_DATA_INDEX_DIR from an environment variable to a config entry.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/galaxy/config.py

    r959 r1101  
    3333        self.new_file_path = resolve_path( kwargs.get( "new_file_path", "database/tmp" ), self.root ) 
    3434        self.tool_path = resolve_path( kwargs.get( "tool_path", "tools" ), self.root ) 
     35        self.tool_data_path = resolve_path( kwargs.get( "tool_data_path", "tool-data" ), os.getcwd() ) 
    3536        self.test_conf = resolve_path( kwargs.get( "test_conf", "" ), self.root ) 
    3637        self.tool_config = resolve_path( kwargs.get( 'tool_config_file', 'tool_conf.xml' ), self.root ) 
     
    5657        self.use_heartbeat = kwargs.get( 'use_heartbeat', False ) 
    5758        self.ucsc_display_sites = kwargs.get( 'ucsc_display_sites', "main,test,archaea" ).lower().split(",") 
    58         self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "wormbase,flybase" ).lower().split(",") 
    5959        self.brand = kwargs.get( 'brand', None ) 
    6060        self.wiki_url = kwargs.get( 'wiki_url', None ) 
     
    8888    def check( self ): 
    8989        # Check that required directories exist 
    90         for path in self.root, self.file_path, self.tool_path, self.template_path, self.job_working_directory, self.datatype_converters_path: 
     90        for path in self.root, self.file_path, self.tool_path, self.tool_data_path, self.template_path, self.job_working_directory, self.datatype_converters_path: 
    9191            if not os.path.isdir( path ): 
    9292                raise ConfigurationError("Directory does not exist: %s" % path ) 
  • lib/galaxy/jobs/runners/pbs.py

    r1092 r1101  
    2222export PATH='%s' 
    2323export PYTHONPATH='%s' 
    24 export GALAXY_DATA_INDEX_DIR='%s' 
    2524cd %s 
    2625%s 
     
    3130export PATH='%s' 
    3231export PYTHONPATH='%s' 
    33 export GALAXY_DATA_INDEX_DIR='%s' 
    3432for dataset in %s; do 
    3533    dir=`dirname $dataset` 
     
    155153        # write the job script 
    156154        if self.app.config.pbs_stage_path != '': 
    157             script = pbs_symlink_template % (os.environ['LC_ALL'], os.environ['NODEPATH'], os.environ['PYTHONPATH'], os.environ['GALAXY_DATA_INDEX_DIR'], " ".join(job_wrapper.get_input_fnames() + job_wrapper.get_output_fnames()), self.app.config.pbs_stage_path, exec_dir, command_line) 
    158         else: 
    159             script = pbs_template % (os.environ['LC_ALL'], os.environ['NODEPATH'], os.environ['PYTHONPATH'], os.environ['GALAXY_DATA_INDEX_DIR'], exec_dir, command_line) 
     155            script = pbs_symlink_template % (os.environ['LC_ALL'], os.environ['NODEPATH'], os.environ['PYTHONPATH'], " ".join(job_wrapper.get_input_fnames() + job_wrapper.get_output_fnames()), self.app.config.pbs_stage_path, exec_dir, command_line) 
     156        else: 
     157            script = pbs_template % (os.environ['LC_ALL'], os.environ['NODEPATH'], os.environ['PYTHONPATH'], exec_dir, command_line) 
    160158        job_file = "%s/database/pbs/%s.sh" % (os.getcwd(), job_wrapper.job_id) 
    161159        fh = file(job_file, "w") 
  • lib/galaxy/tools/__init__.py

    r1091 r1101  
    992992        param_dict['__new_file_path__'] = os.path.abspath(self.app.config.new_file_path) 
    993993        # The following points to location (xxx.loc) files which are pointers to locally cached data 
    994         param_dict['GALAXY_DATA_INDEX_DIR'] = os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
     994        param_dict['GALAXY_DATA_INDEX_DIR'] = self.app.config.tool_data_path 
    995995        # Return the dictionary of parameters 
    996996        return param_dict 
  • lib/galaxy/tools/parameters/dynamic_options.py

    r1091 r1101  
    1515        self.data_ref = None 
    1616        self.param_ref = None 
    17         self.from_file_data = None 
     17        self.data_file_path = None 
     18        self.data_file_data = None 
    1819        self.validators = [] 
    1920 
     
    2223        if self.data_file is not None: 
    2324            self.data_file = self.data_file.strip() 
    24             if self.data_file.startswith( 'static' ): 
    25                 # static files ( ucsc/builds.txt, etc ) have relative paths in the tool config 
    26                 self.from_file = self.data_file 
    27             else: 
    28                 self.from_file = "%s/%s" % ( os.environ.get( 'GALAXY_DATA_INDEX_DIR' ), self.data_file ) 
    29         else:  
    30             self.from_file = None 
    3125        self.name_col = elem.get( 'name_col', None ) 
    3226        if self.name_col is not None: 
     
    120114                    # We'll be reading data directly from the input dataset 
    121115                    filters[ 'data_meta' ][ 'meta_key' ] = 'data_ref' 
    122                     self.from_file = dataset.get_file_name() 
    123                     filters[ 'data_meta' ][ 'meta_value' ] = self.from_file 
     116                    self.data_file_path = dataset.get_file_name() 
     117                    filters[ 'data_meta' ][ 'meta_value' ] = self.data_file_path 
    124118                # meta_key_col is optional 
    125119                meta_key_col = filter.get( 'meta_key_col', None ) 
     
    157151                    filters[ 'params' ] = {} 
    158152                    filters[ 'params' ][ n ] = v 
     153        if self.data_file and self.data_file.startswith( 'static' ): 
     154            self.data_file_path = self.data_file 
     155        elif self.data_file not in [ None, 'data_ref' ]: 
     156            self.data_file_path = "%s/%s" % ( trans.app.config.tool_data_path, self.data_file ) 
    159157        # Now that we've parsed our filters, we need to see if the tool is a maf tool  
    160158        # which requires special handling 
     
    201199                return self.generate_for_encode( encode_group, dbkey, sep ) 
    202200            elif self.data_file == 'microbial_data.loc': 
    203                 if self.from_file_data is None:  
     201                if self.data_file_data is None:  
    204202                    self.load_microbial_data() 
    205203                try:  
     
    233231        def generate(): 
    234232            encode_sets = {} 
    235             for line in open( self.from_file ): 
     233            for line in open( self.data_file_path ): 
    236234                line = line.rstrip( '\r\n' ) 
    237235                if line and not line.startswith( '#' ): 
     
    314312        options = [] 
    315313        if not kingdom and not org and not feature: 
    316             kingdoms = self.from_file_data.keys() 
     314            kingdoms = self.data_file_data.keys() 
    317315            kingdoms.sort() 
    318316            for kingdom in kingdoms: 
     
    321319                options[0] = ( options[0][0], options[0][1], True ) 
    322320        elif kingdom and not org and not feature: 
    323             orgs = self.from_file_data[ kingdom ].keys() 
     321            orgs = self.data_file_data[ kingdom ].keys() 
    324322            #need to sort by name 
    325323            swap_test = False 
    326324            for i in range( 0, len( orgs ) - 1 ): 
    327325                for j in range( 0, len( orgs ) - i - 1 ): 
    328                     if self.from_file_data[ kingdom ][ orgs[ j ] ][ 'name' ] > self.from_file_data[ kingdom ][ orgs[ j + 1 ] ][ 'name' ]: 
     326                    if self.data_file_data[ kingdom ][ orgs[ j ] ][ 'name' ] > self.data_file_data[ kingdom ][ orgs[ j + 1 ] ][ 'name' ]: 
    329327                        orgs[ j ], orgs[ j + 1 ] = orgs[ j + 1 ], orgs[ j ] 
    330328                    swap_test = True 
     
    332330                    break 
    333331            for org in orgs: 
    334                  if self.from_file_data[ kingdom ][ org ][ 'link_site' ] == "UCSC": 
    335                     options.append( ( "<b>" + self.from_file_data[ kingdom ][ org ][ 'name' ] + "</b> <a href=\"" + self.from_file_data[ kingdom ][ org ][ 'info_url' ] + "\" target=\"_blank\">(about)</a>", org, False ) ) 
     332                 if self.data_file_data[ kingdom ][ org ][ 'link_site' ] == "UCSC": 
     333                    options.append( ( "<b>" + self.data_file_data[ kingdom ][ org ][ 'name' ] + "</b> <a href=\"" + self.data_file_data[ kingdom ][ org ][ 'info_url' ] + "\" target=\"_blank\">(about)</a>", org, False ) ) 
    336334                 else: 
    337                     options.append( ( self.from_file_data[ kingdom ][ org ][ 'name' ] + " <a href=\"" + self.from_file_data[ kingdom ][ org ][ 'info_url' ] + "\" target=\"_blank\">(about)</a>", org, False ) ) 
     335                    options.append( ( self.data_file_data[ kingdom ][ org ][ 'name' ] + " <a href=\"" + self.data_file_data[ kingdom ][ org ][ 'info_url' ] + "\" target=\"_blank\">(about)</a>", org, False ) ) 
    338336            if options: 
    339337                options[0] = ( options[0][0], options[0][1], True ) 
    340338        else: 
    341             chroms = self.from_file_data[ kingdom ][ org ][ 'chrs' ].keys() 
     339            chroms = self.data_file_data[ kingdom ][ org ][ 'chrs' ].keys() 
    342340            chroms.sort() 
    343341            for chr in chroms: 
    344                  for data in self.from_file_data[ kingdom ][ org ][ 'chrs' ][ chr ][ 'data' ]: 
    345                      if self.from_file_data[ kingdom ][ org ][ 'chrs' ][ chr ][ 'data' ][ data ][ 'feature' ] == feature: 
    346                          options.append( ( self.from_file_data[ kingdom ][ org ][ 'chrs' ][ chr ][ 'name' ] + " <a href=\"" + self.from_file_data[ kingdom ][ org ][ 'chrs' ][ chr ][ 'info_url' ] + "\" target=\"_blank\">(about)</a>", data, False ) ) 
     342                 for data in self.data_file_data[ kingdom ][ org ][ 'chrs' ][ chr ][ 'data' ]: 
     343                     if self.data_file_data[ kingdom ][ org ][ 'chrs' ][ chr ][ 'data' ][ data ][ 'feature' ] == feature: 
     344                         options.append( ( self.data_file_data[ kingdom ][ org ][ 'chrs' ][ chr ][ 'name' ] + " <a href=\"" + self.data_file_data[ kingdom ][ org ][ 'chrs' ][ chr ][ 'info_url' ] + "\" target=\"_blank\">(about)</a>", data, False ) ) 
    347345        return options 
    348346    def load_microbial_data( self, sep='\t' ): 
    349347        microbe_info= {} 
    350348        orgs = {} 
    351         for line in open( self.from_file ): 
     349        for line in open( self.data_file_path ): 
    352350            line = line.rstrip( '\r\n' ) 
    353351            if line and not line.startswith( '#' ): 
     
    422420            if org_num not in microbe_info[ org[ 'kingdom' ] ]: 
    423421                microbe_info[ org[ 'kingdom' ] ][org_num] = org 
    424         self.from_file_data = microbe_info 
     422        self.data_file_data = microbe_info 
    425423    def generate_for_species( self, species ): 
    426424        options = [] 
     
    431429        options = [] 
    432430        d = {} 
    433         for line in open( self.from_file ): 
     431        for line in open( self.data_file_path ): 
    434432            line = line.rstrip( '\r\n' ) 
    435433            if line and not line.startswith( '#' ): 
     
    477475        options = [] 
    478476        d = {} 
    479         for line in open( self.from_file ): 
     477        for line in open( self.data_file_path ): 
    480478            line = line.rstrip( '\r\n' ) 
    481479            if line and not line.startswith( '#' ): 
     
    529527    def generate( self, name_col, value_col, sep ): 
    530528        options = [] 
    531         for line in open( self.from_file ): 
     529        for line in open( self.data_file_path ): 
    532530            line = line.rstrip( '\r\n' ) 
    533531            if line and not line.startswith( '#' ): 
  • lib/galaxy/tools/parameters/validation.py

    r1091 r1101  
    213213    def from_element( cls, elem ): 
    214214        filename = elem.get( "filename", None ) 
     215        if filename: 
     216            filename = filename.strip() 
    215217        metadata_name = elem.get( "metadata_name", None ) 
     218        if metadata_name: 
     219            metadata_name = metadata_name.strip() 
    216220        metadata_column = int( elem.get( "metadata_column", 0 ) ) 
    217221        message = elem.get( "message", "Value for metadata %s was not found in %s." % ( metadata_name, filename ) ) 
    218222        split = elem.get( "split", None ) 
    219223        line_startswith = elem.get( "line_startswith", None  ) 
     224        if line_startswith: 
     225            line_startswith = line_startswith.strip() 
    220226        return cls( filename, metadata_name, metadata_column, message, split, line_startswith ) 
    221     def __init__( self, filename, metadata_name, metadata_column, message = "Value for metadata not found." , split = None, line_startswith = None ): 
     227    def __init__( self, filename, metadata_name, metadata_column, message="Value for metadata not found.", split=None, line_startswith=None ): 
    222228        self.metadata_name = metadata_name 
    223229        self.message = message 
    224230        self.valid_values = [] 
    225         filename = "%s/%s" % ( os.environ.get( 'GALAXY_DATA_INDEX_DIR' ), filename ) 
     231        #filename = "%s/%s" % ( GALAXY_DATA_INDEX_DIR, filename ) 
    226232        for line in open( filename ): 
    227233            if line_startswith is None or line.startswith( line_startswith ): 
  • lib/galaxy/tools/util/maf_utilities.py

    r1091 r1101  
    1010import sys, os, string, tempfile 
    1111 
    12 MAF_LOCATION_FILE = "%s/maf_index.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
    13  
    1412#an object corresponding to a reference layered alignment 
    1513class RegionAlignment( object ): 
     
    127125 
    128126#Open a MAF index using a UID 
    129 def maf_index_by_uid( maf_uid, index_location_file = None ): 
    130     for line in open( index_location_file or MAF_LOCATION_FILE ): 
     127def maf_index_by_uid( maf_uid, index_location_file ): 
     128    for line in open( index_location_file ): 
    131129        try: 
    132130            #read each line, if not enough fields, go to next line 
  • setup_paths.sh

    r1091 r1101  
    1515PYTHONPATH=$UNIVERSE_HOME/lib:$UNIVERSE_HOME/eggs/$PYTHON_UCS:$UNIVERSE_HOME/eggs 
    1616 
    17 # The following directory must include location ( xxx.loc ) files that point to the 
    18 # location where the locally cached data is stored.  These location files are used 
    19 # by various tools. 
    20 GALAXY_DATA_INDEX_DIR=$UNIVERSE_HOME/tool-data 
    21  
    22 export UNIVERSE_HOME PYTHONPATH GALAXY_DATA_INDEX_DIR 
     17export UNIVERSE_HOME PYTHONPATH 
    2318 
    2419## For PBS - if you need to force node paths (i.e. the arch the frontend 
  • tools/data_source/encode_import.py

    r1091 r1101  
    1717    uids = sys.argv[1].split(",") 
    1818    out_file1 = sys.argv[2] 
    19     file_name = "%s/encode_datasets.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
     19    file_name = "%s/encode_datasets.loc" % sys.argv[3] 
    2020     
    2121    #remove NONE from uids 
  • tools/data_source/encode_import_all_latest_datasets.xml

    r1091 r1101  
    11<tool id="encode_import_all_latest_datasets1" name="Combined Datasets"> 
    2   <command interpreter="python">encode_import.py $hg17,$hg16 $output</command> 
     2  <command interpreter="python">encode_import.py $hg17,$hg16 $output ${GALAXY_DATA_INDEX_DIR}</command> 
    33  <inputs> 
    44    <display> 
  • tools/data_source/encode_import_chromatin_and_chromosomes.xml

    r1091 r1101  
    11<tool id="encode_import_chromatin_and_chromosomes1" name="Chromatin and Chromosomes"> 
    2   <command interpreter="python">encode_import.py $hg17,$hg16 $output</command> 
     2  <command interpreter="python">encode_import.py $hg17,$hg16 $output ${GALAXY_DATA_INDEX_DIR}</command> 
    33  <inputs> 
    44    <display> 
  • tools/data_source/encode_import_gencode.xml

    r1091 r1101  
    11<tool id="encode_import_gencode1" name="Gencode Datasets"> 
    2   <command interpreter="python">encode_import.py $hg17,$hg16 $output</command> 
     2  <command interpreter="python">encode_import.py $hg17,$hg16 $output ${GALAXY_DATA_INDEX_DIR}</command> 
    33  <inputs> 
    44    <display> 
  • tools/data_source/encode_import_genes_and_transcripts.xml

    r1091 r1101  
    11<tool id="encode_import_genes_and_transcripts1" name="Genes and Transcripts"> 
    2   <command interpreter="python">encode_import.py $hg17,$hg16 $output</command> 
     2  <command interpreter="python">encode_import.py $hg17,$hg16 $output ${GALAXY_DATA_INDEX_DIR}</command> 
    33  <inputs> 
    44    <display> 
  • tools/data_source/encode_import_multi-species_sequence_analysis.xml

    r1091 r1101  
    11<tool id="encode_import_multi-species_sequence_analysis1" name="Multi-species Sequence Analysis"> 
    2   <command interpreter="python">encode_import.py $hg17,$hg16 $output</command> 
     2  <command interpreter="python">encode_import.py $hg17,$hg16 $output ${GALAXY_DATA_INDEX_DIR}</command> 
    33  <inputs> 
    44    <display> 
  • tools/data_source/encode_import_transcription_regulation.xml

    r1091 r1101  
    11<tool id="encode_import_transcription_regulation1" name="Transcription Regulation"> 
    2   <command interpreter="python">encode_import.py $hg17,$hg16 $output</command> 
     2  <command interpreter="python">encode_import.py $hg17,$hg16 $output ${GALAXY_DATA_INDEX_DIR}</command> 
    33  <inputs> 
    44    <display> 
  • tools/data_source/microbial_import.py

    r1091 r1101  
    2525available_files = {} 
    2626try: 
    27     filename = "%s/microbial_data.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
     27    filename = sys.argv[9] 
    2828    for i, line in enumerate( file( filename ) ): 
    2929        if not line or line[0:1] == "#" : continue 
  • tools/data_source/microbial_import.xml

    r1091 r1101  
    11<tool id="microbial_import1" name="Get Microbial Data"> 
    2   <command interpreter="python">microbial_import.py $CDS,$tRNA,$rRNA,$sequence,$GeneMark,$GeneMarkHMM,$Glimmer3 $output</command> 
     2  <command interpreter="python">microbial_import.py $CDS,$tRNA,$rRNA,$sequence,$GeneMark,$GeneMarkHMM,$Glimmer3 $output ${GALAXY_DATA_INDEX_DIR}/microbial_data.loc</command> 
    33  <inputs> 
    44    <page> 
  • tools/data_source/microbial_import_code.py

    r1091 r1101  
    11 
    2 def load_microbial_data( sep='\t' ): 
     2def load_microbial_data( GALAXY_INDEX_DATA_DIR, sep='\t' ): 
    33    # FIXME: this function is duplicated in the DynamicOptions class.  It is used here only to 
    44    # set data.name in exec_after_process().  
     
    66    orgs = {} 
    77     
    8     filename = "%s/microbial_data.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
     8    filename = "%s/microbial_data.loc" % GALAXY_DATA_INDEX_DIR 
    99    for i, line in enumerate( file( filename ) ): 
    1010        line = line.rstrip( '\r\n' ) 
     
    9797        print "Parameters are not available." 
    9898     
    99     microbe_info = load_microbial_data(
     99    microbe_info = load_microbial_data( param_dict.get( 'GALAXY_INDEX_DATA_DIR' ), sep='\t'
    100100    new_stdout = "" 
    101101    split_stdout = stdout.split("\n") 
  • tools/encode/random_intervals.xml

    r1091 r1101  
    11<tool id="random_intervals1" name="Random Intervals"> 
    22<description>create a random set of intervals</description> 
    3   <command interpreter="python2.4">random_intervals_no_bits.py $regions $input2 $input1 $out_file1 $input2_chromCol $input2_startCol $input2_endCol $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol $use_mask $strand_overlaps</command> 
     3  <command interpreter="python2.4">random_intervals_no_bits.py $regions $input2 $input1 $out_file1 $input2_chromCol $input2_startCol $input2_endCol $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol $use_mask $strand_overlaps ${GALAXY_DATA_INDEX_DIR}</command> 
    44  <inputs> 
    55    <param name="input1" type="data" format="interval" label="File to Mimick"> 
  • tools/encode/random_intervals_no_bits.py

    r1091 r1101  
    107107        overlaps = sys.argv[12] 
    108108    available_regions = {} 
    109     loc_file = "%s/regions.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
     109    loc_file = "%s/regions.loc" % sys.argv[-1] 
    110110     
    111111    for i, line in enumerate( file( loc_file ) ): 
  • tools/extract/extract_genomic_dna.py

    r1091 r1101  
    11#!/usr/bin/env python2.4 
    22""" 
    3 usage: extract_genomic_dna.py $input $out_file1 $input_chromCol $input_startCol $input_endCol $input_strandCol $dbkey $out_format 
     3usage: extract_genomic_dna.py $input $out_file1 $input_chromCol $input_startCol $input_endCol $input_strandCol $dbkey $out_format GALAXY_DATA_INDEX_DIR 
    44by Wen-Yu Chung 
    55""" 
     
    1010import bx.seq.nib 
    1111import bx.seq.twobit 
    12  
    13 nib_file = "%s/alignseq.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
    14 twobit_file = "%s/twobit.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
    1512 
    1613def stop_err( msg ): 
     
    2623    return "".join( reversed_s ) 
    2724 
    28 def check_nib_file( dbkey ): 
     25def check_nib_file( dbkey, GALAXY_DATA_INDEX_DIR ): 
     26    nib_file = "%s/alignseq.loc" % GALAXY_DATA_INDEX_DIR 
    2927    nib_path = '' 
    3028    nibs = {} 
     
    4139    return nib_path 
    4240 
    43 def check_twobit_file( dbkey ): 
     41def check_twobit_file( dbkey, GALAXY_DATA_INDEX_DIR ): 
     42    twobit_file = "%s/twobit.loc" % GALAXY_DATA_INDEX_DIR 
    4443    twobit_path = '' 
    4544    twobits = {} 
     
    8180    dbkey = sys.argv[7] 
    8281    output_format = sys.argv[8] 
     82    GALAXY_DATA_INDEX_DIR = sys.argv[9] 
    8383    nibs = {} 
    8484    twobits = {} 
    85     nib_path = check_nib_file( dbkey
    86     twobit_path = check_twobit_file( dbkey
     85    nib_path = check_nib_file( dbkey, GALAXY_DATA_INDEX_DIR
     86    twobit_path = check_twobit_file( dbkey, GALAXY_DATA_INDEX_DIR
    8787    if not os.path.exists( nib_path ) and not os.path.exists( twobit_path ): 
    8888        # If this occurs, we need to fix the metadata validator. 
  • tools/extract/extract_genomic_dna.xml

    r1091 r1101  
    11<tool id="Extract genomic DNA 1" name="Extract Genomic DNA" version="2.0.0"> 
    22  <description>using coordinates from assembled/unassebmled genomes</description> 
    3   <command interpreter="python">extract_genomic_dna.py $input $out_file1 $input_chromCol $input_startCol $input_endCol $input_strandCol $dbkey $out_format</command> 
     3  <command interpreter="python">extract_genomic_dna.py $input $out_file1 $input_chromCol $input_startCol $input_endCol $input_strandCol $dbkey $out_format ${GALAXY_DATA_INDEX_DIR}</command> 
    44  <inputs> 
    55    <param format="interval" name="input" type="data" label="Fetch sequences corresponding to Query"> 
    66      <validator type="unspecified_build" /> 
    7       <validator type="dataset_metadata_in_file" filename="alignseq.loc" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." split=" " line_startswith="seq" /> 
     7      <validator type="dataset_metadata_in_file" filename="/depot/data2/galaxy/alignseq.loc" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." split=" " line_startswith="seq" /> 
    88    </param> 
    99        <param name="out_format" type="select" label="Output data type"> 
  • tools/filters/axt_to_lav.xml

    r1091 r1101  
    11<tool id="axt_to_lav_1" name="AXT to LAV"> 
    22  <description>Converts an AXT formated file to LAV format</description> 
    3   <!--  <command interpreter="python2.4">axt_to_lav.py $align_input $dbkey_1 $dbkey_2 $lav_file $seq_file1 $seq_file2</command> --> 
    43  <command interpreter="python2.4">axt_to_lav.py ${GALAXY_DATA_INDEX_DIR}/$dbkey_1/seq/%s.nib:$dbkey_1:./static/ucsc/chrom/${dbkey_1}.len ${GALAXY_DATA_INDEX_DIR}/$dbkey_2/seq/%s.nib:$dbkey_2:./static/ucsc/chrom/${dbkey_2}.len $align_input $lav_file $seq_file1 $seq_file2</command> 
    54  <inputs> 
  • tools/maf/genebed_maf_to_fasta.xml

    r1091 r1101  
    11<tool id="GeneBed_Maf_Fasta2" name="Stitch Gene blocks"> 
    22  <description>given a set of coding exon intervals</description> 
    3   <command interpreter="python2.4">#if $maf_source_type.maf_source == "user":#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_file --interval_file=$input1 --output_file=$out_file1 --mafSourceType=$maf_source_type.maf_source --geneBED 
    4 #else:#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_identifier --interval_file=$input1 --output_file=$out_file1 --mafSourceType=$maf_source_type.maf_source  --geneBED 
     3  <command interpreter="python2.4">#if $maf_source_type.maf_source == "user":#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_file --interval_file=$input1 --output_file=$out_file1 --mafSourceType=$maf_source_type.maf_source --geneBED --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} 
     4#else:#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_identifier --interval_file=$input1 --output_file=$out_file1 --mafSourceType=$maf_source_type.maf_source  --geneBED --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} 
    55#end if 
    66  </command> 
  • tools/maf/interval2maf.py

    r1012 r1101  
    2121   -p, --species=p: Species to include in output 
    2222   -l, --indexLocation=l: Override default maf_index.loc file 
     23   -z, --mafIndexFile=z: Directory of local maf index file ( maf_index.loc or maf_pairwise.loc ) 
    2324""" 
    2425 
     
    8586            index = maf_utilities.maf_index_by_uid( options.mafType, options.indexLocation ) 
    8687        else: 
    87             index = maf_utilities.maf_index_by_uid( options.mafType
     88            index = maf_utilities.maf_index_by_uid( options.mafType, options.mafIndexFile
    8889        if index is None: 
    8990            print >> sys.stderr, "The MAF source specified (%s) appears to be invalid." % ( options.mafType ) 
  • tools/maf/interval2maf.xml

    r1091 r1101  
    22  <description>given a set of genomic intervals</description> 
    33  <command interpreter="python2.4"> 
    4     #if $maf_source_type.maf_source == "user":#interval2maf.py --dbkey=$input1_dbkey --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafFile=$maf_source_type.mafFile --interval_file=$input1 --output_file=$out_file1 
    5     #else:#interval2maf.py --dbkey=$input1_dbkey --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafType=$maf_source_type.mafType --interval_file=$input1 --output_file=$out_file1 
     4    #if $maf_source_type.maf_source == "user":#interval2maf.py --dbkey=$input1_dbkey --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafFile=$maf_source_type.mafFile --interval_file=$input1 --output_file=$out_file1 --mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc 
     5    #else:#interval2maf.py --dbkey=$input1_dbkey --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafType=$maf_source_type.mafType --interval_file=$input1 --output_file=$out_file1 --mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc 
    66    #end if 
    77  </command> 
  • tools/maf/interval_maf_to_merged_fasta.py

    r1025 r1101  
    1919   -o, --output_file=o:      Output MAF file 
    2020   -p, --species=p: Species to include in output 
     21   -z, --mafIndexFileDir=z: Directory of local maf_index.loc file 
    2122 
    22 usage: %prog dbkey_of_BED comma_separated_list_of_additional_dbkeys_to_extract comma_separated_list_of_indexed_maf_files input_gene_bed_file output_fasta_file cached|user 
     23usage: %prog dbkey_of_BED comma_separated_list_of_additional_dbkeys_to_extract comma_separated_list_of_indexed_maf_files input_gene_bed_file output_fasta_file cached|user GALAXY_DATA_INDEX_DIR 
    2324""" 
    2425 
     
    8384            print >>sys.stderr, "Strand column has not been specified." 
    8485            sys.exit() 
     86    mafIndexFile = "%s/maf_index.loc" % options.mafIndexFileDir 
    8587    #Finish parsing command line 
    8688         
     
    8991    #using specified uid for locally cached 
    9092    if options.mafSourceType.lower() in ["cached"]: 
    91         index = maf_utilities.maf_index_by_uid( options.mafSource
     93        index = maf_utilities.maf_index_by_uid( options.mafSource, mafIndexFile
    9294        if index is None: 
    9395            print >> sys.stderr, "The MAF source specified (%s) appears to be invalid." % ( options.mafSource ) 
  • tools/maf/interval_maf_to_merged_fasta.xml

    r1091 r1101  
    11<tool id="Interval_Maf_Merged_Fasta2" name="Stitch MAF blocks"> 
    22  <description>given a set of genomic intervals</description> 
    3   <command interpreter="python2.4">#if $maf_source_type.maf_source == "user":#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_file --interval_file=$input1 --output_file=$out_file1 --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafSourceType=$maf_source_type.maf_source 
    4 #else:#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_identifier --interval_file=$input1 --output_file=$out_file1 --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafSourceType=$maf_source_type.maf_source 
     3  <command interpreter="python2.4">#if $maf_source_type.maf_source == "user":#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_file --interval_file=$input1 --output_file=$out_file1 --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafSourceType=$maf_source_type.maf_source --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} 
     4#else:#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_identifier --interval_file=$input1 --output_file=$out_file1 --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafSourceType=$maf_source_type.maf_source --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} 
    55#end if 
    66  </command> 
  • tools/maf/maf_stats.py

    r1012 r1101  
    2727    if summary.lower() == "true": summary = True 
    2828    else: summary = False 
    29      
     29 
     30    mafIndexFile = "%s/maf_index.loc" % sys.argv[9] 
    3031    index = index_filename = None 
    3132    if maf_source_type == "user": 
     
    3738    elif maf_source_type == "cached": 
    3839        #access existing indexes 
    39         index = maf_utilities.maf_index_by_uid( input_maf_filename
     40        index = maf_utilities.maf_index_by_uid( input_maf_filename, mafIndexFile
    4041        if index is None: 
    4142            print >> sys.stderr, "The MAF source specified (%s) appears to be invalid." % ( input_maf_filename ) 
  • tools/maf/maf_stats.xml

    r1091 r1101  
    88      $maf_source_type.maf_source $maf_source_type.mafType $input1 $out_file1 $dbkey $input1_chromCol $input1_startCol $input1_endCol $summary 
    99    #end if 
     10    ${GALAXY_DATA_INDEX_DIR} 
    1011  </command> 
    1112  <inputs> 
  • tools/maf/maf_stats_code.py

    r1091 r1101  
    11import os 
    22 
    3 def load_maf_data( sep='\t' ): 
     3def load_maf_data( GALAXY_DATA_INDEX_DIR, sep='\t' ): 
    44    # FIXME: this function is duplicated in the DynamicOptions class.  It is used here only to 
    55    # set data.name in exec_before_job().  
    66    maf_sets = {} 
    7     filename = "%s/maf_index.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
     7    filename = "%s/maf_index.loc" % GALAXY_DATA_INDEX_DIR 
    88    for i, line in enumerate( file( filename ) ): 
    99        line = line.rstrip( '\r\n' ) 
     
    2828    return maf_sets 
    2929def exec_before_job(app, inp_data, out_data, param_dict, tool): 
    30     maf_sets = load_maf_data(
     30    maf_sets = load_maf_data( app.config.tool_data_path, sep='\t' 
    3131    if param_dict[ 'maf_source_type' ][ 'maf_source' ] == "cached": 
    3232        for name, data in out_data.items(): 
  • tools/metag_tools/blat_wrapper.py

    r1091 r1101  
    33import os, sys, tempfile 
    44 
    5 nib_file = "%s/alignseq.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
    6 twobit_file = "/%s/twobit.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
    7  
    8 def check_nib_file( dbkey ): 
     5def check_nib_file( dbkey, GALAXY_DATA_INDEX_DIR ): 
     6    nib_file = "%s/alignseq.loc" % GALAXY_DATA_INDEX_DIR 
    97    nib_path = '' 
    108    nibs = {} 
     
    2119    return nib_path 
    2220 
    23 def check_twobit_file( dbkey ): 
     21def check_twobit_file( dbkey, GALAXY_DATA_INDEX_DIR ): 
     22    twobit_file = "%s/twobit.loc" % GALAXY_DATA_INDEX_DIR 
    2423    twobit_path = '' 
    2524    twobits = {} 
     
    4443    tile_size = sys.argv[6] 
    4544    one_off = sys.argv[7] 
    46      
     45    GALAXY_DATA_INDEX_DIR = sys.argv[8] 
     46 
    4747    all_files = [] 
    4848    if (source_format == '0'): 
     
    5252            print >> sys.stdout, "No genome build specified. please check your dataset." 
    5353            sys.exit() 
    54         nib_path = check_nib_file( dbkey
    55         twobit_path = check_twobit_file( dbkey
     54        nib_path = check_nib_file( dbkey, GALAXY_DATA_INDEX_DIR
     55        twobit_path = check_twobit_file( dbkey, GALAXY_DATA_INDEX_DIR
    5656        if not os.path.exists( nib_path ) and not os.path.exists( twobit_path ): 
    5757            print >> sys.stdout, "No sequences are available for %s, request them by reporting this error." % dbkey 
  • tools/metag_tools/blat_wrapper.xml

    r1012 r1101  
    11<tool id="blat_wrapper" name="Run Sequence Alignment" version="1.0.0"> 
    2         <description>on short reads against genome builds</description> 
    3         <command interpreter="python"> 
    4         #if $source.source_select=="database":#blat_wrapper.py 0 $source.dbkey $input_query $output1 $iden $tile_size $one_off 
    5         #else:#blat_wrapper.py 1 $source.input_target $input_query $output1 $iden $tile_size $one_off 
    6         #end if 
    7         </command> 
     2  <description>on short reads against genome builds</description> 
     3  <command interpreter="python"> 
     4    #if $source.source_select=="database":#blat_wrapper.py 0 $source.dbkey $input_query $output1 $iden $tile_size $one_off 
     5    #else:#blat_wrapper.py 1 $source.input_target $input_query $output1 $iden $tile_size $one_off 
     6    #end if 
     7    ${GALAXY_DATA_INDEX_DIR} 
     8  </command> 
    89        <inputs> 
    910        <conditional name="source"> 
  • tools/metag_tools/megablast_wrapper.py

    r1098 r1101  
    66import sys, os, tempfile, subprocess 
    77#from megablast_xml_parser import * 
    8  
    9 DB_LOC = "%s/blastdb.loc" % os.environ.get( 'GALAXY_DATA_INDEX_DIR' ) 
    108 
    119def __main__(): 
     
    2119    mega_disc_type = sys.argv[7]        # -N 
    2220    mega_filter = sys.argv[8]           # -F 
    23      
     21    GALAXY_DATA_INDEX_DIR = sys.argv[9] 
     22    DB_LOC = "%s/blastdb.loc" % GALAXY_DATA_INDEX_DIR 
    2423    output_file = open(output_filename, 'w') 
    2524     
  • tools/metag_tools/megablast_wrapper.xml

    r1099 r1101  
    11<tool id="megablast_wrapper" name="Megablast" version="2.0.0"> 
    22        <description>for Metagenomics Projects</description> 
    3         <command interpreter="python">megablast_wrapper.py $source_select $input_query $output1 $word_size $iden_cutoff $disc_word $disc_type $filter_query</command> 
     3        <command interpreter="python">megablast_wrapper.py $source_select $input_query $output1 $word_size $iden_cutoff $disc_word $disc_type $filter_query ${GALAXY_DATA_INDEX_DIR}</command> 
    44        <inputs> 
    55                <param name="input_query" type="data" format="fasta" label="Query Sequence"/> 
  • universe_wsgi.ini.sample

    r1021 r1101  
    4949tool_config_file = tool_conf.xml 
    5050tool_path = tools 
     51tool_data_path = tool-data 
    5152 
    5253# Datatype converters