Query Metapaths Random Nodes
Return metapaths for a random source and target node for which at least one metapath with path count information exists in the database.
GET /v1/metapaths/random-nodes/?format=api
http://identifiers.org/ncbigene/6777", "source": "Entrez Gene", "license": "CC0 1.0", "chromosome": "17", "description": "signal transducer and activator of transcription 5B" }, "metanode": "Gene" }, "target": { "id": 16944, "identifier": "9657", "identifier_type": "int", "name": "IQCB1", "properties": { "url": "http://identifiers.org/ncbigene/9657", "source": "Entrez Gene", "license": "CC0 1.0", "chromosome": "3", "description": "IQ motif containing B1" }, "metanode": "Gene" }, "path_counts": [ { "id": 143668730, "adjusted_p_value": 3.4330673536087428e-12, "path_count": 5372, "dwpc": 3.4247819657382834, "p_value": 1.7251594741752476e-14, "reversed": false, "metapath_abbreviation": "GeAeGiG", "metapath_name": "Gene–expresses–Anatomy–expresses–Gene–interacts–Gene", "metapath_length": 3, "metapath_path_count_density": 0.621691, "metapath_path_count_mean": 225.803, "metapath_path_count_max": 316362, "metapath_dwpc_raw_mean": 1.7866400000000002e-05, "metapath_n_similar": 199, "metapath_p_threshold": 6.419019708424056e-05, "metapath_id": "GeAeGiG", "metapath_reversed": false, "metapath_metaedges": [ [ "Gene", "Anatomy", "expresses", "both" ], [ "Anatomy", "Gene", "expresses", "both" ], [ "Gene", "Gene", "interacts", "both" ] ], "dgp_id": 32187396, "dgp_source_degree": 46, "dgp_target_degree": 182, "dgp_n_dwpcs": 165600, "dgp_n_nonzero_dwpcs": 165600, "dgp_nonzero_mean": 2.968435493390627, "dgp_nonzero_sd": 0.05741582739521272, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Gene)-[:EXPRESSES_AeG]-(n1)-[:EXPRESSES_AeG]-(n2)-[:INTERACTS_GiG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 6777 // STAT5B\nAND n3.identifier = 9657 // IQCB1\nAND n0 <> n2 AND n0 <> n3 AND n2 <> n3\nWITH\n[\nsize((n0)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n1)),\nsize((n1)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n2)),\nsize((n2)-[:INTERACTS_GiG]-()),\nsize(()-[:INTERACTS_GiG]-(n3))\n] AS degrees, path\nWITH path, reduce(pdp = 1.0, d in degrees| pdp * d ^ -0.5) AS PDP\nWITH collect({paths: path, PDPs: PDP}) AS data_maps, count(path) AS PC, sum(PDP) AS DWPC\nUNWIND data_maps AS data_map\nWITH data_map.paths AS path, data_map.PDPs AS PDP, PC, DWPC\nRETURN\n path AS neo4j_path,\n substring(reduce(s = '', node IN nodes(path)| s + '–' + node.name), 1) AS path,\n PDP,\n 100 * (PDP / DWPC) AS percent_of_DWPC\nORDER BY percent_of_DWPC DESC\nLIMIT 10" }, { "id": 127059346, "adjusted_p_value": 1.2726361978186882e-05, "path_count": 370, "dwpc": 3.6125346081116847, "p_value": 6.395156772958232e-08, "reversed": false, "metapath_abbreviation": "GdAuGiG", "metapath_name": "Gene–downregulates–Anatomy–upregulates–Gene–interacts–Gene", "metapath_length": 3, "metapath_path_count_density": 0.46920500000000004, "metapath_path_count_mean": 13.3106, "metapath_path_count_max": 45878, "metapath_dwpc_raw_mean": 1.4771800000000001e-05, "metapath_n_similar": 199, "metapath_p_threshold": 6.419019708424056e-05, "metapath_id": "GdAuGiG", "metapath_reversed": false, "metapath_metaedges": [ [ "Gene", "Anatomy", "downregulates", "both" ], [ "Anatomy", "Gene", "upregulates", "both" ], [ "Gene", "Gene", "interacts", "both" ] ], "dgp_id": 31457174, "dgp_source_degree": 9, "dgp_target_degree": 182, "dgp_n_dwpcs": 490200, "dgp_n_nonzero_dwpcs": 490200, "dgp_nonzero_mean": 3.047047342628903, "dgp_nonzero_sd": 0.10128497352986433, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Gene)-[:DOWNREGULATES_AdG]-(n1)-[:UPREGULATES_AuG]-(n2)-[:INTERACTS_GiG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 6777 // STAT5B\nAND n3.identifier = 9657 // IQCB1\nAND n0 <> n2 AND n0 <> n3 AND n2 <> n3\nWITH\n[\nsize((n0)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(n1)),\nsize((n1)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(n2)),\nsize((n2)-[:INTERACTS_GiG]-()),\nsize(()-[:INTERACTS_GiG]-(n3))\n] AS degrees, path\nWITH path, reduce(pdp = 1.0, d in degrees| pdp * d ^ -0.5) AS PDP\nWITH collect({paths: path, PDPs: PDP}) AS data_maps, count(path) AS PC, sum(PDP) AS DWPC\nUNWIND data_maps AS data_map\nWITH data_map.paths AS path, data_map.PDPs AS PDP, PC, DWPC\nRETURN\n path AS neo4j_path,\n substring(reduce(s = '', node IN nodes(path)| s + '–' + node.name), 1) AS path,\n PDP,\n 100 * (PDP / DWPC) AS percent_of_DWPC\nORDER BY percent_of_DWPC DESC\nLIMIT 10" }, { "id": 74142942, "adjusted_p_value": 3.822831607856497e-05, "path_count": 594, "dwpc": 3.723290094089284, "p_value": 1.9210209084706012e-07, "reversed": false, "metapath_abbreviation": "GuAdGiG", "metapath_name": "Gene–upregulates–Anatomy–downregulates–Gene–interacts–Gene", "metapath_length": 3, "metapath_path_count_density": 0.49571800000000005, "metapath_path_count_mean": 12.5909, "metapath_path_count_max": 30094, "metapath_dwpc_raw_mean": 1.48655e-05, "metapath_n_similar": 199, "metapath_p_threshold": 6.419019708424056e-05, "metapath_id": "GuAdGiG", "metapath_reversed": false, "metapath_metaedges": [ [ "Gene", "Anatomy", "upregulates", "both" ], [ "Anatomy", "Gene", "downregulates", "both" ], [ "Gene", "Gene", "interacts", "both" ] ], "dgp_id": 36191794, "dgp_source_degree": 14, "dgp_target_degree": 182, "dgp_n_dwpcs": 136800, "dgp_n_nonzero_dwpcs": 136800, "dgp_nonzero_mean": 3.2294234552243752, "dgp_nonzero_sd": 0.09289703238723117, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Gene)-[:UPREGULATES_AuG]-(n1)-[:DOWNREGULATES_AdG]-(n2)-[:INTERACTS_GiG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 6777 // STAT5B\nAND n3.identifier = 9657 // IQCB1\nAND n0 <> n2 AND n0 <> n3 AND n2 <> n3\nWITH\n[\nsize((n0)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(n1)),\nsize((n1)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(n2)),\nsize((n2)-[:INTERACTS_GiG]-()),\nsize(()-[:INTERACTS_GiG]-(n3))\n] AS degrees, path\nWITH path, reduce(pdp = 1.0, d in degrees| pdp * d ^ -0.5) AS PDP\nWITH collect({paths: path, PDPs: PDP}) AS data_maps, count(path) AS PC, sum(PDP) AS DWPC\nUNWIND data_maps AS data_map\nWITH data_map.paths AS path, data_map.PDPs AS PDP, PC, DWPC\nRETURN\n path AS neo4j_path,\n substring(reduce(s = '', node IN nodes(path)| s + '–' + node.name), 1) AS path,\n PDP,\n 100 * (PDP / DWPC) AS percent_of_DWPC\nORDER BY percent_of_DWPC DESC\nLIMIT 10" } ], "n_metapaths": 3, "pathcount_table_random_id": 143668730, "pathcount_table_max_id": 169602979 }{ "source": { "id": 11468, "identifier": "6777", "identifier_type": "int", "name": "STAT5B", "properties": { "url": "