galaxy-dist commit b4237641ca4d: Make the PSU BX browser a UCSC browser instead of being a different display type.
# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Nate Coraor <nate@bx.psu.edu> # Date 1277829642 14400 # Node ID b4237641ca4d28631c9e65c726693057d4b8dab3 # Parent eea2c040ccb7bd0d2a7c6e5eab8e65f98a163009 Make the PSU BX browser a UCSC browser instead of being a different display type. --- a/universe_wsgi.ini.sample +++ b/universe_wsgi.ini.sample @@ -105,8 +105,7 @@ mailing_join_addr = galaxy-user-join@bx. # Use the new iframe / javascript based layout use_new_layout = true -# Comma separated list of bx / UCSC / gbrowse / GeneTrack browsers to use for viewing -bx_display_sites = main +# Comma separated list of UCSC / gbrowse / GeneTrack browsers to use for viewing ucsc_display_sites = main,test,archaea,ucla gbrowse_display_sites = wormbase,tair,modencode_worm,modencode_fly # Define your GeneTrack servers in tool-data/shared/genetrack/genetrack_sites.txt --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -278,12 +278,6 @@ def object_to_string( obj ): def string_to_object( s ): return pickle.loads( binascii.unhexlify( s ) ) -def get_bx_by_build(build): - sites = [] - for site in bx_build_sites: - if build in site['builds']: - sites.append((site['name'],site['url'])) - return sites def get_ucsc_by_build(build): sites = [] for site in ucsc_build_sites: @@ -484,7 +478,6 @@ def umask_fix_perms( path, umask, unmask 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" ) ) -bx_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "bx", "bx_build_sites.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" ) ) genetrack_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "genetrack", "genetrack_sites.txt" ), check_builds=False ) --- a/tool-data/shared/bx/bx_build_sites.txt +++ /dev/null @@ -1,1 +0,0 @@ -main http://main.genome-browser.bx.psu.edu/cgi-bin/hgTracks? hg18,hg19,mm8,mm9 bx-main --- a/lib/galaxy/datatypes/interval.py +++ b/lib/galaxy/datatypes/interval.py @@ -54,7 +54,6 @@ class Interval( Tabular ): """Initialize interval datatype, by adding UCSC display apps""" Tabular.__init__(self, **kwd) self.add_display_app ( 'ucsc', 'display at UCSC', 'as_ucsc_display_file', 'ucsc_links' ) - self.add_display_app ( 'main', 'BX', 'as_ucsc_display_file', 'bx_links' ) def init_meta( self, dataset, copy_from=None ): Tabular.init_meta( self, dataset, copy_from=copy_from ) @@ -247,29 +246,6 @@ class Interval( Tabular ): link = '%s?redirect_url=%s&display_url=%s' % ( internal_url, redirect_url, display_url ) ret_val.append( (site_name, link) ) return ret_val - def bx_links( self, dataset, type, app, base_url ): - # TODO: abstract these methods to eliminate duplicate code. - ret_val = [] - if dataset.has_data: - viewport_tuple = self.get_estimated_display_viewport(dataset) - if viewport_tuple: - chrom = viewport_tuple[0] - start = viewport_tuple[1] - stop = viewport_tuple[2] - for site_name, site_url in util.get_bx_by_build(dataset.dbkey): - if site_name in app.config.bx_display_sites: - # HACK: UCSC doesn't support https, so force http even - # if our URL scheme is https. Making this work - # requires additional hackery in your upstream proxy. - # If UCSC ever supports https, remove this hack. - internal_url = "%s" % url_for( controller='dataset', dataset_id=dataset.id, action='display_at', filename='bx_' + site_name ) - if base_url.startswith( 'https://' ): - base_url = base_url.replace( 'https', 'http', 1 ) - 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) ) - redirect_url = urllib.quote_plus( "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" % (site_url, dataset.dbkey, chrom, start, stop ) ) - link = '%s?redirect_url=%s&display_url=%s' % ( internal_url, redirect_url, display_url ) - ret_val.append( (site_name, link) ) - return ret_val def validate( self, dataset ): """Validate an interval file using the bx GenomicIntervalReader""" --- a/tool-data/shared/ucsc/ucsc_build_sites.txt +++ b/tool-data/shared/ucsc/ucsc_build_sites.txt @@ -5,3 +5,4 @@ archaea http://archaea.ucsc.edu/cgi-bin/ #Harvested from http://genome-test.cse.ucsc.edu/cgi-bin/das/dsn test http://genome-test.cse.ucsc.edu/cgi-bin/hgTracks? anoCar1,ce4,ce3,ce2,ce1,loxAfr1,rn2,eschColi_O157H7_1,rn4,droYak1,heliPylo_J99_1,droYak2,dp3,dp2,caeRem2,caeRem1,oryLat1,eschColi_K12_1,homIni13,homIni14,droAna1,droAna2,oryCun1,sacCer1,heliHepa1,droGri1,sc1,dasNov1,choHof1,tupBel1,mm9,mm8,vibrChol1,mm5,mm4,mm7,mm6,mm3,mm2,rn3,venter1,galGal3,galGal2,ornAna1,equCab1,cioSav2,rheMac2,eutHer13,droPer1,droVir2,droVir1,heliPylo_26695_1,euaGli13,calJac1,campJeju1,droSim1,hg13,hg15,hg16,hg17,monDom1,monDom4,droMoj1,petMar1,droMoj2,vibrChol_MO10_1,vibrPara1,gliRes13,vibrVuln_YJ016_1,braFlo1,cioSav1,lauRas13,dm1,canFam1,canFam2,ci1,echTel1,ci2,caePb1,dm3,ponAbe2,falciparum,xenTro1,xenTro2,nonAfr13,fr2,fr1,gasAcu1,dm2,apiMel1,apiMel2,eschColi_O157H7EDL933_1,priPac1,panTro1,hg18,panTro2,campJeju_RM1221_1,canHg12,vibrChol_O395_1,vibrFisc_ES114_1,danRer5,danRer4,danRer3,danRer2,danRer1,tetNig1,afrOth13,bosTau1,eschColi_CFT073_1,bosTau3,bosTau2,bosTau4,rodEnt13,droEre1,priMat13,vibrVu ln_CMCP6_1,cb2,cb3,cb1,borEut13,droSec1,felCat3,strPur1,strPur2,otoGar1,catArr1,anoGam1,triCas2 ucla http://epigenomics.mcdb.ucla.edu/cgi-bin/hgTracks? araTha1 +psu bx main http://main.genome-browser.bx.psu.edu/cgi-bin/hgTracks? hg18,hg19,mm8,mm9 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -83,7 +83,6 @@ class Configuration( object ): self.log_memory_usage = string_as_bool( kwargs.get( 'log_memory_usage', 'False' ) ) self.log_actions = string_as_bool( kwargs.get( 'log_actions', 'False' ) ) self.log_events = string_as_bool( kwargs.get( 'log_events', 'False' ) ) - self.bx_display_sites = kwargs.get( 'bx_display_sites', "main" ).lower().split(",") self.ucsc_display_sites = kwargs.get( 'ucsc_display_sites', "main,test,archaea,ucla" ).lower().split(",") self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "wormbase,tair,modencode_worm,modencode_fly" ).lower().split(",") self.genetrack_display_sites = kwargs.get( 'genetrack_display_sites', "main,test" ).lower().split(",")
participants (1)
-
commits-noreply@bitbucket.org