Open pnrobinson opened 1 month ago
Yeah, this could be turned into a free function that uses CohortViewable
(CohortSummaryViewer
would be a better name) under the hood.
So, instead of exporting CohortViewable
from gpsea.view
, there should be a function
def summarize_cohort(cohort: Cohort, hpo: hpotk.MinimalOntology, tx_id: str) -> str:
# Implement!
pass
which we should use as
from gpsea.view import summarize_cohort
summary = summarize_cohort(cohort, hpo, tx_id=POLR1A_MANE_transcript)
display(HTML(summary))
Currently, we have this:
but the
report
object is only used here. We could simplify the API by allowing something like this:It would be great to reduce the number of lines of code for the Notebooks in general, this would help users!