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://purl.obolibrary.org/obo/GO_0016072", "source": "Gene Ontology", "license": "CC BY 4.0" }, "metanode": "Biological Process" }, "target": { "id": 43396, "identifier": "9646", "identifier_type": "int", "name": "CTR9", "properties": { "url": "http://identifiers.org/ncbigene/9646", "source": "Entrez Gene", "license": "CC0 1.0", "chromosome": "11", "description": "CTR9, Paf1/RNA polymerase II complex component" }, "metanode": "Gene" }, "path_counts": [ { "id": 158272904, "adjusted_p_value": 1.9994811802740735e-20, "path_count": 5356, "dwpc": 2.8020140681885395, "p_value": 4.25421527717888e-22, "reversed": false, "metapath_abbreviation": "BPpGeAeG", "metapath_name": "Biological Process–participates–Gene–expresses–Anatomy–expresses–Gene", "metapath_length": 3, "metapath_path_count_density": 0.861876, "metapath_path_count_mean": 679.095, "metapath_path_count_max": 38846, "metapath_dwpc_raw_mean": 2.9407600000000003e-05, "metapath_n_similar": 47, "metapath_p_threshold": 0.0003263577347198679, "metapath_id": "BPpGeAeG", "metapath_reversed": false, "metapath_metaedges": [ [ "Biological Process", "Gene", "participates", "both" ], [ "Gene", "Anatomy", "expresses", "both" ], [ "Anatomy", "Gene", "expresses", "both" ] ], "dgp_id": 14582279, "dgp_source_degree": 155, "dgp_target_degree": 57, "dgp_n_dwpcs": 286400, "dgp_n_nonzero_dwpcs": 286400, "dgp_nonzero_mean": 2.1883726071150478, "dgp_nonzero_sd": 0.05885941799703136, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:BiologicalProcess)-[:PARTICIPATES_GpBP]-(n1)-[:EXPRESSES_AeG]-(n2)-[:EXPRESSES_AeG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'GO:0016072' // rRNA metabolic process\nAND n3.identifier = 9646 // CTR9\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:PARTICIPATES_GpBP]-()),\nsize(()-[:PARTICIPATES_GpBP]-(n1)),\nsize((n1)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n2)),\nsize((n2)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(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": 79463677, "adjusted_p_value": 4.3267840024227314e-10, "path_count": 230, "dwpc": 2.6943105232008864, "p_value": 9.205923409410067e-12, "reversed": false, "metapath_abbreviation": "BPpGuAuG", "metapath_name": "Biological Process–participates–Gene–upregulates–Anatomy–upregulates–Gene", "metapath_length": 3, "metapath_path_count_density": 0.710444, "metapath_path_count_mean": 42.83, "metapath_path_count_max": 4956, "metapath_dwpc_raw_mean": 2.62684e-05, "metapath_n_similar": 47, "metapath_p_threshold": 0.0003263577347198679, "metapath_id": "BPpGuAuG", "metapath_reversed": false, "metapath_metaedges": [ [ "Biological Process", "Gene", "participates", "both" ], [ "Gene", "Anatomy", "upregulates", "both" ], [ "Anatomy", "Gene", "upregulates", "both" ] ], "dgp_id": 18136333, "dgp_source_degree": 155, "dgp_target_degree": 6, "dgp_n_dwpcs": 2774400, "dgp_n_nonzero_dwpcs": 2774400, "dgp_nonzero_mean": 1.9600320549040162, "dgp_nonzero_sd": 0.0982637366806382, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:BiologicalProcess)-[:PARTICIPATES_GpBP]-(n1)-[:UPREGULATES_AuG]-(n2)-[:UPREGULATES_AuG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'GO:0016072' // rRNA metabolic process\nAND n3.identifier = 9646 // CTR9\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:PARTICIPATES_GpBP]-()),\nsize(()-[:PARTICIPATES_GpBP]-(n1)),\nsize((n1)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(n2)),\nsize((n2)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(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": 60787552, "adjusted_p_value": 4.449309520502892e-10, "path_count": 682, "dwpc": 2.627371954229332, "p_value": 9.466616001069983e-12, "reversed": false, "metapath_abbreviation": "BPpGeAuG", "metapath_name": "Biological Process–participates–Gene–expresses–Anatomy–upregulates–Gene", "metapath_length": 3, "metapath_path_count_density": 0.755003, "metapath_path_count_mean": 135.072, "metapath_path_count_max": 14914, "metapath_dwpc_raw_mean": 2.0551700000000002e-05, "metapath_n_similar": 47, "metapath_p_threshold": 0.0003263577347198679, "metapath_id": "BPpGeAuG", "metapath_reversed": false, "metapath_metaedges": [ [ "Biological Process", "Gene", "participates", "both" ], [ "Gene", "Anatomy", "expresses", "both" ], [ "Anatomy", "Gene", "upregulates", "both" ] ], "dgp_id": 14657368, "dgp_source_degree": 155, "dgp_target_degree": 6, "dgp_n_dwpcs": 2774400, "dgp_n_nonzero_dwpcs": 2774400, "dgp_nonzero_mean": 2.0242903699474635, "dgp_nonzero_sd": 0.08235441552593176, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:BiologicalProcess)-[:PARTICIPATES_GpBP]-(n1)-[:EXPRESSES_AeG]-(n2)-[:UPREGULATES_AuG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'GO:0016072' // rRNA metabolic process\nAND n3.identifier = 9646 // CTR9\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:PARTICIPATES_GpBP]-()),\nsize(()-[:PARTICIPATES_GpBP]-(n1)),\nsize((n1)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n2)),\nsize((n2)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(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": 121337668, "adjusted_p_value": 2.5552394979393954e-08, "path_count": 859, "dwpc": 2.6696043205153344, "p_value": 5.436679782849777e-10, "reversed": false, "metapath_abbreviation": "BPpGuAeG", "metapath_name": "Biological Process–participates–Gene–upregulates–Anatomy–expresses–Gene", "metapath_length": 3, "metapath_path_count_density": 0.817026, "metapath_path_count_mean": 135.739, "metapath_path_count_max": 6915, "metapath_dwpc_raw_mean": 2.08674e-05, "metapath_n_similar": 47, "metapath_p_threshold": 0.0003263577347198679, "metapath_id": "BPpGuAeG", "metapath_reversed": false, "metapath_metaedges": [ [ "Biological Process", "Gene", "participates", "both" ], [ "Gene", "Anatomy", "upregulates", "both" ], [ "Anatomy", "Gene", "expresses", "both" ] ], "dgp_id": 18061244, "dgp_source_degree": 155, "dgp_target_degree": 57, "dgp_n_dwpcs": 286400, "dgp_n_nonzero_dwpcs": 286400, "dgp_nonzero_mean": 2.1296477883134766, "dgp_nonzero_sd": 0.08220259657827957, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:BiologicalProcess)-[:PARTICIPATES_GpBP]-(n1)-[:UPREGULATES_AuG]-(n2)-[:EXPRESSES_AeG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'GO:0016072' // rRNA metabolic process\nAND n3.identifier = 9646 // CTR9\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:PARTICIPATES_GpBP]-()),\nsize(()-[:PARTICIPATES_GpBP]-(n1)),\nsize((n1)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(n2)),\nsize((n2)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(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": 70151528, "adjusted_p_value": 1.128203803913382e-06, "path_count": 615, "dwpc": 2.6427320517091246, "p_value": 2.4004336253476216e-08, "reversed": false, "metapath_abbreviation": "BPpGeAdG", "metapath_name": "Biological Process–participates–Gene–expresses–Anatomy–downregulates–Gene", "metapath_length": 3, "metapath_path_count_density": 0.7152, "metapath_path_count_mean": 138.06799999999998, "metapath_path_count_max": 19596, "metapath_dwpc_raw_mean": 1.92468e-05, "metapath_n_similar": 47, "metapath_p_threshold": 0.0003263577347198679, "metapath_id": "BPpGeAdG", "metapath_reversed": false, "metapath_metaedges": [ [ "Biological Process", "Gene", "participates", "both" ], [ "Gene", "Anatomy", "expresses", "both" ], [ "Anatomy", "Gene", "downregulates", "both" ] ], "dgp_id": 14554313, "dgp_source_degree": 155, "dgp_target_degree": 5, "dgp_n_dwpcs": 2249600, "dgp_n_nonzero_dwpcs": 2249600, "dgp_nonzero_mean": 1.9434140967633506, "dgp_nonzero_sd": 0.1157475386238126, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:BiologicalProcess)-[:PARTICIPATES_GpBP]-(n1)-[:EXPRESSES_AeG]-(n2)-[:DOWNREGULATES_AdG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'GO:0016072' // rRNA metabolic process\nAND n3.identifier = 9646 // CTR9\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:PARTICIPATES_GpBP]-()),\nsize(()-[:PARTICIPATES_GpBP]-(n1)),\nsize((n1)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n2)),\nsize((n2)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(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": 22316468, "adjusted_p_value": 0.0002615750066128201, "path_count": 116, "dwpc": 2.3832243960375035, "p_value": 5.5654256726131935e-06, "reversed": false, "metapath_abbreviation": "BPpGdAdG", "metapath_name": "Biological Process–participates–Gene–downregulates–Anatomy–downregulates–Gene", "metapath_length": 3, "metapath_path_count_density": 0.682033, "metapath_path_count_mean": 50.6131, "metapath_path_count_max": 5812, "metapath_dwpc_raw_mean": 2.44848e-05, "metapath_n_similar": 47, "metapath_p_threshold": 0.0003263577347198679, "metapath_id": "BPpGdAdG", "metapath_reversed": false, "metapath_metaedges": [ [ "Biological Process", "Gene", "participates", "both" ], [ "Gene", "Anatomy", "downregulates", "both" ], [ "Anatomy", "Gene", "downregulates", "both" ] ], "dgp_id": 13956338, "dgp_source_degree": 155, "dgp_target_degree": 5, "dgp_n_dwpcs": 2249600, "dgp_n_nonzero_dwpcs": 2249600, "dgp_nonzero_mean": 1.8845299694593598, "dgp_nonzero_sd": 0.10522934138082803, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:BiologicalProcess)-[:PARTICIPATES_GpBP]-(n1)-[:DOWNREGULATES_AdG]-(n2)-[:DOWNREGULATES_AdG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'GO:0016072' // rRNA metabolic process\nAND n3.identifier = 9646 // CTR9\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:PARTICIPATES_GpBP]-()),\nsize(()-[:PARTICIPATES_GpBP]-(n1)),\nsize((n1)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(n2)),\nsize((n2)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(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": 104348010, "adjusted_p_value": 0.00034603499089823077, "path_count": 160, "dwpc": 2.449778538545581, "p_value": 7.362446614855974e-06, "reversed": false, "metapath_abbreviation": "BPpGuAdG", "metapath_name": "Biological Process–participates–Gene–upregulates–Anatomy–downregulates–Gene", "metapath_length": 3, "metapath_path_count_density": 0.675431, "metapath_path_count_mean": 44.5957, "metapath_path_count_max": 6145, "metapath_dwpc_raw_mean": 2.48779e-05, "metapath_n_similar": 47, "metapath_p_threshold": 0.0003263577347198679, "metapath_id": "BPpGuAdG", "metapath_reversed": false, "metapath_metaedges": [ [ "Biological Process", "Gene", "participates", "both" ], [ "Gene", "Anatomy", "upregulates", "both" ], [ "Anatomy", "Gene", "downregulates", "both" ] ], "dgp_id": 18033278, "dgp_source_degree": 155, "dgp_target_degree": 5, "dgp_n_dwpcs": 2249600, "dgp_n_nonzero_dwpcs": 2249600, "dgp_nonzero_mean": 1.882150781828961, "dgp_nonzero_sd": 0.12033743880223151, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:BiologicalProcess)-[:PARTICIPATES_GpBP]-(n1)-[:UPREGULATES_AuG]-(n2)-[:DOWNREGULATES_AdG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'GO:0016072' // rRNA metabolic process\nAND n3.identifier = 9646 // CTR9\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:PARTICIPATES_GpBP]-()),\nsize(()-[:PARTICIPATES_GpBP]-(n1)),\nsize((n1)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(n2)),\nsize((n2)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(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": 7, "pathcount_table_random_id": 121337668, "pathcount_table_max_id": 169602979 }{ "source": { "id": 43358, "identifier": "GO:0016072", "identifier_type": "str", "name": "rRNA metabolic process", "properties": { "url": "