bionty.Gene#
- class bionty.Gene(species='human', source=None, version=None, **kwargs)#
Bases:
Bionty
Gene.
1. Ensembl Edits of terms are coordinated and reviewed on: https://www.ensembl.org/
- Parameters:
species –
name
ofSpecies
entity.source – The key of the source in the local.yml versions file. Get all available databases with
bionty.display_available_sources
.version – The version of the ontology. Typically a date or an actual version. Get available versions with
bionty.display_available_sources
.
Notes
Biotypes: https://www.ensembl.org/info/genome/genebuild/biotypes.html Gene Naming: https://www.ensembl.org/info/genome/genebuild/gene_names.html
Attributes
- fields :class:`~<class 'property'>`#
All Bionty entity fields.
- source :class:`~<class 'property'>`#
Name of the source.
- species :class:`~<class 'property'>`#
The
name
ofSpecies
Bionty.
- version :class:`~<class 'property'>`#
The
name
ofversion
entity Bionty.
Methods
- fuzzy_match(string, field='symbol', synonyms_field='synonyms', case_sensitive=True, return_ranked_results=False)#
Fuzzy matching of a given string against a Bionty field.
- Parameters:
string – The input string to match against the field ontology values.
field – The BiontyField of ontology the input string is matching against.
synonyms_field – Also map against in the synonyms (If None, no mapping against synonyms).
case_sensitive – Whether the match is case sensitive.
return_ranked_results – Whether to return all entries ranked by matching ratios.
- Return type:
DataFrame
- Returns:
Best match of the input string.
Examples
>>> import bionty as bt >>> celltype_bionty = bt.CellType() >>> celltype_bionty.fuzzy_match("gamma delta T cell", celltype_bionty.name)
- lookup(field='symbol')#
Return an auto-complete object for the bionty field.
- Parameters:
field – The field to lookup the values for. Defaults to ‘name’.
- Return type:
Tuple
- Returns:
A NamedTuple of lookup information of the field values.
Examples
>>> import bionty as bt >>> gene_lookout = bt.Gene().lookup() >>> gene_lookout.TEF