List of all members.
Detailed Description
Attributes:
.. attribute:: url
GenRep url ('genrep.epfl.ch').
.. attribute:: root
Path to GenRep indexes.
Member Function Documentation
def bbcflib::genrep::GenRep::__init__ |
( |
|
self, |
|
|
|
url = None , |
|
|
|
root = None , |
|
|
|
config = None , |
|
|
|
section = 'genrep' | |
|
) |
| | |
Create an object to query a GenRep repository.
GenRep is the in-house repository for sequence assemblies for the
BBCF in Lausanne. This is an object that wraps its use in Python
in an idiomatic way.
Create a GenRep object with the base URL to the GenRep system, and
the root path of GenRep's files. For instance::
g = GenRep('genrep.epfl.ch', '/path/to/genrep/indices')
To get an assembly from the repository, call the assembly
method with either the integer assembly ID or the string assembly
name. This returns an Assembly object::
a = g.assembly(3)
b = g.assembly('mm9')
You can also pass this to the Assembly call directly::
a = Assembly(assembly='mm9',genrep=g)
def bbcflib::genrep::GenRep::assemblies_available |
( |
|
self, |
|
|
|
assembly = None | |
|
) |
| | |
Return a list of assemblies available on genrep, or tells if an
assembly with name *assembly* is available.
def bbcflib::genrep::GenRep::assembly |
( |
|
self, |
|
|
|
assembly, |
|
|
|
intype = 0 | |
|
) |
| | |
def bbcflib::genrep::GenRep::get_genrep_objects |
( |
|
self, |
|
|
|
url_tag, |
|
|
|
info_tag, |
|
|
|
filters = None , |
|
|
|
params = None | |
|
) |
| | |
Get a list of GenRep objets.
:param url_tag: the GenrepObject type (plural)
:param info_tag: the GenrepObject type (singular)
:param filters: a dict that is used to filter the response
:param params: to add some parameters to the query from GenRep.
Example:
To get the genomes related to 'Mycobacterium leprae' species::
species = get_genrep_objects('organisms', 'organism', {'species':'Mycobacterium leprae'})[0]
genomes = get_genrep_objects('genomes', 'genome', {'organism_id':species.id})
def bbcflib::genrep::GenRep::get_sequence |
( |
|
self, |
|
|
|
chr_id, |
|
|
|
coord_list, |
|
|
|
path_to_ref = None | |
|
) |
| | |
Parse a slice request to the repository.
:param chr_id: (int) chromosome number (keys of Assembly.chromosomes).
:param coord_list: (list of (int,int)) sequences' (start,end) coordinates.
:param path_to_ref: (str) path to a fasta file containing the whole reference sequence.
def bbcflib::genrep::GenRep::is_up |
( |
|
self |
) |
|
Check if genrep webservice is available
The documentation for this class was generated from the following file:
- /home/rougemon/Data/pipelines/libv2/bbcflib/bbcflib/genrep.py