{"id":19714785,"url":"https://github.com/baranzinilab/pspg_245b","last_synced_at":"2026-06-09T04:32:18.823Z","repository":{"id":133783249,"uuid":"172744468","full_name":"BaranziniLab/PSPG_245B","owner":"BaranziniLab","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-03T14:56:14.000Z","size":2005,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T21:49:10.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaranziniLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-26T16:05:39.000Z","updated_at":"2021-05-13T02:12:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c92dee3-3fa0-4ccd-95b9-e41d2ab71b29","html_url":"https://github.com/BaranziniLab/PSPG_245B","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BaranziniLab/PSPG_245B","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FPSPG_245B","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FPSPG_245B/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FPSPG_245B/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FPSPG_245B/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaranziniLab","download_url":"https://codeload.github.com/BaranziniLab/PSPG_245B/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FPSPG_245B/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34092253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T22:35:51.530Z","updated_at":"2026-06-09T04:32:18.807Z","avatar_url":"https://github.com/BaranziniLab.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Instance](https://neo4j.het.io/browser/)\n\n\n### Graph Stats\n\n##### Find number of each node type in graph\n\u003eMATCH (node)\u003cbr/\u003e\n\u003eRETURN\u003cbr/\u003e\n\u003e  head(labels(node)) AS label,\u003cbr/\u003e\n\u003e  count(*) AS count\u003cbr/\u003e\n\u003eORDER BY count DESC\n\n##### Find number of each edge type in graph\n\u003eMATCH ()-[rel]-\u003e()\u003cbr/\u003e\n\u003eRETURN\u003cbr/\u003e\n\u003e  type(rel) AS rel_type,\u003cbr/\u003e\n\u003e  count(*) AS count\u003cbr/\u003e\n\u003eORDER BY count DESC\n\n##### Get examples of each edge/node type\n\u003eMATCH ()-[rel]-\u003e()\u003cbr/\u003e\n\u003eWITH type(rel) AS rel_type, collect(rel) AS rels\u003cbr/\u003e\n\u003eWITH rels[toInteger(rand() * size(rels))] AS rel\u003cbr/\u003e\n\u003eRETURN startNode(rel), rel, endNode(rel)\n\n### Multiple Sclerosis (MS) examples\n\n##### Find Disease node for MS\n\u003eMATCH (d: Disease) WHERE d.name =~ '(?i).\\*Multiple Sclerosis.\\*'\u003cbr/\u003e\n\u003eRETURN d\n\n##### Find Compounds that treat MS\n\u003eMATCH (d: Disease) WHERE d.name =~ '(?i).\\*Multiple Sclerosis.\\*'\u003cbr/\u003e\n\u003eMATCH compound_for_ms = ((c: Compound)-[:TREATS_CtD]-(d))\u003cbr/\u003e\n\u003eRETURN compound_for_ms\n\n##### Find Genes that bind Compounds that trat MS\n\u003eMATCH (d: Disease) WHERE d.name =~ '(?i).\\*Multiple Sclerosis.\\*'\u003cbr/\u003e\n\u003eMATCH compound_for_ms = ((c: Compound)-[:TREATS_CtD]-(d))\u003cbr/\u003e\n\u003eMATCH ms_genes_with_compound= ((c)-[:BINDS_CbG]-(g:Gene)-[]-(d))\u003cbr/\u003e\n\u003eRETURN ms_genes_with_compound\n\n##### Find Molecular Functions (GeneOntology) for the Genes that bind Compounds that trat MS\n\u003eMATCH (d: Disease) WHERE d.name =~ '(?i).\\*Multiple Sclerosis.\\*'\u003cbr/\u003e\n\u003eMATCH compound_for_ms = ((c: Compound)-[:TREATS_CtD]-(d))\u003cbr/\u003e\n\u003eMATCH ms_genes_with_compound= ((c)-[:BINDS_CbG]-(g:Gene)-[]-(d))\u003cbr/\u003e\n\u003eMATCH mf = ((g)-[:PARTICIPATES_GpMF]-(:MolecularFunction))\u003cbr/\u003e\n\u003eRETURN ms_genes_with_compound, mf\n\n### Myelin examples\n\n##### Find all GeneOntology nodes involving Myelin\n\u003eMATCH (cc: CellularComponent) WHERE cc.name =~ '(?i).\\*Myelin.\\*'\u003cbr/\u003e\n\u003eMATCH (m: MolecularFunction) WHERE m.name =~ '(?i).\\*Myelin.\\*'\u003cbr/\u003e\n\u003eMATCH (b: BiologicalProcess) WHERE b.name =~ '(?i).\\*Myelin.\\*'\u003cbr/\u003e\n\u003eRETURN cc, m, b\n\n##### Find Compounds that Bind that Participate in GeneOntology nodes involving Myelin\n\u003eMATCH (cc: CellularComponent) WHERE cc.name =~ '(?i).\\*Myelin.\\*' \u003cbr/\u003e\n\u003eMATCH (m: MolecularFunction) WHERE m.name =~ '(?i).\\*Myelin.\\*'\u003cbr/\u003e\n\u003eMATCH (b: BiologicalProcess) WHERE b.name =~ '(?i).\\*Myelin.\\*'\u003cbr/\u003e\n\u003eMATCH compounds_for_myelin_genes = ((c: Compound)-[:BINDS_CbG]-(:Gene)-[:PARTICIPATES_GpCC]-(cc)), ((c)-[]-(:Gene)-[:PARTICIPATES_GpMF]-(m)), ((c)-[]-(:Gene)-[:PARTICIPATES_GpBP]-(b))\u003cbr/\u003e\n\u003eRETURN compounds_for_myelin_genes\n\n##### Find Diseases Treated by Compounds that Bind Genes that Participate in GeneOntology nodes involving Myelin\n\u003eMATCH (cc: CellularComponent) WHERE cc.name =~ '(?i).\\*Myelin.\\*' \u003cbr/\u003e\n\u003eMATCH (m: MolecularFunction) WHERE m.name =~ '(?i).\\*Myelin.\\*'\u003cbr/\u003e\n\u003eMATCH (b: BiologicalProcess) WHERE b.name =~ '(?i).\\*Myelin.\\*'\u003cbr/\u003e\n\u003eMATCH compounds_for_myelin_genes = ((c: Compound)-[:BINDS_CbG]-(:Gene)-[:PARTICIPATES_GpCC]-(cc)), ((c)-[]-(:Gene)-[:PARTICIPATES_GpMF]-(m)), ((c)-[]-(:Gene)-[:PARTICIPATES_GpBP]-(b))\u003cbr/\u003e\n\u003eMATCH disease_compounds_treat = ((c)-[:TREATS_CtD]-(:Disease))\u003cbr/\u003e\n\u003eRETURN compounds_for_myelin_genes, cc, m, b, disease_compounds_treat\n\n### DWPC example\n\n##### Find DWPC for meta path DaGiGpBP between MS and GeneOntology BiologicalProcess nodes[1](https://think-lab.github.io/d/220/)\u003cbr/\u003e\n\u003eMATCH path = (n0:Disease)-[e1:ASSOCIATES_DaG]-(n1)-[:INTERACTS_GiG]-(n2)-[:PARTICIPATES_GpBP]-(n3:BiologicalProcess)\u003cbr/\u003e\n\u003eWHERE n0.name = 'multiple sclerosis'\u003cbr/\u003e\n\u003e  AND 'GWAS Catalog' in e1.sources\u003cbr/\u003e\n\u003e  AND exists((n0)-[:LOCALIZES_DlA]-()-[:UPREGULATES_AuG]-(n2))\u003cbr/\u003e\n\u003eWITH\u003cbr/\u003e\n\u003e[\u003cbr/\u003e\n\u003e  size((n0)-[:ASSOCIATES_DaG]-()),\u003cbr/\u003e\n\u003e  size(()-[:ASSOCIATES_DaG]-(n1)),\u003cbr/\u003e\n\u003e  size((n1)-[:INTERACTS_GiG]-()),\u003cbr/\u003e\n\u003e  size(()-[:INTERACTS_GiG]-(n2)),\u003cbr/\u003e\n\u003e  size((n2)-[:PARTICIPATES_GpBP]-()),\u003cbr/\u003e\n\u003e  size(()-[:PARTICIPATES_GpBP]-(n3))\u003cbr/\u003e\n\u003e] AS degrees, path, n3 as target\u003cbr/\u003e\n\u003eWITH\u003cbr/\u003e\n\u003e  target.identifier AS go_id,\u003cbr/\u003e\n\u003e  target.name AS go_name,\u003cbr/\u003e\n\u003e  count(path) AS PC,\u003cbr/\u003e\n\u003e  sum(reduce(pdp = 1.0, d in degrees| pdp * d ^ -0.7)) AS DWPC,\u003cbr/\u003e\n\u003e  size((target)-[:PARTICIPATES_GpBP]-()) AS n_genes\u003cbr/\u003e\n\u003e  WHERE 5 \u003c= n_genes \u003c= 100 AND PC \u003e= 2\u003cbr/\u003e\n\u003eRETURN\u003cbr/\u003e\n\u003e  go_id, go_name, PC, DWPC, n_genes\u003cbr/\u003e\n\u003eORDER BY DWPC DESC\u003cbr/\u003e\n\u003eLIMIT 5\n\n[MS example workshop](https://nbviewer.jupyter.org/github/baranzini-lab/PSPG_245B/blob/master/ms_example_notebook2.ipynb)\n \n[Epilepsy example workshop](https://nbviewer.jupyter.org/github/baranzini-lab/PSPG_245B/blob/master/epilepsy_example_notebook.ipynb)\n\n##### Other examples\n\u003eDISEASE = 'DOID:6364'\u003cbr/\u003e\n\u003eDISEASE_NAME = \"migraine\"\n\n\u003eDISEASE = 'DOID:0050742'\u003cbr/\u003e\n\u003eDISEASE_NAME = \"nicotine_dependence\"\n\n##### For breast cancer please use:\n\u003eDISEASE = 'DOID:1612'\u003cbr/\u003e\n\u003eDISEASE_NAME = \"breast_cancer\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaranzinilab%2Fpspg_245b","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaranzinilab%2Fpspg_245b","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaranzinilab%2Fpspg_245b/lists"}