chado package¶
Subpackages¶
Submodules¶
chado.client module¶
Base chado client
-
class
chado.client.
Client
(engine, metadata, session, ci)¶ Bases:
object
Base client class implementing methods to make queries to the server
chado.exceptions module¶
-
exception
chado.exceptions.
RecordNotFoundError
¶ Bases:
Exception
Raised when a db select failed.
chado.util module¶
-
class
chado.util.
UtilClient
(engine, metadata, session, ci)¶ Bases:
chado.client.Client
Some chado utilities
-
dbshell
()¶ Open a psql session to the database
Return type: None Returns: None
-
launch_docker_image
(background=False, no_yeast=False)¶ Launch a chado docker image.
Parameters: - background (bool) – Launch the image in the background
- no_yeast (bool) – Disable loading of example yeast data
Return type: None
Returns: None
-
Module contents¶
-
class
chado.
ChadoInstance
(dbhost='localhost', dbname='chado', dbuser='chado', dbpass='chado', dbschema='public', dbport=5432, dburl=None, offline=False, no_reflect=False, reflect_tripal_tables=False, pool_connections=True, **kwargs)¶ Bases:
object
-
create_cvterm
(term, cv_name, db_name, term_definition='', cv_definition='', db_definition='', accession='')¶
-
get_cvterm_id
(name, cv, allow_synonyms=False)¶ get_cvterm_id allows lookup of CV terms by their name. This method caches the result in order to not hit the DB for every query. Maybe should investigate pre-loading popular terms? (E.g. gene, mRNA, etc)
-
get_cvterm_name
(cv_id)¶ get_cvterm_name allows lookup of CV terms by their ID. This method caches the result in order to not hit the DB for every query. Maybe should investigate pre-loading popular terms? (E.g. gene, mRNA, etc)
-
get_pub_id
(name)¶ Allows lookup of publication by their uniquename. This method caches the result in order to not hit the DB for every query.
-
-
class
chado.
ChadoModel
¶ Bases:
object