Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add disease_context_qualifier to model and regenerate artifacts #850

Merged
merged 5 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
type check fixes
kevinschaper committed Oct 17, 2024
commit faa58d9b75eeab42ca223163e6dd0cc011ece91c
2 changes: 1 addition & 1 deletion frontend/src/api/phenotype-explorer.ts
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ export const getPhenotypes = async (search = ""): ReturnType<OptionsFunc> => {
* if gene/disease, provide function to get associated phenotypes upon
* select
*/
item.category.startsWith("biolink:Pheno")
item.category?.startsWith("biolink:Pheno")
? undefined
: async () => await getPhenotypeAssociations(item.id),
highlight: item.highlight,
2 changes: 1 addition & 1 deletion frontend/src/pages/explore/TabSearch.vue
Original file line number Diff line number Diff line change
@@ -240,7 +240,7 @@ async function runGetAutocomplete(
viewAll,
...(await getAutocomplete(search)).items.map((item) => ({
id: item.id,
label: item.name,
label: item.name || "",
info: item.in_taxon_label || item.id,
icon: getCategoryIcon(item.category),
tooltip: "",

Unchanged files with check annotations Beta

return parse_entity(solr_document)
# Get extra data (this logic is very tricky to test because of the calls to Solr)
entity = Entity(**solr_document)
entity.uri = get_uri(entity.id)
if "biolink:Disease" == entity.category:

Check warning on line 98 in backend/src/monarch_py/implementations/solr/solr_implementation.py

Codecov / codecov/patch

backend/src/monarch_py/implementations/solr/solr_implementation.py#L96-L98

Added lines #L96 - L98 were not covered by tests
# Get mode of inheritance
mode_of_inheritance_associations = self.get_associations(
subject=id, predicate=[AssociationPredicate.HAS_MODE_OF_INHERITANCE], direct=True, offset=0
)
if mode_of_inheritance_associations is not None and len(mode_of_inheritance_associations.items) == 1:
entity.inheritance = self._get_counterpart_entity(mode_of_inheritance_associations.items[0], entity)

Check warning on line 104 in backend/src/monarch_py/implementations/solr/solr_implementation.py

Codecov / codecov/patch

backend/src/monarch_py/implementations/solr/solr_implementation.py#L104

Added line #L104 was not covered by tests
# Get causal gene
entity.causal_gene = [

Check warning on line 106 in backend/src/monarch_py/implementations/solr/solr_implementation.py

Codecov / codecov/patch

backend/src/monarch_py/implementations/solr/solr_implementation.py#L106

Added line #L106 was not covered by tests
self._get_counterpart_entity(association, entity)
for association in self.get_associations(
object=id,
category=[AssociationCategory.CAUSAL_GENE_TO_DISEASE_ASSOCIATION],
).items
]
if "biolink:Gene" == entity.category:
entity.causes_disease = [

Check warning on line 116 in backend/src/monarch_py/implementations/solr/solr_implementation.py

Codecov / codecov/patch

backend/src/monarch_py/implementations/solr/solr_implementation.py#L115-L116

Added lines #L115 - L116 were not covered by tests
self._get_counterpart_entity(association, entity)
for association in self.get_associations(
subject=id,
category=[AssociationCategory.CAUSAL_GENE_TO_DISEASE_ASSOCIATION],
).items
]
node: Node = Node(

Check warning on line 125 in backend/src/monarch_py/implementations/solr/solr_implementation.py

Codecov / codecov/patch

backend/src/monarch_py/implementations/solr/solr_implementation.py#L125

Added line #L125 was not covered by tests
**entity.dict(),
node_hierarchy=self._get_node_hierarchy(entity),
association_counts=self.get_association_counts(id).items,