diff --git a/lib/galaxy/webapps/galaxy/controllers/ucsc_proxy.py b/lib/galaxy/webapps/galaxy/controllers/ucsc_proxy.py
deleted file mode 100644
index a2ea97d6fb6..00000000000
--- a/lib/galaxy/webapps/galaxy/controllers/ucsc_proxy.py
+++ /dev/null
@@ -1,165 +0,0 @@
-"""
-Contains the UCSC proxy
-"""
-
-from galaxy.web.base.controller import BaseUIController
-
-import json
-from galaxy import web, util
-
-import re
-import urllib
-import logging
-
-log = logging.getLogger( __name__ )
-
-
-class UCSCProxy( BaseUIController ):
-
- def create_display(self, store):
- """Creates a more meaningulf display name"""
- track = store.get('hgta_track', 'no track')
- table = store.get('hgta_table', 'no table')
- region = store.get('hgta_regionType', '')
- if region not in [ 'genome', 'encode']:
- region = store.get('position', '')
- if track == table:
- display = 'UCSC: %s (%s)' % (track, region)
- else:
- display = 'UCSC: %s, %s (%s)' % (track, table, region)
- return display
-
- @web.expose
- def index(self, trans, init=False, **kwd):
- base_url = None
- params = dict(kwd)
- try:
- store = params.get("__GALAXY__", None)
- if store:
- store = json.loads(util.string_to_object(store))
- else:
- store = {}
- UCSC_URL = 'UCSC_URL'
- base_url = store.get(UCSC_URL, "http://genome.ucsc.edu/cgi-bin/hgTables?")
- params = dict(kwd)
- params['init'] = init
-
- if not init:
- for key, value in kwd.items():
- store[key] = value
- try:
- del store["__GALAXY__"]
- except:
- pass
- else:
- store = {}
-
- if init == "1":
- base_url = "http://genome.ucsc.edu/cgi-bin/hgTables?"
- params['db'] = 'hg17'
- if init == "2":
- base_url = "http://genome-test.cse.ucsc.edu/cgi-bin/hgTables?"
- params['db'] = 'hg17'
- if init == "3":
- base_url = "http://archaea.ucsc.edu/cgi-bin/hgTables?"
-
- store[UCSC_URL] = base_url
-
- try:
- del params["__GALAXY__"]
- except:
- pass
- url = base_url + urllib.urlencode(params)
-
- page = urllib.urlopen(url)
- content = page.info().get('Content-type', '')
- except Exception, exc:
- trans.log_event( "Proxy Error -> %s" % str(exc) )
- msg = 'There has been a problem connecting to %s
%s' % (base_url, exc)
- return msg
-
- if content.startswith('text/plain'):
- params['display'] = self.create_display(store)
- params['dbkey'] = store.get('db', '*')
- params['tool_id'] = 'ucsc_proxy'
- params['proxy_url'] = base_url
- params['runtool_btn'] = 'T'
- url = "/tool_runner/index?" + urllib.urlencode(params)
- trans.response.send_redirect(url)
- else:
- try:
- text = page.read()
-
- # Serialize store into a form element
- store_text = ""
-
- # Remove text regions that should not be exposed
- for key, value in altered_regions.items():
- text = text.replace(key, value)
- # Capture only the forms
- newtext = beginning
- for form in re.finditer("(?s)()", text):
- newtext = newtext + form.group(1) + store_text + form.group(2)
- if 'hgta_doLookupPosition' in params:
- lookup = re.search("(?s).*?(
.*)", text)
- if lookup:
- newtext = newtext + lookup.group(1)
- # if these keys are in the params, then pass the content through
- passthruContent = ['hgta_doSummaryStats', 'hgta_doSchema', 'hgta_doSchemaDb']
- for k in passthruContent:
- if k in params:
- content = re.search("(?s)CONTENT TABLES.*?-->(.*/TABLE>)", text)
- if content:
- newtext = newtext + "
" + content.group(1)
-
- newtext = newtext + ending
- return newtext
- except KeyError, exc:
- log.error(str(exc))
- trans.log_event( "Proxy Error -> %s" % str(exc) )
- msg = 'There has been a problem connecting to %s
%s' % (base_url, exc)
- return msg
-
-# HTML for generating the proxy page.
-beginning = '''
-
-
-
-Galaxy
-
-
-
-
-
-
-
-
-'''
-
-# This is a mess of mappings of text to make the proxy friendlier to
-# galaxy users.
-altered_regions = {
- '"../cgi-bin/hgTables' : '"/ucsc_proxy/index',
- '
\noutput file: (leave blank to keep output in browser)
\n
\nfile type returned: plain text   gzip compressed