Package ete2 :: Package phylomedb :: Module phylomeDB :: Class PhylomeDBConnector
[hide private]
[frames] | no frames]

Class PhylomeDBConnector

source code

object --+
         |
        PhylomeDBConnector

Reuturns a connector to a phylomeDB database.

ARGUMENTS:

host: hostname in which phylomeDB is hosted. user: username to the database. passwd: password to connect database. port: port used to connect database.

RETURNS:

An object whose methods can be used to query the database.

Instance Methods [hide private]
 
__init__(self, host='84.88.66.245', db='phylomeDB', user='public', passwd='public', port=3306)
Connects to a phylomeDB database and returns an object to perform custom queries on it.
source code
 
_execute_block(self, cmd)
Executes a multi-line SQL command and returns the nombre of affected rows.
source code
 
get_longest_isoform(self, phyID)
returns the protID of the
source code
 
get_id_by_external(self, external)
Returns the phylomeID of the given external ID
source code
 
get_id_translations(self, seqid)
returns all the registered translations of a given seqid
source code
 
search_id(self, queryID)
Returns a list of phylome protein Ids associated to the given external queryID.
source code
 
get_proteomes(self)
Returns all current available proteomes
source code
 
get_species(self)
Returns all current available species
source code
 
get_phylomes(self)
Returns all current available phylomes
source code
 
get_proteomes_in_phylome(self, phylome_id)
Returns a list of proteomes associated to a given phylome_id
source code
 
get_seqids_in_proteome(self, proteome_id, filter_isoforms=True)
Returns all sequences of a given proteome
source code
 
get_seqs_in_proteome(self, proteome_id, filter_isoforms=True) source code
 
get_proteome_info(self, proteome_id)
Returns all info about a registered proteome
source code
 
get_seqid_info(self, protid)
Returns orginal info about a given protid
source code
 
get_phylome_info(self, phylomeid)
Returns info on a given phylome
source code
 
get_species_info(self, taxid_or_code)
Returns all information on a given species_code
source code
 
get_seed_ids(self, phylome_id, filter_isoforms=True) source code
 
get_collateral_seeds(self, seqid) source code
 
get_available_trees(self, seqid, collateral=True) source code
 
get_available_trees_by_phylome(self, seqid, collateral=True) source code
 
get_available_trees_in_phylome(self, seqid, phylomeid) source code
 
get_tree(self, protid, method, phylome_id)
Returns the method-tree associated to a given protid.
source code
 
get_best_tree(self, protid, phylome_id)
Returns the winner ML tree
source code
 
get_algs(self, protid, phylome_id)
Given a protID, it returns a tuple with the raw_alg, clean_alg and the number of seqs included.
source code
 
get_raw_alg(self, protid, phylome_id)
Given a protID, it returns a tuple with the raw_alg and the number of seqs included.
source code
 
get_clean_alg(self, protid, phylome_id)
Given a protID, it returns a tuple with the clean_alg and the number of seqs included.
source code
 
get_phylome_trees(self, phylomeid) source code
 
get_phylome_algs(self, phylomeid) source code
 
count_trees(self, phylomeid) source code
 
count_algs(self, phylomeid) source code
 
get_orthologs(self, seqid, sp2age=None)
Returns the orthology predictions of the given seqid in all phylomes.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, host='84.88.66.245', db='phylomeDB', user='public', passwd='public', port=3306)
(Constructor)

source code 

Connects to a phylomeDB database and returns an object to perform custom queries on it.

Overrides: object.__init__

search_id(self, queryID)

source code 

Returns a list of phylome protein Ids associated to the given external queryID. If queryID is a phylomeDB id, it returns the longest isoform associated to the queryID's gene

get_orthologs(self, seqid, sp2age=None)

source code 
Returns the orthology predictions of the given seqid in all
phylomes.

Only seed trees will be used to detect orthologies, and trees will
be rooted as the default policy defined in the API. If phylome has
an asociated dictionary of species ages,
root_to_farthest_oldest_leaf algorithm will be applied. Otherwise,
midpoint is used.

You can also provide your own species age dictionary to force the
rooting of the trees according to such data.


ARGUMENTS:
==========

 seqid: the ID of a sequence in the phylomeDB format.
  i.e. Hsa0000001

 sp2age: a dictionary of species code ages (key=species_code,
  value=age).  i.e. {"Hsa":1, "Dme":4, "Ath":10}

RETURNS:
=========

A dictionary of orthologs and inparalogs found in each scanned
phylomes.