chado.expression package¶
Module contents¶
Contains possible interactions with the Chado base for expressions and biomaterials
-
class
chado.expression.
ExpressionClient
(engine, metadata, session, ci)¶ Bases:
chado.client.Client
Interact with expressions
-
add_biomaterial
(biomaterial_name, organism_id, description='', biomaterial_provider='', biosample_accession='', sra_accession='', bioproject_accession='', attributes={})¶ Add a new biomaterial to the database
Parameters: - biomaterial_name (str) – Biomaterial name
- organism_id (int) – The id of the associated organism
- description (str) – Description of the biomaterial
- biomaterial_provider (str) – Biomaterial provider name
- biosample_accession (str) – Biosample accession number
- sra_accession (str) – SRA accession number
- bioproject_accession (str) – Bioproject accession number
- attributes (str) – Custom attributes (In JSON dict form)
Return type: dict
Returns: Biomaterial details
-
add_expression
(organism_id, analysis_id, file_path, separator='\t', unit=None, query_type='mRNA', match_on_name=False, re_name=None, skip_missing=False)¶ Add an expression matrix file to the database
Parameters: - organism_id (int) – The id of the associated organism
- analysis_id (int) – The id of the associated analysis
- file_path (str) – File path
- separator (str) – Separating character in the matrix file (ex : ‘,’). Default character is tab.
- unit (str) – The units associated with the loaded values (ie, FPKM, RPKM, raw counts)
- query_type (str) – The feature type (e.g. ‘gene’, ‘mRNA’, ‘polypeptide’, ‘contig’) of the query. It must be a valid Sequence Ontology term.
- match_on_name (bool) – Match features using their name instead of their uniquename
- re_name (str) – Regular expression to extract the feature name from the input file (first capturing group will be used).
- skip_missing (bool) – Skip lines with unknown features or GO id instead of aborting everything.
Return type: str
Returns: Number of expression data loaded
-
delete_all_biomaterials
(confirm=False)¶ Delete all biomaterials
Parameters: confirm (bool) – Confirm that you really do want to delete ALL of the biomaterials. Return type: None Returns: None
-
delete_biomaterials
(names=None, ids=None, organism_id='', analysis_id='')¶ Will delete biomaterials based on selector. Only one selector will be used.
Parameters: - names (str) – JSON list of biomaterial names to delete.
- ids (str) – JSON list of biomaterial ids to delete.
- organism_id (int) – Delete all biomaterial associated with this organism id.
- analysis_id (int) – Delete all biomaterial associated with this analysis id.
Return type: str
Returns: Number of deleted biomaterials
-
get_biomaterials
(provider_id='', biomaterial_id='', organism_id='', biomaterial_name='', analysis_id='')¶ List biomaterials in the database
Parameters: - organism_id (int) – Limit query to the selected organism
- biomaterial_id (int) – Limit query to the selected biomaterial id
- provider_id (int) – Limit query to the selected provider
- biomaterial_name (str) – Limit query to the selected biomaterial name
- analysis_id (int) – Limit query to the selected analysis_id
Return type: list
Returns: List of biomaterials
-