monarch-initiative / gpsea

A Python library for discovery of genotype-phenotype associations
https://monarch-initiative.github.io/gpsea/stable
MIT License
5 stars 1 forks source link

Possible bug in counting phenotypic features #89

Closed ielis closed 11 months ago

ielis commented 1 year ago

Hi @pnrobinson @lnrekerle

I've been looking at the CohortAnalysis code where we have a function that disregards HPO terms that are observed in less than certain fraction of cohort members and I think there is a bug in the function.

The function does not take into account the indirect annotations that result from the annotation propagation. E.g. for a cohort with 2 samples A and B:

Seizure would be accounted for only once, despite being present in A as well since presence of Focal seizure implies presence of Seizure.

@pnrobinson do you agree that the counters should include the indirect annotations as well?

ielis commented 11 months ago

The count should include the indirect annotations. Fixed.