HpoConceptRecognizer
This abstract class acts as an interface for classes that implement parse_cell to perform HPO-based concept recognition.
Source code in pyphetools/creation/hpo_cr.py
get_term_from_id(hpo_id)
abstractmethod
Parameters:
Name | Type | Description | Default |
---|---|---|---|
hpo_id
|
str
|
an HPO identifier, e.g., HP:0004372 |
required |
Returns:
Type | Description |
---|---|
HpTerm
|
corresponding HPO term |
get_term_from_label(label)
abstractmethod
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label
|
str
|
an HPO label, e.g., Arachnodactyly |
required |
Returns:
Type | Description |
---|---|
HpTerm
|
corresponding HPO term |
initialize_simple_column_maps(column_name_to_hpo_label_map, observed, excluded, non_measured=None)
abstractmethod
parse_cell(cell_contents, custom_d=None)
abstractmethod
parse HPO Terms from the contents of a cell of the original table
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cell_contents
|
str
|
a cell of the original table |
required |
custom_d
|
Dict[str,str], optional
|
a dictionary with keys for strings in the original table and their mappings to HPO labels |
None
|
Source code in pyphetools/creation/hpo_cr.py
parse_cell_for_exact_matches(cell_contents, custom_d)
abstractmethod
Identify HPO Terms from the contents of a cell whose label exactly matches a string in the custom dictionary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cell_contents
|
str
|
a cell of the original table |
required |
custom_d
|
Dict[str,str]
|
a dictionary with keys for strings in the original table and their mappings to HPO labels |
required |