8 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b10faa0d47f1/ Changeset: b10faa0d47f1 User: natefoo Date: 2014-07-27 08:48:40 Summary: Remove additional pieces from old genome index system. Affected #: 14 files
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 buildbot_setup.sh --- a/buildbot_setup.sh +++ b/buildbot_setup.sh @@ -52,12 +52,9 @@ migrated_tools_conf.xml.sample data_manager_conf.xml.sample shed_data_manager_conf.xml.sample -tool-data/shared/ensembl/builds.txt.sample tool-data/shared/igv/igv_build_sites.txt.sample -tool-data/shared/ncbi/builds.txt.sample tool-data/shared/rviewer/rviewer_build_sites.txt.sample tool-data/shared/ucsc/builds.txt.sample -tool-data/shared/ucsc/publicbuilds.txt.sample tool-data/shared/ucsc/ucsc_build_sites.txt.sample "
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 cron/get_ensembl.py --- a/cron/get_ensembl.py +++ /dev/null @@ -1,23 +0,0 @@ -from galaxy import eggs -import pkg_resources -pkg_resources.require("SQLAlchemy >= 0.4") -pkg_resources.require("MySQL_python") -from sqlalchemy import * - - -engine = create_engine( 'mysql://anonymous@ensembldb.ensembl.org:5306', pool_recycle=3600 ) -conn = engine.connect() -dbs = conn.execute( "SHOW DATABASES LIKE 'ensembl_website_%%'" ) -builds = {} -lines = [] -for res in dbs: - dbname = res[0] - release = dbname.split('_')[-1] - genomes = conn.execute( "SELECT RS.assembly_code, S.name, S.common_name, %s FROM ensembl_website_%s.release_species RS LEFT JOIN ensembl_website_%s.species S on RS.species_id = S.species_id" % ( release, release, release ) ) - for genome in genomes: - builds[genome[0]] = dict( release=genome[3], species='%s (%s/%s)' % ( genome[1], genome[2], genome[0] ) ) -for build in builds.items(): - if build[0]: - lines.append( '\t'.join( [ build[0], '%d' % build[1]['release'], build[1]['species'] ] ) ) - -print '\n'.join( lines )
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 cron/get_ncbi.py --- a/cron/get_ncbi.py +++ /dev/null @@ -1,93 +0,0 @@ -import urllib, pkg_resources, os -pkg_resources.require( 'elementtree' ) -from elementtree import ElementTree, ElementInclude -from xml.parsers.expat import ExpatError as XMLParseErrorThing -import sys - -import pkg_resources - -class GetListing: - def __init__( self, data ): - self.tree = ElementTree.parse( data ) - self.root = self.tree.getroot() - ElementInclude.include(self.root) - - def xml_text(self, name=None): - """Returns the text inside an element""" - root = self.root - if name is not None: - # Try attribute first - val = root.get(name) - if val: - return val - # Then try as element - elem = root.find(name) - else: - elem = root - if elem is not None and elem.text: - text = ''.join(elem.text.splitlines()) - return text.strip() - # No luck, return empty string - return '' - -def dlcachefile( webenv, querykey, i, results ): - url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=nuccore&use...]' - fp = urllib.urlopen( url ) - search = GetListing( fp ) - fp.close() - webenv = search.xml_text( 'WebEnv' ) - querykey = search.xml_text( 'QueryKey' ) - url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=nuccore&We...' % ( webenv, querykey, i, results ) - fp = urllib.urlopen( url ) - cachefile = os.tmpfile() - for line in fp: - cachefile.write( line ) - fp.close() - cachefile.flush() - cachefile.seek(0) - return cachefile - - -url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=nuccore&use...]' -fp = urllib.urlopen( url ) -results = GetListing( fp ) -fp.close() - -webenv = results.xml_text( 'WebEnv' ) -querykey = results.xml_text( 'QueryKey' ) -counts = int( results.xml_text( 'Count' ) ) -results = 10000 -found = 0 - -for i in range(0, counts + results, results): - rets = dict() - cache = dlcachefile( webenv, querykey, i, results ) - try: - xmldoc = GetListing( cache ) - except (IOError, XMLParseErrorThing): - cache = dlcachefile( webenv, querykey, i, results ) - try: - xmldoc = GetListing( cache ) - except (IOError, XMLParseErrorThing): - cache.close() - exit() - pass - finally: - cache.close() - entries = xmldoc.root.findall( 'DocSum' ) - for entry in entries: - dbkey = None - children = entry.findall('Item') - for item in children: - rets[ item.get('Name') ] = item.text - if not rets['Caption'].startswith('NC_'): - continue - - for ret in rets['Extra'].split('|'): - if not ret.startswith('NC_'): - continue - else: - dbkey = ret - break - if dbkey is not None: - print '\t'.join( [ dbkey, rets['Title'] ] )
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 cron/parse_publicbuilds.py --- a/cron/parse_publicbuilds.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python - -""" -Connects to the URL specified and outputs builds available at that -DSN in tabular format. USCS Test gateway is used as default. -build description -""" - -import sys -import urllib -if sys.version_info[:2] >= ( 2, 5 ): - import xml.etree.ElementTree as ElementTree -else: - from galaxy import eggs - import pkg_resources; pkg_resources.require( "elementtree" ) - from elementtree import ElementTree - -URL = "http://genome.cse.ucsc.edu/cgi-bin/das/dsn" - -def getbuilds(url): - try: - page = urllib.urlopen(URL) - except: - print "#Unable to open " + URL - print "?\tunspecified (?)" - sys.exit(1) - - text = page.read() - try: - tree = ElementTree.fromstring(text) - except: - print "#Invalid xml passed back from " + URL - print "?\tunspecified (?)" - sys.exit(1) - - print "#Harvested from http://genome.cse.ucsc.edu/cgi-bin/das/dsn" - print "?\tunspecified (?)" - for dsn in tree: - build = dsn.find("SOURCE").attrib['id'] - description = dsn.find("DESCRIPTION").text.replace(" - Genome at UCSC","").replace(" Genome at UCSC","") - - fields = description.split(" ") - temp = fields[0] - for i in range(len(fields)-1): - if temp == fields[i+1]: - fields.pop(i+1) - else: - temp = fields[i+1] - description = " ".join(fields) - yield [build,description] - -if __name__ == "__main__": - if len(sys.argv) > 1: - URL = sys.argv[1] - for build in getbuilds(URL): - print build[0]+"\t"+build[1]+" ("+build[0]+")" -
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 cron/updateensembl.sh.sample --- a/cron/updateensembl.sh.sample +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# -# Script to update Ensembl shared data tables. The idea is to update, but if -# the update fails, not replace current data/tables with error -# messages. - -# Edit this line to refer to galaxy's path: -GALAXY=/path/to/galaxy -PYTHONPATH=${GALAXY}/lib -export PYTHONPATH - -# setup directories -echo "Creating required directories." -DIRS=" -${GALAXY}/tool-data/shared/ensembl -${GALAXY}/tool-data/shared/ensembl/new -" -for dir in $DIRS; do - if [ ! -d $dir ]; then - echo "Creating $dir" - mkdir $dir - else - echo "$dir already exists, continuing." - fi -done - -date -echo "Updating Ensembl shared data tables." - -# Try to build "builds.txt" -echo "Updating builds.txt" -python ${GALAXY}/cron/get_ensembl.py > ${GALAXY}/tool-data/shared/ensembl/new/builds.txt -if [ $? -eq 0 ] -then - diff ${GALAXY}/tool-data/shared/ensembl/new/builds.txt ${GALAXY}/tool-data/shared/ensembl/builds.txt > /dev/null 2>&1 - if [ $? -ne 0 ] - then - cp -f ${GALAXY}/tool-data/shared/ensembl/new/builds.txt ${GALAXY}/tool-data/shared/ensembl/builds.txt - fi -else - echo "Failed to update builds.txt" >&2 -fi
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 cron/updatencbi.sh.sample --- a/cron/updatencbi.sh.sample +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# -# Script to update NCBI shared data tables. The idea is to update, but if -# the update fails, not replace current data/tables with error -# messages. - -# Edit this line to refer to galaxy's path: -GALAXY=/path/to/galaxy -PYTHONPATH=${GALAXY}/lib -export PYTHONPATH - -# setup directories -echo "Creating required directories." -DIRS=" -${GALAXY}/tool-data/shared/ncbi -${GALAXY}/tool-data/shared/ncbi/new -" -for dir in $DIRS; do - if [ ! -d $dir ]; then - echo "Creating $dir" - mkdir $dir - else - echo "$dir already exists, continuing." - fi -done - -date -echo "Updating NCBI shared data tables." - -# Try to build "builds.txt" -echo "Updating builds.txt" -python ${GALAXY}/cron/get_ncbi.py > ${GALAXY}/tool-data/shared/ncbi/new/builds.txt -if [ $? -eq 0 ] -then - diff ${GALAXY}/tool-data/shared/ncbi/new/builds.txt ${GALAXY}/tool-data/shared/ncbi/builds.txt > /dev/null 2>&1 - if [ $? -ne 0 ] - then - cp -f ${GALAXY}/tool-data/shared/ncbi/new/builds.txt ${GALAXY}/tool-data/shared/ncbi/builds.txt - fi -else - echo "Failed to update builds.txt" >&2 -fi
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 cron/updateucsc.sh.sample --- a/cron/updateucsc.sh.sample +++ b/cron/updateucsc.sh.sample @@ -28,20 +28,6 @@ date echo "Updating UCSC shared data tables."
-# Try to build "publicbuilds.txt" -echo "Updating publicbuilds.txt" -python ${GALAXY}/cron/parse_publicbuilds.py > ${GALAXY}/tool-data/shared/ucsc/new/publicbuilds.txt -if [ $? -eq 0 ] -then - diff ${GALAXY}/tool-data/shared/ucsc/new/publicbuilds.txt ${GALAXY}/tool-data/shared/ucsc/publicbuilds.txt > /dev/null 2>&1 - if [ $? -ne 0 ] - then - cp -f ${GALAXY}/tool-data/shared/ucsc/new/publicbuilds.txt ${GALAXY}/tool-data/shared/ucsc/publicbuilds.txt - fi -else - echo "Failed to update publicbuilds.txt" >&2 -fi - # Try to build "builds.txt" echo "Updating builds.txt" python ${GALAXY}/cron/parse_builds.py > ${GALAXY}/tool-data/shared/ucsc/new/builds.txt
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 doc/Makefile --- a/doc/Makefile +++ b/doc/Makefile @@ -17,22 +17,9 @@ # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
-# Galaxy Local variables - -TOOLDATASHAREDDIR = ../tool-data/shared -TOOLDATABUILDFILES = $(TOOLDATASHAREDDIR)/ensembl/builds.txt \ - $(TOOLDATASHAREDDIR)/ncbi/builds.txt \ - $(TOOLDATASHAREDDIR)/ucsc/publicbuilds.txt - .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext updaterst
-# Sphinx wants the build files to be there; Copy the sample files into -# place if we don't already have the build files. -$(TOOLDATABUILDFILES) : - /bin/cp $@.sample $@ - - help: @echo "Please use `make <target>' where <target> is one of" @echo " html to make standalone HTML files"
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 lib/galaxy/util/__init__.py --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -842,39 +842,6 @@ return db_names
-def read_ensembl( filename, ucsc ): - """ Read Ensembl build names from file """ - ucsc_builds = [] - for build in ucsc: - ucsc_builds.append( build[0] ) - ensembl_builds = list() - try: - for line in open( filename ): - if line[0:1] in [ '#', '\t' ]: - continue - fields = line.replace("\r", "").replace("\n", "").split("\t") - if fields[0] in ucsc_builds: - continue - ensembl_builds.append( dict( dbkey=fields[0], release=fields[1], name=fields[2].replace( '_', ' ' ) ) ) - except Exception, e: - print "ERROR: Unable to read builds file:", e - return ensembl_builds - - -def read_ncbi( filename ): - """ Read NCBI build names from file """ - ncbi_builds = list() - try: - for line in open( filename ): - if line[0:1] in [ '#', '\t' ]: - continue - fields = line.replace("\r", "").replace("\n", "").split("\t") - ncbi_builds.append( dict( dbkey=fields[0], name=fields[1] ) ) - except Exception, e: - print "ERROR: Unable to read builds file:", e - return ncbi_builds - - def read_build_sites( filename, check_builds=True ): """ read db names to ucsc mappings from file, this file should probably be merged with the one above """ build_sites = [] @@ -1161,12 +1128,8 @@
# The dbnames list is used in edit attributes and the upload tool dbnames = read_dbnames( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "builds.txt" ) ) -ucsc_names = read_dbnames( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "publicbuilds.txt" ) ) -ensembl_names = read_ensembl( os.path.join( galaxy_root_path, "tool-data", "shared", "ensembl", "builds.txt" ), ucsc_names ) -ncbi_names = read_ncbi( os.path.join( galaxy_root_path, "tool-data", "shared", "ncbi", "builds.txt" ) ) ucsc_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "ucsc_build_sites.txt" ) ) gbrowse_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "gbrowse", "gbrowse_build_sites.txt" ) ) -dlnames = dict(ucsc=ucsc_names, ensembl=ensembl_names, ncbi=ncbi_names)
def galaxy_directory():
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py +++ b/lib/galaxy/web/framework/__init__.py @@ -1260,18 +1260,6 @@ return self.app.genome_builds.get_genome_build_names( trans=self )
@property - def ucsc_builds( self ): - return util.dlnames['ucsc'] - - @property - def ensembl_builds( self ): - return util.dlnames['ensembl'] - - @property - def ncbi_builds( self ): - return util.dlnames['ncbi'] - - @property def user_ftp_dir( self ): identifier = self.app.config.ftp_upload_dir_identifier return os.path.join( self.app.config.ftp_upload_dir, getattr(self.user, identifier) )
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 scripts/common_startup.sh --- a/scripts/common_startup.sh +++ b/scripts/common_startup.sh @@ -26,10 +26,7 @@ job_metrics_conf.xml.sample universe_wsgi.ini.sample lib/tool_shed/scripts/bootstrap_tool_shed/user_info.xml.sample - tool-data/shared/ncbi/builds.txt.sample - tool-data/shared/ensembl/builds.txt.sample tool-data/shared/ucsc/builds.txt.sample - tool-data/shared/ucsc/publicbuilds.txt.sample tool-data/shared/ucsc/ucsc_build_sites.txt.sample tool-data/shared/igv/igv_build_sites.txt.sample tool-data/shared/rviewer/rviewer_build_sites.txt.sample
diff -r 21d05dda71c74f673b94fcd7c1e34b27ec5e5040 -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 tool-data/shared/ensembl/builds.txt.sample --- a/tool-data/shared/ensembl/builds.txt.sample +++ /dev/null @@ -1,164 +0,0 @@ -MEDAKA1 67 Oryzias_latipes (Medaka/MEDAKA1) -Myoluc2.0 67 Myotis_lucifugus (Microbat/Myoluc2.0) -anoCar1 67 Anolis_carolinensis (Anole lizard/anoCar1) -WS220 67 Caenorhabditis_elegans (C.elegans/WS220) -WS180 67 Caenorhabditis_elegans (C.elegans/WS180) -MICROBAT1 67 Myotis_lucifugus (Microbat/MICROBAT1) -loxAfr3 67 Loxodonta_africana (Elephant/loxAfr3) -AgamP3 67 Anopheles_gambiae (Mosquito/AgamP3) -DROM3 67 Drosophila_melanogaster (Fly/DROM3) -LatCha1 67 Latimeria_chalumnae (Coelacanth/LatCha1) -vicPac1 67 Vicugna_pacos (Alpaca/vicPac1) -COMMON_SHREW1 67 Sorex_araneus (Shrew/COMMON_SHREW1) -MGSC3 67 Mus_musculus (Mouse/MGSC3) -MGSC1 67 Mus_musculus (Mouse/MGSC1) -JGI4.1 67 Xenopus_tropicalis (Xenopus/JGI4.1) -RGSC1 67 Rattus_norvegicus (Rat/RGSC1) -RGSC2 67 Rattus_norvegicus (Rat/RGSC2) -gadMor1 67 Gadus_morhua (Atlantic cod/gadMor1) -CSAV2.0 67 Ciona_savignyi (C.savignyi/CSAV2.0) -oryCun2 67 Oryctolagus_cuniculus (Rabbit/oryCun2) -ZFISH6 67 Danio_rerio (Zebrafish/ZFISH6) -ZFISH7 67 Danio_rerio (Zebrafish/ZFISH7) -ZFISH4 67 Danio_rerio (Zebrafish/ZFISH4) -ZFISH5 67 Danio_rerio (Zebrafish/ZFISH5) -ZFISH2 67 Danio_rerio (Zebrafish/ZFISH2) -ZFISH3 67 Danio_rerio (Zebrafish/ZFISH3) -MOZ2a 67 Anopheles_gambiae (Mosquito/MOZ2a) -EquCab2 67 Equus_caballus (Horse/EquCab2) -AMEL1.1 67 Apis_mellifera (Honeybee/AMEL1.1) -MMUL_1 67 Macaca_mulatta (Macaque/MMUL_1) -dasNov2 67 Dasypus_novemcinctus (Armadillo/dasNov2) -choHof1 67 Choloepus_hoffmanni (Sloth/choHof1) -lamPac1 50 Lama_pacos (Alpaca/lamPac1) -OANA5 67 Ornithorhynchus_anatinus (Platypus/OANA5) -CEL160 67 Caenorhabditis_elegans (C.elegans/CEL160) -WBcel215 67 Caenorhabditis_elegans (C.elegans/WBcel215) -gorGor3 67 Gorilla_gorilla (Gorilla/gorGor3) -SQUIRREL 67 Spermophilus_tridecemlineatus (Ground Squirrel/SQUIRREL) -gorGor1 67 Gorilla_gorilla (Gorilla/gorGor1) -pteVam1 67 Pteropus_vampyrus (Flying fox/pteVam1) -SGD1 67 Saccharomyces_cerevisiae (S.cerevisiae/SGD1) -micMur1 67 Microcebus_murinus (Mouse lemur/micMur1) -proCap1 67 Procavia_capensis (Rock hyrax/proCap1) -NCBIM30 67 Mus_musculus (Mouse/NCBIM30) -NCBIM33 67 Mus_musculus (Mouse/NCBIM33) -NCBIM32 67 Mus_musculus (Mouse/NCBIM32) -NCBIM35 67 Mus_musculus (Mouse/NCBIM35) -AaegL1 67 Aedes_aegypti (A.aegypti/AaegL1) -NCBIM37 67 Mus_musculus (Mouse/NCBIM37) -NCBIM36 67 Mus_musculus (Mouse/NCBIM36) -EF2 67 Saccharomyces_cerevisiae (S.cerevisiae/EF2) -EF3 67 Saccharomyces_cerevisiae (S.cerevisiae/EF3) -EF4 67 Saccharomyces_cerevisiae (S.cerevisiae/EF4) -BDGP5.4 67 Drosophila_melanogaster (Fly/BDGP5.4) -PPYG2 67 Pongo_abelii (Orangutan/PPYG2) -CEL150 67 Caenorhabditis_elegans (C.elegans/CEL150) -AMEL2.0 67 Apis_mellifera (Honeybee/AMEL2.0) -WASHUC1 67 Gallus_gallus (Chicken/WASHUC1) -WASHUC2 67 Gallus_gallus (Chicken/WASHUC2) -Btau_3.1 67 Bos_taurus (Cow/Btau_3.1) -gorGor3.1 67 Gorilla_gorilla (Gorilla/gorGor3.1) -CEL130 67 Caenorhabditis_elegans (C.elegans/CEL130) -Zv9 67 Danio_rerio (Zebrafish/Zv9) -BROADS1 67 Gasterosteus_aculeatus (Stickleback/BROADS1) -BROADD2 67 Canis_familiaris (Dog/BROADD2) -BROADD1 67 Canis_familiaris (Dog/BROADD1) -pika 67 Ochotona_princeps (Pika/pika) -ZFISH08 67 Danio_rerio (Zebrafish/ZFISH08) -ZFISH06 67 Danio_rerio (Zebrafish/ZFISH06) -calJac3 67 Callithrix_jacchus (Marmoset/calJac3) -CHIMP2.1.4 67 Pan_troglodytes (Chimp/CHIMP2.1.4) -JGI2 67 Ciona_intestinalis (C.intestinalis/JGI2) -JGI3 67 Xenopus_tropicalis (Xenopus/JGI3) -UCSC 67 Homo_sapiens (Human/UCSC) -Zv8 67 Danio_rerio (Zebrafish/Zv8) -JGI4 67 Xenopus_tropicalis (Xenopus/JGI4) -CEL140 67 Caenorhabditis_elegans (C.elegans/CEL140) -HEDGEHOG 67 Erinaceus_europaeus (Hedgehog/HEDGEHOG) -callJacc3 67 Callithrix_jacchus (Marmoset/callJacc3) -WS210 67 Caenorhabditis_elegans (C.elegans/WS210) -BDGP4 67 Drosophila_melanogaster (Fly/BDGP4) -BDGP5 67 Drosophila_melanogaster (Fly/BDGP5) -CHIMP1 67 Pan_troglodytes (Chimp/CHIMP1) -OtoGar3 67 Otolemur_garnettii (Bushbaby/OtoGar3) -MOZ2 67 Anopheles_gambiae (Mosquito/MOZ2) -FUGU4 67 Takifugu_rubripes (Fugu/FUGU4) -MOZ1 67 Anopheles_gambiae (Mosquito/MOZ1) -GUINEAPIG 67 Cavia_porcellus (Guinea Pig/GUINEAPIG) -BROADE1 67 Loxodonta_africana (Elephant/BROADE1) -RABBIT 67 Oryctolagus_cuniculus (Rabbit/RABBIT) -TETRAODON7 67 Tetraodon_nigroviridis (Tetraodon/TETRAODON7) -TETRAODON8 67 Tetraodon_nigroviridis (Tetraodon/TETRAODON8) -gorGor2 67 Gorilla_gorilla (Gorilla/gorGor2) -SGD1.01 67 Saccharomyces_cerevisiae (S.cerevisiae/SGD1.01) -ailMel1 67 Ailuropoda_melanoleuca (Panda/ailMel1) -Sscrofa9 67 Sus_scrofa (Pig/Sscrofa9) -cavPor3 67 Cavia_porcellus (Guinea Pig/cavPor3) -Orenil1.0 67 Oreochromis_niloticus (Nile tilapia/Orenil1.0) -BDGP4.2 67 Drosophila_melanogaster (Fly/BDGP4.2) -BDGP4.3 67 Drosophila_melanogaster (Fly/BDGP4.3) -Petromyzon_marin 64 Petromyzon_marinus (Lamprey/Petromyzon_marin) -RGSC3.4 67 Rattus_norvegicus (Rat/RGSC3.4) -Pmarinus_7.0 67 Petromyzon_marinus (Lamprey/Pmarinus_7.0) -RGSC3.1 67 Rattus_norvegicus (Rat/RGSC3.1) -BDGP5.25 67 Drosophila_melanogaster (Fly/BDGP5.25) -ARMA 67 Dasypus_novemcinctus (Armadillo/ARMA) -CINT1.95 67 Ciona_intestinalis (C.intestinalis/CINT1.95) -Btau_1.0 67 Bos_taurus (Cow/Btau_1.0) -JGI_4.2 67 Xenopus_tropicalis (Xenopus/JGI_4.2) -CEL116 67 Caenorhabditis_elegans (C.elegans/CEL116) -BUSHBABY1 67 Otolemur_garnettii (Bushbaby/BUSHBABY1) -Sscrofa10.2 67 Sus_scrofa (Pig/Sscrofa10.2) -BDGP3.2.1 67 Drosophila_melanogaster (Fly/BDGP3.2.1) -taeGut3.2.4 67 Taeniopygia_guttata (Zebra finch/taeGut3.2.4) -KH 67 Ciona_intestinalis (C.intestinalis/KH) -JGI4_1 67 Xenopus_tropicalis (Xenopus/JGI4_1) -spetri2 67 Spermophilus_tridecemlineatus (Ground Squirrel/spetri2) -Btau_4.0 67 Bos_taurus (Cow/Btau_4.0) -UMD2 67 Meleagris_gallopavo (Turkey/UMD2) -NCBI28 67 Homo_sapiens (Human/NCBI28) -NCBI29 67 Homo_sapiens (Human/NCBI29) -Btau_2.0 67 Bos_taurus (Cow/Btau_2.0) -NCBI26 67 Homo_sapiens (Human/NCBI26) -CAT 67 Felis_catus (Cat/CAT) -TENREC 67 Echinops_telfairi (Tenrec/TENREC) -WS200 67 Caenorhabditis_elegans (C.elegans/WS200) -AnoCar1.0 67 Anolis_carolinensis (Anole lizard/AnoCar1.0) -Nleu1.0 67 Nomascus_leucogenys (Gibbon/Nleu1.0) -Meug_1.0 67 Macropus_eugenii (Wallaby/Meug_1.0) -C_jacchus3.2.1 67 Callithrix_jacchus (Marmoset/C_jacchus3.2.1) -CHIMP2.1 67 Pan_troglodytes (Chimp/CHIMP2.1) -WS190 67 Caenorhabditis_elegans (C.elegans/WS190) -dipOrd1 67 Dipodomys_ordii (Kangaroo rat/dipOrd1) -AnoCar2.0 67 Anolis_carolinensis (Anole lizard/AnoCar2.0) -ACME0.1 67 None (None/ACME0.1) -CEL95 67 Caenorhabditis_elegans (C.elegans/CEL95) -CEL93 67 Caenorhabditis_elegans (C.elegans/CEL93) -DEVIL7.0 67 Sarcophilus_harrisii (Tasmanian Devil/DEVIL7.0) -CEL98 67 Caenorhabditis_elegans (C.elegans/CEL98) -CEL102 67 Caenorhabditis_elegans (C.elegans/CEL102) -TREESHREW 67 Tupaia_belangeri (Tree Shrew/TREESHREW) -NCBI31 67 Homo_sapiens (Human/NCBI31) -NCBI30 67 Homo_sapiens (Human/NCBI30) -NCBI33 67 Homo_sapiens (Human/NCBI33) -NCBI35 67 Homo_sapiens (Human/NCBI35) -NCBI34 67 Homo_sapiens (Human/NCBI34) -turTru1 67 Tursiops_truncatus (Bottlenose dolphin/turTru1) -NCBI36 67 Homo_sapiens (Human/NCBI36) -UMD3.1 67 Bos_taurus (Cow/UMD3.1) -speTri1 67 Spermophilus_tridecemlineatus (Ground Squirrel/speTri1) -GRCh37 67 Homo_sapiens (Human/GRCh37) -CHIMP1A 67 Pan_troglodytes (Chimp/CHIMP1A) -WB170 67 Caenorhabditis_elegans (C.elegans/WB170) -FUGU1 67 Takifugu_rubripes (Fugu/FUGU1) -FUGU2 67 Takifugu_rubripes (Fugu/FUGU2) -NCBIM34 67 Mus_musculus (Mouse/NCBIM34) -DROM3A 67 Drosophila_melanogaster (Fly/DROM3A) -tarSyr1 67 Tarsius_syrichta (Tarsier/tarSyr1) -CBR25 67 Caenorhabditis_briggsae (C.briggsae/CBR25) -BROADO5 67 Monodelphis_domestica (Opossum/BROADO5) -BROADO2 67 Monodelphis_domestica (Opossum/BROADO2) -BROADO3 67 Monodelphis_domestica (Opossum/BROADO3) -BDGP5.13 67 Drosophila_melanogaster (Fly/BDGP5.13) -MMUL_0_1 67 Macaca_mulatta (Macaque/MMUL_0_1)
This diff is so big that we needed to truncate the remainder.
https://bitbucket.org/galaxy/galaxy-central/commits/bb7f14c108be/ Changeset: bb7f14c108be User: natefoo Date: 2014-07-27 08:59:24 Summary: Remove hardcoded path to builds.txt from util, fix unit test that relies on this. Affected #: 5 files
diff -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 -r bb7f14c108be95ac31c3c63a3a979209b070a0e0 lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1002,7 +1002,7 @@
>>> # Create a mock transaction with 'hg17' as the current build >>> from galaxy.util.bunch import Bunch - >>> trans = Bunch( history=Bunch( genome_build='hg17' ), db_builds=util.dbnames ) + >>> trans = Bunch( history=Bunch( genome_build='hg17' ), db_builds=util.read_dbnames( None ) )
>>> p = GenomeBuildParameter( None, XML( ... ''' @@ -1071,7 +1071,7 @@ def _get_dbkey_names( self, trans=None ): if not self.tool: # Hack for unit tests, since we have no tool - return util.dbnames + return util.read_dbnames( None ) return self.tool.app.genome_builds.get_genome_build_names( trans=trans )
diff -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 -r bb7f14c108be95ac31c3c63a3a979209b070a0e0 lib/galaxy/util/__init__.py --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -796,6 +796,9 @@ ucsc_builds = {} man_builds = [] # assume these are integers name_to_db_base = {} + if filename is None: + # Should only be happening with the galaxy.tools.parameters.basic:GenomeBuildParameter docstring unit test + filename = os.path.join( 'tool-data', 'shared', 'ucsc', 'builds.txt.sample' ) for line in open(filename): try: if line[0:1] == "#": @@ -1126,8 +1129,6 @@
galaxy_root_path = os.path.join(__path__[0], "..", "..", "..")
-# The dbnames list is used in edit attributes and the upload tool -dbnames = read_dbnames( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "builds.txt" ) ) ucsc_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "ucsc_build_sites.txt" ) ) gbrowse_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "gbrowse", "gbrowse_build_sites.txt" ) )
diff -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 -r bb7f14c108be95ac31c3c63a3a979209b070a0e0 lib/galaxy/util/dbkeys.py --- a/lib/galaxy/util/dbkeys.py +++ b/lib/galaxy/util/dbkeys.py @@ -2,7 +2,7 @@ Functionality for dealing with dbkeys. """ #dbkeys read from disk using builds.txt -from galaxy.util import dbnames +from galaxy.util import read_dbnames from galaxy.util.json import from_json_string import os.path
@@ -17,7 +17,7 @@ self._static_chrom_info_path = app.config.len_file_path # A dbkey can be listed multiple times, but with different names, so we can't use dictionaries for lookups if load_old_style: - self._static_dbkeys = list( dbnames ) + self._static_dbkeys = list( read_dbnames( app.config.builds_file_path ) ) else: self._static_dbkeys = []
diff -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 -r bb7f14c108be95ac31c3c63a3a979209b070a0e0 test/unit/tools_support.py --- a/test/unit/tools_support.py +++ b/test/unit/tools_support.py @@ -99,6 +99,7 @@ root=os.path.join(test_directory, "galaxy"), admin_users="mary@example.com", len_file_path=os.path.join( 'tool-data', 'shared', 'ucsc', 'chrom' ), + builds_file_path=os.path.join( 'tool-data', 'shared', 'ucsc', 'builds.txt.sample' ), )
# Setup some attributes for downstream extension by specific tests.
diff -r b10faa0d47f11c35d1c992f91ca498cf3284a3e4 -r bb7f14c108be95ac31c3c63a3a979209b070a0e0 universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -180,6 +180,9 @@ # https://wiki.galaxyproject.org/Admin/DataIntegration #tool_data_path = tool-data
+# File containing old-style genome builds +#builds_file_path = tool-data/shared/ucsc/builds.txt + # Directory where chrom len files are kept, currently mainly used by trackster #len_file_path = tool-data/shared/ucsc/chrom
https://bitbucket.org/galaxy/galaxy-central/commits/d9ca84851e00/ Changeset: d9ca84851e00 User: natefoo Date: 2014-07-27 09:03:25 Summary: Make the path to integrated_tool_panel.xml configurable. Affected #: 3 files
diff -r bb7f14c108be95ac31c3c63a3a979209b070a0e0 -r d9ca84851e00ebace84a8805199290bee16f98a4 lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -83,6 +83,7 @@ tcf = kwargs[ 'tool_config_files' ] else: tcf = 'tool_conf.xml,shed_tool_conf.xml' + self.integrated_tool_panel_config = resolve_path( kwargs.get( 'integrated_tool_panel_config', 'integrated_tool_panel.xml' ), self.root ) self.tool_filters = listify( kwargs.get( "tool_filters", [] ), do_strip=True ) self.tool_label_filters = listify( kwargs.get( "tool_label_filters", [] ), do_strip=True ) self.tool_section_filters = listify( kwargs.get( "tool_section_filters", [] ), do_strip=True )
diff -r bb7f14c108be95ac31c3c63a3a979209b070a0e0 -r d9ca84851e00ebace84a8805199290bee16f98a4 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -132,7 +132,7 @@ # File that contains the XML section and tool tags from all tool panel config files integrated into a # single file that defines the tool panel layout. This file can be changed by the Galaxy administrator # (in a way similar to the single tool_conf.xml file in the past) to alter the layout of the tool panel. - self.integrated_tool_panel_config = os.path.join( app.config.root, 'integrated_tool_panel.xml' ) + self.integrated_tool_panel_config = app.config.integrated_tool_panel_config # In-memory dictionary that defines the layout of the tool_panel.xml file on disk. self.integrated_tool_panel = odict() self.integrated_tool_panel_config_has_contents = os.path.exists( self.integrated_tool_panel_config ) and os.stat( self.integrated_tool_panel_config ).st_size > 0
diff -r bb7f14c108be95ac31c3c63a3a979209b070a0e0 -r d9ca84851e00ebace84a8805199290bee16f98a4 universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -141,6 +141,12 @@ # Galaxy tool panel. If the following setting remains commented, the default setting will be True. #check_migrate_tools = True
+# File that contains the XML section and tool tags from all tool panel config +# files integrated into a single file that defines the tool panel layout. This +# file can be changed by the Galaxy administrator to alter the layout of the +# tool panel. If not present, Galaxy will create it. +#integrated_tool_panel_config = integrated_tool_panel.xml + # Default path to the directory containing the tools defined in tool_conf.xml. # Other tool config files must include the tool_path as an attribute in the <toolbox> tag. #tool_path = tools
https://bitbucket.org/galaxy/galaxy-central/commits/bd83b06b4c31/ Changeset: bd83b06b4c31 User: natefoo Date: 2014-07-27 09:10:44 Summary: Create a "build sites" interface for old-style display links (ucsc, gbrowse) to access build sites files. I don't like doing this for something that should not be in use anymore, but it was necessary to get rid of the hardcoded file paths in util. Affected #: 7 files
diff -r d9ca84851e00ebace84a8805199290bee16f98a4 -r bd83b06b4c31c3b360b785d97616de5f49b75a2a lib/galaxy/app.py --- a/lib/galaxy/app.py +++ b/lib/galaxy/app.py @@ -64,6 +64,9 @@ # Load dbkey / genome build manager self._configure_genome_builds( data_table_name="__dbkeys__", load_old_style=True )
+ # Load build sites (old-style) + self._configure_build_sites() + # Genomes self.genomes = Genomes( self ) # Data providers registry.
diff -r d9ca84851e00ebace84a8805199290bee16f98a4 -r bd83b06b4c31c3b360b785d97616de5f49b75a2a lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -16,6 +16,7 @@ from galaxy.util import string_as_bool from galaxy.util import listify from galaxy.util.dbkeys import GenomeBuilds +from galaxy.util.build_sites import BuildSites from galaxy import eggs
log = logging.getLogger( __name__ ) @@ -72,6 +73,7 @@ self.enable_unique_workflow_defaults = string_as_bool( kwargs.get( 'enable_unique_workflow_defaults', 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.builds_file_path = resolve_path( kwargs.get( "builds_file_path", os.path.join( self.tool_data_path, 'shared', 'ucsc', 'builds.txt') ), self.root ) self.len_file_path = resolve_path( kwargs.get( "len_file_path", os.path.join( self.tool_data_path, 'shared', 'ucsc', 'chrom') ), self.root ) self.test_conf = resolve_path( kwargs.get( "test_conf", "" ), self.root ) # The value of migrated_tools_config is the file reserved for containing only those tools that have been eliminated from the distribution @@ -222,7 +224,9 @@ self.sanitize_all_html = string_as_bool( kwargs.get( 'sanitize_all_html', True ) ) self.serve_xss_vulnerable_mimetypes = string_as_bool( kwargs.get( 'serve_xss_vulnerable_mimetypes', False ) ) self.enable_old_display_applications = string_as_bool( kwargs.get( "enable_old_display_applications", "True" ) ) + self.ucsc_build_sites = resolve_path( kwargs.get( 'ucsc_build_sites', os.path.join( self.tool_data_path, 'shared', 'ucsc', 'ucsc_build_sites.txt') ), self.root ) self.ucsc_display_sites = kwargs.get( 'ucsc_display_sites', "main,test,archaea,ucla" ).lower().split(",") + self.gbrowse_build_sites = resolve_path( kwargs.get( 'gbrowse_build_sites', os.path.join( self.tool_data_path, 'shared', 'gbrowse', 'gbrowse_build_sites.txt') ), self.root ) self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "modencode,sgd_yeast,tair,wormbase,wormbase_ws120,wormbase_ws140,wormbase_ws170,wormbase_ws180,wormbase_ws190,wormbase_ws200,wormbase_ws204,wormbase_ws210,wormbase_ws220,wormbase_ws225" ).lower().split(",") self.brand = kwargs.get( 'brand', None ) self.welcome_url = kwargs.get( 'welcome_url', '/static/welcome.html' ) @@ -570,6 +574,9 @@ def _configure_genome_builds( self, data_table_name="__dbkeys__", load_old_style=True ): self.genome_builds = GenomeBuilds( self, data_table_name=data_table_name, load_old_style=load_old_style )
+ def _configure_build_sites( self ): + self.build_sites = BuildSites( self ) + def _configure_toolbox( self ): # Initialize the tools, making sure the list of tool configs includes the reserved migrated_tools_conf.xml file. tool_configs = self.config.tool_configs
diff -r d9ca84851e00ebace84a8805199290bee16f98a4 -r bd83b06b4c31c3b360b785d97616de5f49b75a2a lib/galaxy/datatypes/genetics.py --- a/lib/galaxy/datatypes/genetics.py +++ b/lib/galaxy/datatypes/genetics.py @@ -85,7 +85,7 @@ if not dataset.dbkey: dataset.dbkey = 'hg18' # punt! if dataset.has_data(): - for site_name, site_url in util.get_ucsc_by_build(dataset.dbkey): + for site_name, site_url in app.build_sites.get_ucsc_by_build(dataset.dbkey): if site_name in app.config.ucsc_display_sites: site_url = site_url.replace('/hgTracks?','/hgGenome?') # for genome graphs internal_url = "%s" % url_for( controller='dataset',
diff -r d9ca84851e00ebace84a8805199290bee16f98a4 -r bd83b06b4c31c3b360b785d97616de5f49b75a2a lib/galaxy/datatypes/interval.py --- a/lib/galaxy/datatypes/interval.py +++ b/lib/galaxy/datatypes/interval.py @@ -234,7 +234,7 @@ # Filter UCSC sites to only those that are supported by this build and # enabled. valid_sites = [ ( name, url ) - for name, url in util.get_ucsc_by_build( dataset.dbkey ) + for name, url in app.build_sites.get_ucsc_by_build( dataset.dbkey ) if name in app.config.ucsc_display_sites ] if not valid_sites: return [] @@ -750,7 +750,7 @@ ret_val = [] seqid, start, stop = self.get_estimated_display_viewport( dataset ) if seqid is not None: - for site_name, site_url in util.get_ucsc_by_build( dataset.dbkey ): + for site_name, site_url in app.build_sites.get_ucsc_by_build( dataset.dbkey ): if site_name in app.config.ucsc_display_sites: redirect_url = urllib.quote_plus( "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" % @@ -762,7 +762,7 @@ ret_val = [] seqid, start, stop = self.get_estimated_display_viewport( dataset ) if seqid is not None: - for site_name, site_url in util.get_gbrowse_sites_by_build( dataset.dbkey ): + for site_name, site_url in app.build_sites.get_gbrowse_sites_by_build( dataset.dbkey ): if site_name in app.config.gbrowse_display_sites: if seqid.startswith( 'chr' ) and len ( seqid ) > 3: seqid = seqid[3:] @@ -1091,7 +1091,7 @@ ret_val = [] chrom, start, stop = self.get_estimated_display_viewport( dataset ) if chrom is not None: - for site_name, site_url in util.get_gbrowse_sites_by_build( dataset.dbkey ): + for site_name, site_url in app.build_sites.get_gbrowse_sites_by_build( dataset.dbkey ): if site_name in app.config.gbrowse_display_sites: if chrom.startswith( 'chr' ) and len ( chrom ) > 3: chrom = chrom[3:] @@ -1103,7 +1103,7 @@ ret_val = [] chrom, start, stop = self.get_estimated_display_viewport( dataset ) if chrom is not None: - for site_name, site_url in util.get_ucsc_by_build( dataset.dbkey ): + for site_name, site_url in app.build_sites.get_ucsc_by_build( dataset.dbkey ): if site_name in app.config.ucsc_display_sites: redirect_url = urllib.quote_plus( "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" % ( site_url, dataset.dbkey, chrom, start, stop ) ) link = self._get_remote_call_url( redirect_url, site_name, dataset, type, app, base_url ) @@ -1285,7 +1285,7 @@ ret_val = [] chrom, start, stop = self.get_estimated_display_viewport(dataset) if chrom is not None: - for site_name, site_url in util.get_ucsc_by_build(dataset.dbkey): + for site_name, site_url in app.build_sites.get_ucsc_by_build(dataset.dbkey): if site_name in app.config.ucsc_display_sites: internal_url = "%s" % url_for( controller='dataset', dataset_id=dataset.id, action='display_at', filename='ucsc_' + site_name ) display_url = urllib.quote_plus( "%s%s/display_as?id=%i&display_app=%s&authz_method=display_at" % (base_url, url_for( controller='root' ), dataset.id, type) )
diff -r d9ca84851e00ebace84a8805199290bee16f98a4 -r bd83b06b4c31c3b360b785d97616de5f49b75a2a lib/galaxy/util/__init__.py --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -770,22 +770,6 @@ return True
-def get_ucsc_by_build(build): - sites = [] - for site in ucsc_build_sites: - if build in site['builds']: - sites.append((site['name'], site['url'])) - return sites - - -def get_gbrowse_sites_by_build(build): - sites = [] - for site in gbrowse_build_sites: - if build in site['builds']: - sites.append((site['name'], site['url'])) - return sites - - def read_dbnames(filename): """ Read build names from file """ class DBNames( list ): @@ -845,30 +829,6 @@ return db_names
-def read_build_sites( filename, check_builds=True ): - """ read db names to ucsc mappings from file, this file should probably be merged with the one above """ - build_sites = [] - try: - for line in open(filename): - try: - if line[0:1] == "#": - continue - fields = line.replace("\r", "").replace("\n", "").split("\t") - site_name = fields[0] - site = fields[1] - if check_builds: - site_builds = fields[2].split(",") - site_dict = {'name': site_name, 'url': site, 'builds': site_builds} - else: - site_dict = {'name': site_name, 'url': site} - build_sites.append( site_dict ) - except: - continue - except: - print "ERROR: Unable to read builds for site file %s" % filename - return build_sites - - def relativize_symlinks( path, start=None, followlinks=False): for root, dirs, files in os.walk( path, followlinks=followlinks ): rel_start = None @@ -1129,9 +1089,6 @@
galaxy_root_path = os.path.join(__path__[0], "..", "..", "..")
-ucsc_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "ucsc_build_sites.txt" ) ) -gbrowse_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "gbrowse", "gbrowse_build_sites.txt" ) ) -
def galaxy_directory(): return os.path.abspath(galaxy_root_path)
diff -r d9ca84851e00ebace84a8805199290bee16f98a4 -r bd83b06b4c31c3b360b785d97616de5f49b75a2a lib/galaxy/util/build_sites.py --- /dev/null +++ b/lib/galaxy/util/build_sites.py @@ -0,0 +1,52 @@ +""" +Functionality for dealing with build sites for legacy display applications. +""" +import os.path + + +class BuildSites( object ): + + def __init__( self, app ): + self._app = app + self._build_sites = {} + self.load_build_sites() + + def read_build_sites( self, filename, check_builds=True ): + """ read db names to ucsc mappings from file, this file should probably be merged with the one above """ + build_sites = [] + try: + for line in open(filename): + try: + if line[0:1] == "#": + continue + fields = line.replace("\r", "").replace("\n", "").split("\t") + site_name = fields[0] + site = fields[1] + if check_builds: + site_builds = fields[2].split(",") + site_dict = {'name': site_name, 'url': site, 'builds': site_builds} + else: + site_dict = {'name': site_name, 'url': site} + build_sites.append( site_dict ) + except: + continue + except: + print "ERROR: Unable to read builds for site file %s" % filename + return build_sites + + def load_build_sites( self ): + self._build_sites['ucsc'] = self.read_build_sites( self._app.config.ucsc_build_sites ) + self._build_sites['gbrowse'] = self.read_build_sites( self._app.config.gbrowse_build_sites ) + + def get_site_by_build( self, site_type, build ): + sites = [] + for site in self._build_sites[site_type]: + if build in site['builds']: + sites.append((site['name'], site['url'])) + return sites + + def get_ucsc_sites_by_build( self, build ): + return self._get_site_by_build( 'ucsc', build ) + + def get_gbrowse_sites_by_build( self, build ): + return self._get_site_by_build( 'gbrowse', build )
diff -r d9ca84851e00ebace84a8805199290bee16f98a4 -r bd83b06b4c31c3b360b785d97616de5f49b75a2a universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -355,15 +355,14 @@ # which browsers should be available. URLs and builds available at these # browsers are defined in the specifield files.
-# UCSC browsers: tool-data/shared/ucsc/ucsc_build_sites.txt +# UCSC browsers: +#ucsc_build_sites = tool-data/shared/ucsc/ucsc_build_sites.txt #ucsc_display_sites = main,test,archaea,ucla
-# GBrowse servers: tool-data/shared/gbrowse/gbrowse_build_sites.txt +# GBrowse servers: +#gbrowse_build_sites = tool-data/shared/gbrowse/gbrowse_build_sites.txt #gbrowse_display_sites = modencode,sgd_yeast,tair,wormbase,wormbase_ws120,wormbase_ws140,wormbase_ws170,wormbase_ws180,wormbase_ws190,wormbase_ws200,wormbase_ws204,wormbase_ws210,wormbase_ws220,wormbase_ws225
-# GeneTrack servers: tool-data/shared/genetrack/genetrack_sites.txt -#genetrack_display_sites = main,test - # If use_remote_user = True, display application servers will be denied access # to Galaxy and so displaying datasets in these sites will fail. # display_servers contains a list of hostnames which should be allowed to
https://bitbucket.org/galaxy/galaxy-central/commits/88b9ec473be0/ Changeset: 88b9ec473be0 User: natefoo Date: 2014-07-27 09:16:09 Summary: Do not try to create directories that do not need to be created. Affected #: 1 file
diff -r bd83b06b4c31c3b360b785d97616de5f49b75a2a -r 88b9ec473be0ca08cf8d778894d94efb91448f71 lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -460,13 +460,13 @@ except Exception, e: raise ConfigurationError( "Unable to create missing directory: %s\n%s" % ( path, e ) ) # Create the directories that it makes sense to create - for path in (self.file_path, self.new_file_path, - self.job_working_directory, self.cluster_files_directory, - self.template_cache, self.ftp_upload_dir, + if self.object_store_config_file is None: + for path in (self.file_path, self.job_working_directory): + self._ensure_directory( path ) + for path in (self.new_file_path, self.template_cache, self.ftp_upload_dir, self.library_import_dir, self.user_library_import_dir, - self.nginx_upload_store, './static/genetrack/plots', - self.whoosh_index_dir, self.object_store_cache_path, - os.path.join( self.tool_data_path, 'shared', 'jars' )): + self.nginx_upload_store, self.whoosh_index_dir, + self.object_store_cache_path): self._ensure_directory( path ) # Check that required files exist tool_configs = self.tool_configs
https://bitbucket.org/galaxy/galaxy-central/commits/458b7b69aced/ Changeset: 458b7b69aced User: natefoo Date: 2014-07-27 09:17:44 Summary: Make the eggs directory path configurable via an environment variable. Until no tools use the eggs, this can't be a value in the config file (since tools don't know where the config file is). Affected #: 1 file
diff -r 88b9ec473be0ca08cf8d778894d94efb91448f71 -r 458b7b69aced483709998d02a0ca2a553605d202 lib/galaxy/eggs/__init__.py --- a/lib/galaxy/eggs/__init__.py +++ b/lib/galaxy/eggs/__init__.py @@ -11,6 +11,7 @@ import pkg_resources
galaxy_dir = os.path.abspath( os.path.join( os.path.dirname( __file__ ), '..', '..', '..' ) ) +eggs_dir = os.environ.get( 'GALAXY_EGGS_PATH', os.path.join( galaxy_dir, 'eggs' ) ) py = 'py%s' % sys.version[:3]
class EggNotFetchable( Exception ): @@ -49,7 +50,8 @@ if self.name is not None and self.version is not None: self.set_distribution() def set_dir( self ): - self.dir = os.path.join( galaxy_dir, 'eggs' ) + global eggs_dir + self.dir = eggs_dir if not os.path.exists( self.dir ): os.makedirs( self.dir ) def set_distribution( self ): @@ -395,7 +397,7 @@
def get_env(): env = pkg_resources.Environment( search_path='', platform=pkg_resources.get_platform() ) - for dist in pkg_resources.find_distributions( os.path.join( galaxy_dir, 'eggs' ), False ): + for dist in pkg_resources.find_distributions( eggs_dir, False ): env.add( dist ) return env env = get_env()
https://bitbucket.org/galaxy/galaxy-central/commits/2b5cc94148e5/ Changeset: 2b5cc94148e5 User: natefoo Date: 2014-07-27 09:20:37 Summary: Document a few undocumented config options. Affected #: 1 file
diff -r 458b7b69aced483709998d02a0ca2a553605d202 -r 2b5cc94148e517cdc1265e1593134f35c89c411c universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -141,6 +141,11 @@ # Galaxy tool panel. If the following setting remains commented, the default setting will be True. #check_migrate_tools = True
+# Tool config maintained by tool migration scripts. If you use the migration +# scripts to install tools that have been migrated to the tool shed upon a new +# release, they will be added to this tool config file. +#migrated_tools_config = migrated_tools_conf.xml + # File that contains the XML section and tool tags from all tool panel config # files integrated into a single file that defines the tool panel layout. This # file can be changed by the Galaxy administrator to alter the layout of the @@ -159,6 +164,10 @@ # from the Tool Shed will fail. #tool_dependency_dir = None
+# File containing the Galaxy Tool Sheds that should be made available to +# install from in the admin interface +#tool_sheds_config_file = tool_sheds_conf.xml + # Enable automatic polling of relative tool sheds to see if any updates # are available for installed repositories. Ideally only one Galaxy # server process should be able to check for repository updates. The @@ -691,6 +700,7 @@ # account by authenticating with an OpenID provider. #enable_openid = False #openid_config_file = openid_conf.xml +#openid_consumer_cache_path = database/openid_consumer_cache
# Optional list of email addresses of API users who can make calls on behalf of # other users
https://bitbucket.org/galaxy/galaxy-central/commits/e7d5ba336363/ Changeset: e7d5ba336363 User: natefoo Date: 2014-08-01 19:12:58 Summary: Create builds.txt from UCSC's Main browser, not Test. Affected #: 1 file
diff -r 2b5cc94148e517cdc1265e1593134f35c89c411c -r e7d5ba3363633a6bffa0082e79823984dfb9f710 cron/parse_builds.py --- a/cron/parse_builds.py +++ b/cron/parse_builds.py @@ -15,7 +15,7 @@ import pkg_resources; pkg_resources.require( "elementtree" ) from elementtree import ElementTree
-URL = "http://genome-test.cse.ucsc.edu/cgi-bin/das/dsn" +URL = "http://genome.cse.ucsc.edu/cgi-bin/das/dsn"
def getbuilds(url): try: @@ -33,7 +33,7 @@ print "?\tunspecified (?)" sys.exit(1)
- print "#Harvested from http://genome-test.cse.ucsc.edu/cgi-bin/das/dsn" + print "#Harvested from http://genome.cse.ucsc.edu/cgi-bin/das/dsn" print "?\tunspecified (?)" for dsn in tree: build = dsn.find("SOURCE").attrib['id']
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
galaxy-commits@lists.galaxyproject.org