disease.schemas#

Contains data models for representing VICC normalized disease records.

class disease.schemas.DataLicenseAttributes(**data)[source]#

Define constraints for data license attributes.

attribution: Annotated[bool][source]#
non_commercial: Annotated[bool][source]#
share_alike: Annotated[bool][source]#
class disease.schemas.Disease(**data)[source]#

Define disease record.

aliases: list[Annotated[str]][source]#
associated_with: list[Annotated[str]][source]#
concept_id: Annotated[str][source]#
label: Annotated[str][source]#
oncologic_disease: Optional[bool][source]#
pediatric_disease: Optional[bool][source]#
xrefs: list[Annotated[str]][source]#
class disease.schemas.MatchType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Define string constraints for use in Match Type attributes.

ALIAS = 60[source]#
ASSOCIATED_WITH = 60[source]#
CONCEPT_ID = 100[source]#
FUZZY_MATCH = 20[source]#
LABEL = 80[source]#
NO_MATCH = 0[source]#
XREF = 60[source]#
class disease.schemas.NamespacePrefix(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Define string constraints for how concept ID namespace prefixes are stored.

DO = 'DOID'[source]#
DOID = 'DOID'[source]#
EFO = 'efo'[source]#
GARD = 'gard'[source]#
ICD10 = 'icd10'[source]#
ICD10CM = 'icd10.cm'[source]#
ICD10WHO = 'icd10'[source]#
ICD9CM = 'icd9.cm'[source]#
ICDO = 'icdo'[source]#
IMDRF = 'imdrf'[source]#
KEGG = 'kegg.disease'[source]#
MEDDRA = 'meddra'[source]#
MEDGEN = 'medgen'[source]#
MESH = 'mesh'[source]#
MONDO = 'mondo'[source]#
NCIT = 'ncit'[source]#
OMIM = 'MIM'[source]#
ONCOTREE = 'oncotree'[source]#
ORPHANET = 'orphanet'[source]#
UMLS = 'umls'[source]#
class disease.schemas.NormalizationService(**data)[source]#

Response containing one or more merged records and source data.

disease: Optional[MappableConcept][source]#
match_type: MatchType[source]#
query: Annotated[str][source]#
service_meta_: ServiceMeta[source]#
source_meta_: Optional[dict[SourceName, SourceMeta]][source]#
warnings: Optional[dict][source]#
class disease.schemas.RecordType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Record item types.

IDENTITY = 'identity'[source]#
MERGER = 'merger'[source]#
class disease.schemas.RefType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Reference item types.

ALIASES = 'alias'[source]#
ASSOCIATED_WITH = 'associated_with'[source]#
LABEL = 'label'[source]#
XREFS = 'xref'[source]#
class disease.schemas.SearchService(**data)[source]#

Core response schema containing matches for each source

query: Annotated[str][source]#
service_meta_: ServiceMeta[source]#
source_matches: dict[SourceName, SourceSearchMatches][source]#
warnings: Optional[dict][source]#
class disease.schemas.ServiceEnvironment(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Define current runtime environment.

DEV = 'dev'[source]#
PROD = 'prod'[source]#
STAGING = 'staging'[source]#
TEST = 'test'[source]#
class disease.schemas.ServiceInfo(**data)[source]#

Define response structure for GA4GH /service_info endpoint.

contactUrl: Literal['Alex.Wagner@nationwidechildrens.org'][source]#
createdAt: Literal['2021-01-01T00:00:00+00:00'][source]#
description: Literal['Resolve ambiguous references and descriptions of human diseases to consistently-structured, normalized terms'][source]#
documentationUrl: Literal['https://disease-normalizer.readthedocs.io/'][source]#
environment: ServiceEnvironment[source]#
id: Literal['org.genomicmedlab.disease_normalizer'][source]#
name: Literal['disease_normalizer'][source]#
organization: ServiceOrganization[source]#
type: ServiceType[source]#
updatedAt: Literal['2021-01-01T00:00:00+00:00'][source]#
version: Literal['0.11.3'][source]#
class disease.schemas.ServiceMeta(**data)[source]#

Metadata regarding the disease-normalization service.

name: Literal['disease-normalizer'][source]#
response_datetime: datetime[source]#
url: Literal['https://github.com/cancervariants/disease-normalization'][source]#
version: Annotated[str][source]#
class disease.schemas.ServiceOrganization(**data)[source]#

Define service_info response for organization field

name: Literal["Genomic Medicine Lab at Nationwide Children's Hospital"][source]#
url: Literal['https://www.nationwidechildrens.org/specialties/institute-for-genomic-medicine/research-labs/wagner-lab'][source]#
class disease.schemas.ServiceType(**data)[source]#

Define service_info response for type field

artifact: Literal['Disease Normalizer API'][source]#
group: Literal['org.genomicmedlab'][source]#
version: Literal['0.11.3'][source]#
class disease.schemas.SourceIDAfterNamespace(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Define string constraints after namespace.

DO = ''[source]#
MONDO = ''[source]#
NCIT = 'C'[source]#
OMIM = ''[source]#
ONCOTREE = ''[source]#
class disease.schemas.SourceMeta(**data)[source]#

Metadata for a given source to return in response object.

data_license: Annotated[str][source]#
data_license_attributes: DataLicenseAttributes[source]#
data_license_url: Annotated[str][source]#
data_url: Optional[Annotated[str]][source]#
rdp_url: Optional[Annotated[str]][source]#
version: Annotated[str][source]#
class disease.schemas.SourceName(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Define string constraints to ensure consistent capitalization.

DO = 'DO'[source]#
MONDO = 'Mondo'[source]#
NCIT = 'NCIt'[source]#
OMIM = 'OMIM'[source]#
ONCOTREE = 'OncoTree'[source]#
class disease.schemas.SourcePriority(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Define priorities for sources in building merged concepts.

DO = 5[source]#
MONDO = 2[source]#
NCIT = 1[source]#
OMIM = 3[source]#
ONCOTREE = 4[source]#
class disease.schemas.SourceSearchMatches(**data)[source]#

Container for matching information from an individual source.

match_type: MatchType[source]#
records: list[Disease][source]#
source_meta_: SourceMeta[source]#
disease.schemas.get_coding_object(concept_id)[source]#

Get coding object for CURIE identifier

system will use system prefix URL, OBO Foundry persistent URL (PURL), or source homepage, in that order of preference.

Parameters:

concept_id (str) – A lowercase concept identifier represented as a curie

Raises:

ValueError – If source of concept ID is not a valid NamespacePrefix

Return type:

Coding

Returns:

Coding object for identifier

disease.schemas.get_concept_mapping(concept_id, relation=Relation.RELATED_MATCH)[source]#

Get concept mapping for CURIE identifier

Parameters:
  • concept_id (str) – A lowercase concept identifier represented as a curie

  • relation (Relation) – SKOS mapping relationship, default is relatedMatch

Return type:

ConceptMapping

Returns:

Concept mapping for identifier