Skip to content

Commit

Permalink
Get source counts and pass to format_stmts
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed Dec 20, 2024
1 parent 7dcdc98 commit 9c181fd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/indra_cogex/apps/data_display/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,24 @@ def get_evidence(stmt_hash):
# Get the evidence counts
ev_counts = {r.data["stmt_hash"]: r.data["evidence_count"] for r in relations}

# Get the source counts
source_counts = {
int(r.data["stmt_hash"]): json.loads(r.data["source_counts"])
for r in relations
}

# Get curations from the curation cache
curations = curation_cache.get_curations(
pa_hash=[int(r.data["stmt_hash"]) for r in relations]
)

# Get the formatted evidence rows
stmt_rows = format_stmts(
stmts=[stmt], evidence_counts=ev_counts, curations=curations
stmts=[stmt],
evidence_counts=ev_counts,
curations=curations,
remove_medscan=remove_medscan,
source_counts_per_hash=source_counts,
)

# Return the evidence json for the statement
Expand Down

0 comments on commit 9c181fd

Please sign in to comment.