Annotations
- class emdb.models.annotations.AlphaFoldDBAnnotation(*, id: str, sample_id: str, provenance: str)[source]
Bases:
EMDBBaseAnnotation- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class emdb.models.annotations.CathAnnotation(*, id: str, sample_id: str, provenance: str, start: int, end: int)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) CathAnnotation[source]
Create a CathAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of CathAnnotation.
- end: int
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start: int
- class emdb.models.annotations.ChEBIAnnotation(*, id: str, sample_id: str, provenance: str, title: str | None = None)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) ChEBIAnnotation[source]
Create a ChEBIAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of ChEBIAnnotation.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str | None
- class emdb.models.annotations.ChEMBLAnnotation(*, id: str, sample_id: str, provenance: str, title: str | None = None)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) ChEMBLAnnotation[source]
Create a ChEMBLAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of ChEMBLAnnotation.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str | None
- class emdb.models.annotations.ComplexPortalAnnotation(*, id: str, sample_id: str, provenance: str, title: str | None = None, score: float)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) ComplexPortalAnnotation[source]
Create a ComplexPortalAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of ComplexPortalAnnotation.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- score: float
- title: str | None
- class emdb.models.annotations.DrugBankAnnotation(*, id: str, sample_id: str, provenance: str, title: str | None = None)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) DrugBankAnnotation[source]
Create a DrugBankAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of DrugBankAnnotation.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str | None
- class emdb.models.annotations.EMDBAnnotations(*, emdb_id: str, macromolecules: List[EMDBMacromoleculeSample] = [], supramolecules: List[EMDBSupramoleculeSample] = [], orcid: List[ORCIDAnnotation] | None = None, empiar: List[EMPIARAnnotation] | None = None, pdb: List[PDBAnnotation] | None = None)[source]
Bases:
BaseModelModel for EMDB annotations. This model is used to store annotations related to an EMDB entry.
- classmethod from_api(data: dict, client: EMDB) EMDBAnnotations[source]
Create an EMDBAnnotations instance from API data.
- Parameters:
data – The data returned by the EMDB API.
client – The EMDB client instance used to make the API request.
- Returns:
An instance of EMDBAnnotations.
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- emdb_id: str
- empiar: List[EMPIARAnnotation] | None
- macromolecules: List[EMDBMacromoleculeSample]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- orcid: List[ORCIDAnnotation] | None
- pdb: List[PDBAnnotation] | None
- supramolecules: List[EMDBSupramoleculeSample]
- class emdb.models.annotations.EMDBBaseAnnotation(*, id: str, sample_id: str, provenance: str)[source]
Bases:
BaseModelBase model for EMDB annotations. This model is used to represent a generic annotation in EMDB.
- classmethod from_api(data: dict, sample_id: str) EMDBBaseAnnotation[source]
- id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- provenance: str
- sample_id: str
- class emdb.models.annotations.EMDBMacromoleculeSample(*, id: int, type: str, uniprot: List[UniProtAnnotation] = [], pfam: List[PfamAnnotation] = [], interpro: List[InterProAnnotation] = [], gene_ontology: List[GeneOntologyAnnotation] = [], gene_ontology_cell: List[GeneOntologyAnnotation] = [], gene_ontology_process: List[GeneOntologyAnnotation] = [], gene_ontology_function: List[GeneOntologyAnnotation] = [], cath: List[CathAnnotation] = [], chebi: List[ChEBIAnnotation] = [], chembl: List[ChEMBLAnnotation] = [], drugbank: List[DrugBankAnnotation] = [], pdbekb: List[PDBeKbAnnotation] = [], alphafolddb: List[AlphaFoldDBAnnotation] = [], scop2: List[Scop2Annotation] = [])[source]
Bases:
BaseModelModel for macromolecule sample in EMDB annotations. This model is used to represent a macromolecule sample in EMDB annotations.
- classmethod from_api(data: dict, mol_id: str) EMDBMacromoleculeSample[source]
Create an EMDBMacromoleculeSample instance from API data.
- Parameters:
mol_id – Macromolecule ID. The same ID is used in the EMDB sample.
data – The data returned by the EMDB API.
- Returns:
An instance of EMDBMacromoleculeSample.
- alphafolddb: List[AlphaFoldDBAnnotation]
- cath: List[CathAnnotation]
- chebi: List[ChEBIAnnotation]
- chembl: List[ChEMBLAnnotation]
- drugbank: List[DrugBankAnnotation]
- gene_ontology: List[GeneOntologyAnnotation]
- gene_ontology_cell: List[GeneOntologyAnnotation]
- gene_ontology_function: List[GeneOntologyAnnotation]
- gene_ontology_process: List[GeneOntologyAnnotation]
- id: int
- interpro: List[InterProAnnotation]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pdbekb: List[PDBeKbAnnotation]
- pfam: List[PfamAnnotation]
- scop2: List[Scop2Annotation]
- type: str
- uniprot: List[UniProtAnnotation]
- class emdb.models.annotations.EMDBSupramoleculeSample(*, id: int, type: str, complex_portal: List[ComplexPortalAnnotation] | None = None)[source]
Bases:
BaseModelModel for supramolecule in EMDB annotations. This model is used to represent a supramolecule in EMDB annotations.
- classmethod from_api(data: dict, mol_id: str) EMDBSupramoleculeSample[source]
Create an EMDBSupramolecule instance from API data.
- Parameters:
mol_id – Supramolecule ID. The same ID is used in the EMDB sample.
data – The data returned by the EMDB API.
- Returns:
An instance of EMDBSupramolecule.
- complex_portal: List[ComplexPortalAnnotation] | None
- id: int
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: str
- class emdb.models.annotations.EMPIARAnnotation(*, id: str, sample_id: str, provenance: str)[source]
Bases:
EMDBBaseAnnotation- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class emdb.models.annotations.GeneOntologyAnnotation(*, id: str, sample_id: str, provenance: str, title: str | None = None, type: str)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) GeneOntologyAnnotation[source]
Create a GeneOntologyAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of GeneOntologyAnnotation.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str | None
- type: str
- class emdb.models.annotations.InterProAnnotation(*, id: str, sample_id: str, provenance: str, title: str | None = None, start: int, end: int)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) InterProAnnotation[source]
Create an InterProAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of InterProAnnotation.
- end: int
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start: int
- title: str | None
- class emdb.models.annotations.ORCIDAnnotation(*, id: str, sample_id: str, provenance: str, title: str | None = None)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) ORCIDAnnotation[source]
Create an ORCIDAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of ORCIDAnnotation.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str | None
- class emdb.models.annotations.PDBAnnotation(*, id: str, sample_id: str, provenance: str)[source]
Bases:
EMDBBaseAnnotation- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class emdb.models.annotations.PDBeKbAnnotation(*, id: str, sample_id: str, provenance: str)[source]
Bases:
EMDBBaseAnnotation- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class emdb.models.annotations.PfamAnnotation(*, id: str, sample_id: str, provenance: str, title: str | None = None, start: int, end: int)[source]
Bases:
EMDBBaseAnnotation- classmethod from_api(data: dict, sample_id: str) PfamAnnotation[source]
Create a PfamAnnotation instance from API data.
- Parameters:
sample_id – The sample ID associated with the annotation.
data – The data returned by the EMDB API.
- Returns:
An instance of PfamAnnotation.
- end: int
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start: int
- title: str | None
- class emdb.models.annotations.Scop2Annotation(*, id: str, sample_id: str, provenance: str)[source]
Bases:
EMDBBaseAnnotation- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class emdb.models.annotations.UniProtAnnotation(*, id: str, sample_id: str, provenance: str)[source]
Bases:
EMDBBaseAnnotation- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].