details: http://www.bx.psu.edu/hg/galaxy/rev/58500dfab084 changeset: 3774:58500dfab084 user: Greg Von Kuster <greg@bx.psu.edu> date: Wed May 12 14:37:00 2010 -0400 description: Fixes for displaying appropriate datasets in GBrowse wormbase, modENCODE worm, and modENCODE fly. diffstat: lib/galaxy/config.py | 2 +- lib/galaxy/datatypes/interval.py | 32 ++++++++++++++++++------ tool-data/shared/gbrowse/gbrowse_build_sites.txt | 11 ++++++- tool_conf.xml.sample | 2 + universe_wsgi.ini.sample | 2 +- 5 files changed, 37 insertions(+), 12 deletions(-) diffs (120 lines): diff -r f5f6b6e0a784 -r 58500dfab084 lib/galaxy/config.py --- a/lib/galaxy/config.py Wed May 12 11:43:57 2010 -0400 +++ b/lib/galaxy/config.py Wed May 12 14:37:00 2010 -0400 @@ -84,7 +84,7 @@ 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', "main,test,tair" ).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(",") self.brand = kwargs.get( 'brand', None ) self.wiki_url = kwargs.get( 'wiki_url', 'http://g2.trac.bx.psu.edu/' ) diff -r f5f6b6e0a784 -r 58500dfab084 lib/galaxy/datatypes/interval.py --- a/lib/galaxy/datatypes/interval.py Wed May 12 11:43:57 2010 -0400 +++ b/lib/galaxy/datatypes/interval.py Wed May 12 14:37:00 2010 -0400 @@ -582,7 +582,7 @@ """Initialize datatype, by adding GBrowse display app""" Tabular.__init__(self, **kwd) self.add_display_app( 'ucsc', 'display at UCSC', 'as_ucsc_display_file', 'ucsc_links' ) - self.add_display_app( 'c_elegans', 'display in Wormbase', 'as_gbrowse_display_file', 'gbrowse_links' ) + self.add_display_app( 'gbrowse', 'display in Gbrowse', 'as_gbrowse_display_file', 'gbrowse_links' ) def set_meta( self, dataset, overwrite = True, **kwd ): i = 0 for i, line in enumerate( file ( dataset.file_name ) ): @@ -628,10 +628,24 @@ continue if line.startswith( '##sequence-region' ): # ##sequence-region IV 6000000 6030000 elems = line.split() - seqid = elems[1] # IV - start = elems[2] # 6000000 - stop = elems[3] # 6030000 - break + if len( elems ) > 3: + # line looks like: + # ##sequence-region ctg123 1 1497228 + seqid = elems[1] # IV + start = elems[2] # 6000000 + stop = elems[3] # 6030000 + break + elif len( elems ) == 2 and elems[1].find( '..' ) > 0: + # line looks like this: + # ##sequence-region X:120000..140000 + elems = elems[1].split( ':' ) + seqid = elems[0] + start = elems[1].split( '..' )[0] + stop = elems[1].split( '..' )[1] + break + else: + log.exception( "line (%s) uses an unsupported ##sequence-region definition." % str( line ) ) + break # Allow UCSC style browser and track info in the GFF file if line.startswith("browser position"): pos_info = line.split()[-1] @@ -652,7 +666,8 @@ break if i > 10: break - except: + except Exception, e: + log.exception( str( e ) ) seqid, start, stop = ( '', '', '' ) return ( seqid, str( start ), str( stop ) ) else: @@ -681,8 +696,9 @@ if seqid and start and stop: for site_name, site_url in util.get_gbrowse_sites_by_build( dataset.dbkey ): if site_name in app.config.gbrowse_display_sites: - redirect_url = urllib.quote_plus( "%s%s/?ref=%s&start=%s&stop=%s&eurl=%%s" % - ( site_url, dataset.dbkey, seqid, start, stop ) ) + # Old method, the one uncommented below now seems to be the way GBrowse wants the request + # redirect_url = urllib.quote_plus( "%s%s/?ref=%s&start=%s&stop=%s&eurl=%%s" % ( site_url, dataset.dbkey, seqid, start, stop ) ) + redirect_url = urllib.quote_plus( "%s/?q=%s:%s..%s" % ( site_url, seqid, start, stop ) ) link = self._get_remote_call_url( redirect_url, site_name, dataset, type, app, base_url ) ret_val.append( ( site_name, link ) ) return ret_val diff -r f5f6b6e0a784 -r 58500dfab084 tool-data/shared/gbrowse/gbrowse_build_sites.txt --- a/tool-data/shared/gbrowse/gbrowse_build_sites.txt Wed May 12 11:43:57 2010 -0400 +++ b/tool-data/shared/gbrowse/gbrowse_build_sites.txt Wed May 12 14:37:00 2010 -0400 @@ -1,4 +1,11 @@ # wormbase sites / supported genomes -main http://www.wormbase.org/db/seq/gbgff/c_elegans/ c_elegans,c_briggsae,c_remanei,c_brenneri,c_japonica,p_pristionchus,b_malayi -test http://dev.wormbase.org/db/seq/gbrowse/c_elegans/ c_elegans,c_briggsae,c_remanei,c_brenneri,c_japonica,p_pristionchus,b_malayi +wormbase http://www.wormbase.org/db/gb2/gbrowse/c_elegans ce8,ce7,ce6,ce5,ce4,ce3,ce2,cb3,cb2,cb1,caeRem3,caeRem2,caeRem1,caePb2,caePb1,caeJap2,caeJap1 +#test http://dev.wormbase.org/db/seq/gbrowse/c_elegans/ ce8,ce7,ce6,ce5,ce4,ce3,ce2,cb3,cb2,cb1,caeRem3,caeRem2,caeRem1,caePb2,caePb1,caeJap2,caeJap1 + +# UCSC mirror that includes arabidopsis tair http://arabidopsis.org/cgi-bin/gbrowse/ arabidopsis_tair8,arabidopsis + +# modENCODE worm and fly +modencode_worm http://modencode.oicr.on.ca/fgb2/gbrowse/worm ce6 +modencode_fly http://modencode.oicr.on.ca/fgb2/gbrowse/fly dm2 + diff -r f5f6b6e0a784 -r 58500dfab084 tool_conf.xml.sample --- a/tool_conf.xml.sample Wed May 12 11:43:57 2010 -0400 +++ b/tool_conf.xml.sample Wed May 12 14:37:00 2010 -0400 @@ -10,10 +10,12 @@ <tool file="data_source/biomart.xml" /> <tool file="data_source/biomart_test.xml" /> <tool file="data_source/gramene_mart.xml" /> + <tool file="data_source/fly_modencode.xml" /> <tool file="data_source/flymine.xml" /> <tool file="data_source/flymine_test.xml" /> <tool file="data_source/modmine.xml" /> <tool file="data_source/ratmine.xml" /> + <tool file="data_source/worm_modencode.xml" /> <tool file="data_source/wormbase.xml" /> <tool file="data_source/wormbase_test.xml" /> <tool file="data_source/eupathdb.xml" /> diff -r f5f6b6e0a784 -r 58500dfab084 universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample Wed May 12 11:43:57 2010 -0400 +++ b/universe_wsgi.ini.sample Wed May 12 14:37:00 2010 -0400 @@ -108,7 +108,7 @@ # Comma separated list of bx / UCSC / gbrowse / GeneTrack browsers to use for viewing bx_display_sites = main ucsc_display_sites = main,test,archaea,ucla -gbrowse_display_sites = main,test,tair +gbrowse_display_sites = wormbase,tair,modencode_worm,modencode_fly # Define your GeneTrack servers in tool-data/shared/genetrack/genetrack_sites.txt #genetrack_display_sites =