bionty.Entity#

class bionty.Entity(database, version=None, species=None, *, prefix=None, reference_id=None)#

Bases: object

Biological entity as an Entity.

See Guide for background.

Attributes

database#

Name of the database.

ontology#

The Pronto Ontology object.

species#

The name of Species Entity.

version#

The name of version entity Entity.

Methods

curate(df, column=None, reference_id='ontology_id', case_sensitive=True)#

Curate index of passed DataFrame to conform with default identifier.

  • If target_column is None, checks the existing index for compliance with the default identifier.

  • If target_column denotes an entity identifier, tries to map that identifier to the default identifier.

Parameters:
  • df – The input Pandas DataFrame to curate.

  • column – The column in the passed Pandas DataFrame to curate.

  • reference_id – The reference column in the ontology Pandas DataFrame. ‘Defaults to ontology_id’.

  • case_sensitive – Whether the curation should be case sensitive or not. Defaults to True.

Return type:

DataFrame

Returns:

Returns the DataFrame with the curated index and a boolean __curated__ column that indicates compliance with the default identifier.

df()#

Pandas DataFrame.

Return type:

DataFrame

lookup(field='name')#

Return an auto-complete object for the bionty id.

Return type:

tuple