/usr/lib/python3/dist-packages/bioblend/galaxy/genomes/__init__.py is in python3-bioblend 0.7.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | """
Contains possible interactions with the Galaxy Histories
"""
from bioblend.galaxy.client import Client
class GenomeClient(Client):
def __init__(self, galaxy_instance):
self.module = 'genomes'
super(GenomeClient, self).__init__(galaxy_instance)
def get_genomes(self):
"""
Returns a list of installed genomes
"""
genomes = Client._get(self)
return genomes
def show_genome(self, id, num=None, chrom=None, low=None, high=None):
"""
Returns information about build <id>
:type id: str
:param id: Genome build ID to use
:type num: str
:param num: num
:type chrom: str
:param chrom: chrom
:type low: str
:param low: low
:type high: str
:param high: high
"""
params = {}
if num:
params['num'] = num
if chrom:
params['chrom'] = chrom
if low:
params['low'] = low
if high:
params['high'] = high
return Client._get(self, id, params)
def install_genome(self, func='download', source=None, dbkey=None,
ncbi_name=None, ensembl_dbkey=None, url_dbkey=None,
indexers=None):
"""
Download and/or index a genome.
:type dbkey: str
:param dbkey: DB key of the build to download, ignored unless 'UCSC' is specified as the source
:type ncbi_name: str
:param ncbi_name: NCBI's genome identifier, ignored unless NCBI is specified as the source
:type ensembl_dbkey: str
:param ensembl_dbkey: Ensembl's genome identifier, ignored unless Ensembl is specified as the source
:type url_dbkey: str
:param url_dbkey: DB key to use for this build, ignored unless URL is specified as the source
:type source: str
:param source: Data source for this build. Can be: UCSC, Ensembl, NCBI, URL
:type indexers: list
:param indexers: POST array of indexers to run after downloading (indexers[] = first, indexers[] = second, ...)
:type func: str
:param func: Allowed values: 'download', Download and index; 'index', Index only
:rtype: dict
:return: dict( status: 'ok', job: <job ID> )
If error:
dict( status: 'error', error: <error message> )
"""
payload = {}
if source:
payload['source'] = source
if func:
payload['func'] = func
if dbkey:
payload['dbkey'] = dbkey
if ncbi_name:
payload['ncbi_name'] = ncbi_name
if ensembl_dbkey:
payload['ensembl_dbkey'] = ensembl_dbkey
if url_dbkey:
payload['url_dbkey'] = url_dbkey
if indexers:
payload['indexers'] = indexers
return Client._post(self, payload)
|