curategpt.wrappers.clinical package

Submodules

curategpt.wrappers.clinical.clinvar_wrapper module

EUtils-based wrapper for studies in NCBI.

class curategpt.wrappers.clinical.clinvar_wrapper.ClinVarWrapper(source_locator=None, local_store=None, extractor=None, eutils_client=None, session=<factory>, _uses_cache=False)

Bases: EUtilsWrapper

A wrapper to provide a search facade over NCBI clinvar.

This is a dynamic wrapper: it can be used as a search facade, but cannot be ingested in whole.

default_object_type = 'Variant'
eutils_db: ClassVar[str] = 'clinvar'
fetch_tool: ClassVar[str] = 'esummary'
id_prefix: ClassVar[str] = 'ClinVar'
name: ClassVar[str] = 'clinvar'
objects_from_dict(results)
Return type:

List[Dict]

curategpt.wrappers.clinical.ctgov_wrapper module

Wrapper for ClinicalTrials.gov API.

class curategpt.wrappers.clinical.ctgov_wrapper.ClinicalTrialsWrapper(source_locator=None, local_store=None, extractor=None, _label_adapter=None, session=<factory>, where=None, _uses_cache=False)

Bases: BaseWrapper

A wrapper over a clinicaltrials.gov.

default_object_type = 'ClinicalTrial'

Search an external source and return the results.

Parameters:
  • text (str)

  • kwargs

Return type:

List

Returns:

name: ClassVar[str] = 'ctgov'
objects_from_list(input_objs)
Return type:

List[Dict]

session: Session
set_cache(name)
Return type:

None

where: Optional[Dict] = None

curategpt.wrappers.clinical.hpoa_by_pub_wrapper module

Wrapper for grouping Human Phenotype Ontology annotations by publication

class curategpt.wrappers.clinical.hpoa_by_pub_wrapper.HPOAByPubWrapper(source_locator=None, local_store=None, extractor=None, expand_publications=True, _label_adapter=None, pubmed_wrapper=None, group_by_publication=True, **_kwargs)

Bases: HPOAWrapper

A wrapper over HPOA grouping by publication

default_object_type = 'Publication'
group_by_publication: bool = True
name: ClassVar[str] = 'hpoa_by_pub'

curategpt.wrappers.clinical.hpoa_wrapper module

Wrapper for Human Phenotype Ontology annotations

class curategpt.wrappers.clinical.hpoa_wrapper.HPOAWrapper(source_locator=None, local_store=None, extractor=None, expand_publications=True, _label_adapter=None, pubmed_wrapper=None, group_by_publication=False, **_kwargs)

Bases: BaseWrapper

A wrapper over HPOA

default_object_type = 'DiseasePhenotypeAssociation'
expand_publications: bool = True
group_by_publication: bool = False
name: ClassVar[str] = 'hpoa'
objects(collection=None, object_ids=None, url=None, **kwargs)

Return all objects in the view.

Parameters:
  • collection (Optional[str])

  • object_ids (Optional[Iterable[str]]) – Optional list of IDs to fetch

  • kwargs

Return type:

Iterator[Dict]

Returns:

objects_from_file(file)
Return type:

Iterator[Dict]

objects_from_rows(rows)
Return type:

Iterator[Dict]

pubmed_wrapper: PubmedWrapper = None
source_url: ClassVar[str] = 'http://purl.obolibrary.org/obo/hp/hpoa/phenotype.hpoa'
curategpt.wrappers.clinical.hpoa_wrapper.filter_header(row)
Return type:

bool

curategpt.wrappers.clinical.hpoa_wrapper.hpo_ont_adapter()
curategpt.wrappers.clinical.hpoa_wrapper.stream_filtered_lines(response)

Generator to yield non-comment lines from a streaming response.

curategpt.wrappers.clinical.hpoa_wrapper.term_label(identifier)
Return type:

str

curategpt.wrappers.clinical.maxoa_wrapper module

Wrapper for Medical Action Ontology (MAXO) annotations

class curategpt.wrappers.clinical.maxoa_wrapper.MAXOAWrapper(source_locator=None, local_store=None, extractor=None, expand_publications=True, _label_adapter=None, pubmed_wrapper=None, group_by_publication=True, **_kwargs)

Bases: BaseWrapper

A wrapper over HPOA

default_object_type = 'DiseaseTreatmentAssociation'
expand_publications: bool = True
group_by_publication: bool = True
name: ClassVar[str] = 'maxoa'
objects(collection=None, object_ids=None, source_locator=None, **kwargs)

Return all objects in the view.

Parameters:
  • collection (Optional[str])

  • object_ids (Optional[Iterable[str]]) – Optional list of IDs to fetch

  • kwargs

Return type:

Iterator[Dict]

Returns:

objects_from_file(file)
Return type:

Iterator[Dict]

objects_from_rows(rows)
Return type:

Iterator[Dict]

pubmed_wrapper: PubmedWrapper = None
source_url: ClassVar[str] = 'https://raw.githubusercontent.com/monarch-initiative/maxo-annotations/master/annotations/maxo-annotations.tsv'
curategpt.wrappers.clinical.maxoa_wrapper.filter_header(row)
Return type:

bool

curategpt.wrappers.clinical.maxoa_wrapper.hpo_ont_adapter()
curategpt.wrappers.clinical.maxoa_wrapper.maxo_ont_adapter()
curategpt.wrappers.clinical.maxoa_wrapper.stream_filtered_lines(response)

Generator to yield non-comment lines from a streaming response.

curategpt.wrappers.clinical.maxoa_wrapper.term_label(identifier)
Return type:

str

Module contents