commit/galaxy-central: davebgx: Remove deprecated code that was importing removed deprecated code.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/558e521c3934/ Changeset: 558e521c3934 User: davebgx Date: 2014-07-08 21:22:47 Summary: Remove deprecated code that was importing removed deprecated code. Affected #: 1 file diff -r c6e4969dfcbb0a5ecf8ff7f8cdb8b8c727c4063a -r 558e521c3934f3b02c0fa31a8b93803d08aabf22 lib/galaxy/webapps/galaxy/api/genomes.py --- a/lib/galaxy/webapps/galaxy/api/genomes.py +++ b/lib/galaxy/webapps/galaxy/api/genomes.py @@ -1,7 +1,6 @@ from galaxy import web, util from galaxy.web.base.controller import BaseAPIController from galaxy.web.framework.helpers import is_true -from galaxy.webapps.galaxy.controllers.data_admin import build_param_dict as massage def get_id( base, format ): if format: @@ -41,77 +40,3 @@ else: rval = self.app.genomes.chroms( trans, dbkey=id, num=num, chrom=chrom, low=low ) return rval - - @web.expose_api - def create( self, trans, payload, **kwd ): - """ - POST /api/genomes - Download and/or index a genome. - - Parameters:: - liftover None or array of liftover url partial paths - dbkey DB key of the build to download - indexers POST array of indexers to run after downloading (indexers[] = first, indexers[] = second, ...) - longname a more descriptive name for the genome - func Allowed values: - 'download' Download and index - 'index' Index only - Returns:: - If no error: - dict( status: 'ok', job: <job ID> ) - - If error: - dict( status: 'error', error: <error message> ) - - """ - #??: Planned? - #Parameters:: - # dbkey DB key of the build to download, ignored unless 'UCSC' is specified as the source - # ncbi_name NCBI's genome identifier, ignored unless NCBI is specified as the source - # ensembl_dbkey Ensembl's genome identifier, ignored unless Ensembl is specified as the source - # url_dbkey DB key to use for this build, ignored unless URL is specified as the source - # source Data source for this build. Can be: UCSC, Ensembl, NCBI, URL - # indexers POST array of indexers to run after downloading (indexers[] = first, indexers[] = second, ...) - # func Allowed values: - # 'download' Download and index - # 'index' Index only - params = util.Params( payload ) - paramdict = massage( params, trans ) - func = params.get( 'func', 'download' ) - if func == 'download': - url = paramdict[ 'url' ] - liftover = paramdict[ 'liftover' ] - dbkey = paramdict[ 'dbkey' ] - indexers = paramdict[ 'indexers' ] - longname = paramdict[ 'longname' ] - jobid = trans.app.job_manager.deferred_job_queue.plugins['GenomeTransferPlugin'].create_job( trans, url, dbkey, longname, indexers ) - chainjob = [] - if liftover is not None: - for chain in liftover: - liftover_url = u'ftp://hgdownload.cse.ucsc.edu%s' % chain[0] - from_genome = chain[1] - to_genome = chain[2] - destfile = liftover_url.split('/')[-1].replace('.gz', '') - lochain = trans.app.job_manager.deferred_job_queue.plugins['LiftOverTransferPlugin'].create_job( trans, liftover_url, dbkey, from_genome, to_genome, destfile, jobid ) - chainjob.append( lochain ) - job = trans.app.job_manager.deferred_job_queue.plugins['GenomeTransferPlugin'].get_job_status( jobid ) - job.params['liftover'] = chainjob - trans.app.model.context.current.flush() - return dict( status='ok', job=jobid ) - elif func == 'index': - dbkey = paramdict[ 'dbkey' ] - indexer = [ params.get( 'indexer', None ) ] - longname = None - path = None - for build in trans.app.tool_data_tables.data_tables[ 'all_fasta' ].data: - if build[0] == dbkey: - longname = build[2] - path = build[3] - break - if longname is not None and indexer is not None and path is not None: - jobid = trans.app.job_manager.deferred_job_queue.plugins['GenomeIndexPlugin'].create_job( trans, path, indexer, dbkey, longname ) - return dict( status='ok', job=jobid ) - else: - return dict( status='error', error='Build not %s found in tool data table.' % dbkey ) - else: - return dict( status='error', error='Unkown function selected.' ) 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.
participants (1)
-
commits-noreply@bitbucket.org