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://www.drugbank.ca/drugs/DB08911", "inchi": "InChI=1S/C26H23FIN5O4/c1-13-22-21(23(31(3)24(13)35)30-20-10-7-15(28)11-19(20)27)25(36)33(17-8-9-17)26(37)32(22)18-6-4-5-16(12-18)29-14(2)34/h4-7,10-12,17,30H,8-9H2,1-3H3,(H,29,34)", "source": "DrugBank", "license": "CC BY-NC 4.0", "inchikey": "InChIKey=LIRYPHYGHXZJBZ-UHFFFAOYSA-N" }, "metanode": "Compound" }, "target": { "id": 7493, "identifier": "55273", "identifier_type": "int", "name": "TMEM100", "properties": { "url": "http://identifiers.org/ncbigene/55273", "source": "Entrez Gene", "license": "CC0 1.0", "chromosome": "17", "description": "transmembrane protein 100" }, "metanode": "Gene" }, "path_counts": [ { "id": 126331636, "adjusted_p_value": 2.2246232848804095e-06, "path_count": 400, "dwpc": 3.9686996213541175, "p_value": 1.029918187444634e-08, "reversed": false, "metapath_abbreviation": "CdGdAdG", "metapath_name": "Compound–downregulates–Gene–downregulates–Anatomy–downregulates–Gene", "metapath_length": 3, "metapath_path_count_density": 0.305268, "metapath_path_count_mean": 13.5845, "metapath_path_count_max": 1576, "metapath_dwpc_raw_mean": 1.77146e-05, "metapath_n_similar": 216, "metapath_p_threshold": 0.00012909952034589114, "metapath_id": "CdGdAdG", "metapath_reversed": false, "metapath_metaedges": [ [ "Compound", "Gene", "downregulates", "both" ], [ "Gene", "Anatomy", "downregulates", "both" ], [ "Anatomy", "Gene", "downregulates", "both" ] ], "dgp_id": 22710598, "dgp_source_degree": 181, "dgp_target_degree": 10, "dgp_n_dwpcs": 126800, "dgp_n_nonzero_dwpcs": 126800, "dgp_nonzero_mean": 3.4580311644244803, "dgp_nonzero_sd": 0.08707457310711093, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Compound)-[:DOWNREGULATES_CdG]-(n1)-[:DOWNREGULATES_AdG]-(n2)-[:DOWNREGULATES_AdG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'DB08911' // Trametinib\nAND n3.identifier = 55273 // TMEM100\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:DOWNREGULATES_CdG]-()),\nsize(()-[:DOWNREGULATES_CdG]-(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": 167694550, "adjusted_p_value": 0.0006971072495486634, "path_count": 777, "dwpc": 3.6706599029133398, "p_value": 3.227348377540108e-06, "reversed": false, "metapath_abbreviation": "CuGuAeG", "metapath_name": "Compound–upregulates–Gene–upregulates–Anatomy–expresses–Gene", "metapath_length": 3, "metapath_path_count_density": 0.357031, "metapath_path_count_mean": 39.6296, "metapath_path_count_max": 2097, "metapath_dwpc_raw_mean": 1.6954500000000002e-05, "metapath_n_similar": 216, "metapath_p_threshold": 0.00012909952034589114, "metapath_id": "CuGuAeG", "metapath_reversed": false, "metapath_metaedges": [ [ "Compound", "Gene", "upregulates", "both" ], [ "Gene", "Anatomy", "upregulates", "both" ], [ "Anatomy", "Gene", "expresses", "both" ] ], "dgp_id": 24784293, "dgp_source_degree": 115, "dgp_target_degree": 33, "dgp_n_dwpcs": 48600, "dgp_n_nonzero_dwpcs": 48600, "dgp_nonzero_mean": 3.123779414298802, "dgp_nonzero_sd": 0.11511389866365983, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Compound)-[:UPREGULATES_CuG]-(n1)-[:UPREGULATES_AuG]-(n2)-[:EXPRESSES_AeG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'DB08911' // Trametinib\nAND n3.identifier = 55273 // TMEM100\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:UPREGULATES_CuG]-()),\nsize(()-[:UPREGULATES_CuG]-(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": 93010432, "adjusted_p_value": 0.0014543203650852874, "path_count": 894, "dwpc": 3.765030971828476, "p_value": 6.732964653172626e-06, "reversed": false, "metapath_abbreviation": "CdGuAeG", "metapath_name": "Compound–downregulates–Gene–upregulates–Anatomy–expresses–Gene", "metapath_length": 3, "metapath_path_count_density": 0.37206, "metapath_path_count_mean": 37.9129, "metapath_path_count_max": 1823, "metapath_dwpc_raw_mean": 1.54582e-05, "metapath_n_similar": 216, "metapath_p_threshold": 0.00012909952034589114, "metapath_id": "CdGuAeG", "metapath_reversed": false, "metapath_metaedges": [ [ "Compound", "Gene", "downregulates", "both" ], [ "Gene", "Anatomy", "upregulates", "both" ], [ "Anatomy", "Gene", "expresses", "both" ] ], "dgp_id": 23214909, "dgp_source_degree": 181, "dgp_target_degree": 33, "dgp_n_dwpcs": 48600, "dgp_n_nonzero_dwpcs": 48600, "dgp_nonzero_mean": 3.24441045918447, "dgp_nonzero_sd": 0.11406138137577305, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Compound)-[:DOWNREGULATES_CdG]-(n1)-[:UPREGULATES_AuG]-(n2)-[:EXPRESSES_AeG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'DB08911' // Trametinib\nAND n3.identifier = 55273 // TMEM100\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:DOWNREGULATES_CdG]-()),\nsize(()-[:DOWNREGULATES_CdG]-(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": 49825640, "adjusted_p_value": 0.011042118724739525, "path_count": 3032, "dwpc": 3.2959683667090585, "p_value": 5.112092002194225e-05, "reversed": false, "metapath_abbreviation": "CuGeAeG", "metapath_name": "Compound–upregulates–Gene–expresses–Anatomy–expresses–Gene", "metapath_length": 3, "metapath_path_count_density": 0.389313, "metapath_path_count_mean": 207.183, "metapath_path_count_max": 11611, "metapath_dwpc_raw_mean": 2.40285e-05, "metapath_n_similar": 216, "metapath_p_threshold": 0.00012909952034589114, "metapath_id": "CuGeAeG", "metapath_reversed": false, "metapath_metaedges": [ [ "Compound", "Gene", "upregulates", "both" ], [ "Gene", "Anatomy", "expresses", "both" ], [ "Anatomy", "Gene", "expresses", "both" ] ], "dgp_id": 24370129, "dgp_source_degree": 115, "dgp_target_degree": 33, "dgp_n_dwpcs": 48600, "dgp_n_nonzero_dwpcs": 48600, "dgp_nonzero_mean": 3.0399738261537554, "dgp_nonzero_sd": 0.06424153665221818, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Compound)-[:UPREGULATES_CuG]-(n1)-[:EXPRESSES_AeG]-(n2)-[:EXPRESSES_AeG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'DB08911' // Trametinib\nAND n3.identifier = 55273 // TMEM100\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:UPREGULATES_CuG]-()),\nsize(()-[:UPREGULATES_CuG]-(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": 169358919, "adjusted_p_value": 0.013705866922176136, "path_count": 3925, "dwpc": 3.388219183957825, "p_value": 6.34530876026673e-05, "reversed": false, "metapath_abbreviation": "CdGeAeG", "metapath_name": "Compound–downregulates–Gene–expresses–Anatomy–expresses–Gene", "metapath_length": 3, "metapath_path_count_density": 0.407763, "metapath_path_count_mean": 229.726, "metapath_path_count_max": 11995, "metapath_dwpc_raw_mean": 2.37148e-05, "metapath_n_similar": 216, "metapath_p_threshold": 0.00012909952034589114, "metapath_id": "CdGeAeG", "metapath_reversed": false, "metapath_metaedges": [ [ "Compound", "Gene", "downregulates", "both" ], [ "Gene", "Anatomy", "expresses", "both" ], [ "Anatomy", "Gene", "expresses", "both" ] ], "dgp_id": 22801809, "dgp_source_degree": 181, "dgp_target_degree": 33, "dgp_n_dwpcs": 48600, "dgp_n_nonzero_dwpcs": 48600, "dgp_nonzero_mean": 3.163697597534209, "dgp_nonzero_sd": 0.057343992810430885, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Compound)-[:DOWNREGULATES_CdG]-(n1)-[:EXPRESSES_AeG]-(n2)-[:EXPRESSES_AeG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'DB08911' // Trametinib\nAND n3.identifier = 55273 // TMEM100\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:DOWNREGULATES_CdG]-()),\nsize(()-[:DOWNREGULATES_CdG]-(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": 32257236, "adjusted_p_value": 0.020362121204172003, "path_count": 305, "dwpc": 3.6367159918305303, "p_value": 9.426907964894446e-05, "reversed": false, "metapath_abbreviation": "CdGuAuG", "metapath_name": "Compound–downregulates–Gene–upregulates–Anatomy–upregulates–Gene", "metapath_length": 3, "metapath_path_count_density": 0.318444, "metapath_path_count_mean": 12.1958, "metapath_path_count_max": 1280, "metapath_dwpc_raw_mean": 1.95731e-05, "metapath_n_similar": 216, "metapath_p_threshold": 0.00012909952034589114, "metapath_id": "CdGuAuG", "metapath_reversed": false, "metapath_metaedges": [ [ "Compound", "Gene", "downregulates", "both" ], [ "Gene", "Anatomy", "upregulates", "both" ], [ "Anatomy", "Gene", "upregulates", "both" ] ], "dgp_id": 23222488, "dgp_source_degree": 181, "dgp_target_degree": 7, "dgp_n_dwpcs": 295200, "dgp_n_nonzero_dwpcs": 295200, "dgp_nonzero_mean": 3.272290194720245, "dgp_nonzero_sd": 0.09443583095508484, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Compound)-[:DOWNREGULATES_CdG]-(n1)-[:UPREGULATES_AuG]-(n2)-[:UPREGULATES_AuG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'DB08911' // Trametinib\nAND n3.identifier = 55273 // TMEM100\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:DOWNREGULATES_CdG]-()),\nsize(()-[:DOWNREGULATES_CdG]-(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": 98323824, "adjusted_p_value": 0.023558128929116108, "path_count": 285, "dwpc": 3.6754031849214783, "p_value": 0.00010906541170887087, "reversed": false, "metapath_abbreviation": "CuGdAdG", "metapath_name": "Compound–upregulates–Gene–downregulates–Anatomy–downregulates–Gene", "metapath_length": 3, "metapath_path_count_density": 0.291338, "metapath_path_count_mean": 13.9658, "metapath_path_count_max": 1709, "metapath_dwpc_raw_mean": 1.9500699999999998e-05, "metapath_n_similar": 216, "metapath_p_threshold": 0.00012909952034589114, "metapath_id": "CuGdAdG", "metapath_reversed": false, "metapath_metaedges": [ [ "Compound", "Gene", "upregulates", "both" ], [ "Gene", "Anatomy", "downregulates", "both" ], [ "Anatomy", "Gene", "downregulates", "both" ] ], "dgp_id": 24275422, "dgp_source_degree": 115, "dgp_target_degree": 10, "dgp_n_dwpcs": 126800, "dgp_n_nonzero_dwpcs": 126800, "dgp_nonzero_mean": 3.336652773416359, "dgp_nonzero_sd": 0.08891020868208824, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Compound)-[:UPREGULATES_CuG]-(n1)-[:DOWNREGULATES_AdG]-(n2)-[:DOWNREGULATES_AdG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'DB08911' // Trametinib\nAND n3.identifier = 55273 // TMEM100\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:UPREGULATES_CuG]-()),\nsize(()-[:UPREGULATES_CuG]-(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" } ], "n_metapaths": 7, "pathcount_table_random_id": 169358919, "pathcount_table_max_id": 169602979 }{ "source": { "id": 12630, "identifier": "DB08911", "identifier_type": "str", "name": "Trametinib", "properties": { "url": "