genomic_features.ensembl.EnsemblDB#
- class genomic_features.ensembl.EnsemblDB(connection)#
Ensembl annotation database.
Attributes table#
Metadata for the database as a dict (e.g. who built it, when, with what resource). |
Methods table#
Get chromosome information (seq_name, length, etc.). |
|
|
Get exons table. |
|
Get gene annotations. |
|
List queryable columns available in these tables. |
List all tables available in the genomic features database. |
|
|
Get transcript annotations. |
Attributes#
- EnsemblDB.metadata#
Metadata for the database as a dict (e.g. who built it, when, with what resource).
Methods#
- EnsemblDB.chromosomes()#
Get chromosome information (seq_name, length, etc.).
- Return type:
Usage#
>>> ensdb.chromosomes()
- EnsemblDB.exons(cols=None, filter=EmptyFilter(), join_type='inner')#
Get exons table.
- Parameters:
cols (
Optional[list[str]] (default:None)) – Which columns to retrieve from the database. Can be from other tables. Returns all exon columns if None.filter (
AbstractFilterExpr(default:EmptyFilter())) – Filter to apply to the query.join_type (
Literal['inner','left'] (default:'inner')) – Type of join to use for the query.
- Return type:
Usage#
>>> ensdb.exons()
- EnsemblDB.genes(cols=None, filter=EmptyFilter(), join_type='inner')#
Get gene annotations.
- Parameters:
cols (
Optional[list[str]] (default:None)) – Which columns to retrieve from the database. Can be from other tables. Returns all gene columns if None.filters – Filters to apply to the query.
join_type (
Literal['inner','left'] (default:'inner')) – How to perform joins during the query (if cols or filters requires them).
- Return type:
Usage#
>>> ensdb.genes(cols=["gene_id", "gene_name", "tx_id"])
- EnsemblDB.list_columns(tables=None)#
List queryable columns available in these tables.
- EnsemblDB.list_tables()#
List all tables available in the genomic features database.
- Return type:
- EnsemblDB.transcripts(cols=None, filter=EmptyFilter(), join_type='inner')#
Get transcript annotations.
- Parameters:
cols (
Optional[list[str]] (default:None)) – Which columns to retrieve from the database. Can be from other tables. Returns all transcript columns if None.filters – Filters to apply to the query.
join_type (
Literal['inner','left'] (default:'inner')) – How to perform joins during the query (if cols or filters requires them).
- Return type:
Usage#
>>> ensdb.transcripts(cols=["tx_id", "tx_name", "gene_id"])