A lightweight knowledge graph covering all Olink-measurable proteins and their relationships to diseases, drugs, pathways, and competitor platforms. Built entirely from local bioingest data as Parquet files -- no infrastructure required.
erDiagram
Protein ||--o{ Platform : MEASURED_BY
Protein ||--o{ Pathway : PARTICIPATES_IN
Protein ||--o{ Drug : TARGETED_BY
Protein ||--o{ Protein : INTERACTS_WITH
Protein ||--o{ Platform : MEASURED_BY_COMPETITOR
Protein ||--o{ External : SAME_AS
Disease ||--o{ Disease : BROADER_THAN
Disease ||--o{ External : SAME_AS
graph LR
P[Protein<br/>26,498] -->|MEASURED_BY<br/>9,385| OL[Olink Panel]
P -->|PARTICIPATES_IN<br/>53,996| PW[Pathway<br/>2,331]
P -->|TARGETED_BY<br/>26,699| D[Drug<br/>65,169]
P -->|INTERACTS_WITH<br/>196,305| P
P -->|MEASURED_BY_COMPETITOR<br/>2,726| C[Competitor]
DI[Disease<br/>31,884] -->|BROADER_THAN<br/>41,912| DI
P -.->|SAME_AS<br/>60,880| X[External IDs]
frompanel.ontologyimportget_protein_contextctx=get_protein_context("P01375")# TNFprint(ctx["pathways"])# Reactome pathway IDsprint(ctx["drugs"])# Drug IDs targeting TNFprint(ctx["interactions"])# Interacting protein UniProt IDsprint(ctx["olink_panels"])# Which Olink panels measure itprint(ctx["competitors"])# Which competitors measure it
importpandasaspdfrompanel.ontologyimportload_edges,load_protein_nodesedges=load_edges()proteins=load_protein_nodes()# Find all drug targets that are NOT on Olinkdrug_targets=set(edges[edges["rel_type"]=="TARGETED_BY"]["source_id"])olink_proteins=set(proteins[proteins["on_olink"]]["uniprot_id"])gaps=drug_targets-olink_proteinsprint(f"{len(gaps)} drug targets not on any Olink panel")# Find Olink proteins with the most pathway annotationspathway_edges=edges[edges["rel_type"]=="PARTICIPATES_IN"]pathway_counts=pathway_edges["source_id"].value_counts()olink_pathway_counts=pathway_counts[pathway_counts.index.isin(olink_proteins)]print(olink_pathway_counts.head(10))
frompanel.ontologyimportload_edgesedges=load_edges()# Proteins measured by competitors but NOT by Olinkcompetitor_proteins=set(edges[edges["rel_type"]=="MEASURED_BY_COMPETITOR"]["source_id"])olink_proteins=set(edges[edges["rel_type"]=="MEASURED_BY"]["source_id"])competitor_only=competitor_proteins-olink_proteinsprint(f"{len(competitor_only)} proteins only on competitor platforms")