chado.phylogeny package

Module contents

Contains possible interactions with the Chado Phylogeny Module http://gmod.org/wiki/Chado_Phylogeny_Module As implemented in https://github.com/legumeinfo/tripal_phylotree and https://github.com/legumeinfo/lis_context_viewer/

class chado.phylogeny.PhylogenyClient(engine, metadata, session, ci)

Bases: chado.client.Client

Access to the chado phylogeny content

add_cvterms()

Make sure required cvterms are loaded

Return type:list of dict
Returns:created cvterms
gene_families(family_name='', nuke=False)

Adds an entry in the featureprop table in a chado database for each family a gene belongs to (for use in https://github.com/legumeinfo/lis_context_viewer/).

Parameters:
  • family_name (str) – Restrict to families beginning with given prefix
  • nuke (bool) – Removes all previous gene families data
Return type:

None

Returns:

None

gene_order(nuke=False)

Orders all the genes in the database by their order on their respective chromosomes in the gene_order table (for use in https://github.com/legumeinfo/lis_context_viewer/).

Parameters:nuke (bool) – Removes all previous gene ordering data
Return type:None
Returns:None
load_tree(newick, analysis_id, name=None, xref_db='null', xref_accession=None, match_on_name=False, prefix='')

Load a phylogenetic tree (Newick format) into Chado db

Parameters:
  • newick (str) – Newick file to load (or directory containing multiple newick files to load)
  • analysis_id (int) – Analysis ID
  • name (str) – The name given to the phylotree entry in the database (default=<filename>)
  • xref_db (str) – The name of the db to link dbxrefs for the trees (default: “null”)
  • xref_accession (str) – The accession to use for dbxrefs for the trees (assumed same as name unless otherwise specified)
  • match_on_name (bool) – Match polypeptide features using their name instead of their uniquename
  • prefix (str) – Comma-separated list of prefix to be removed from identifiers (e.g species prefixes when loading OrthoFinder output)
Return type:

dict

Returns:

Number of inserted trees