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
{ "source": { "id": 28572, "identifier": "56849", "identifier_type": "int", "name": "TCEAL7", "properties": { "url": "http://identifiers.org/ncbigene/56849", "source": "Entrez Gene", "license": "CC0 1.0", "chromosome": "X", "description": "transcription elongation factor A (SII)-like 7" }, "metanode": "Gene" }, "target": { "id": 18970, "identifier": "6309", "identifier_type": "int", "name": "SC5D", "properties": { "url": "http://identifiers.org/ncbigene/6309", "source": "Entrez Gene", "license": "CC0 1.0", "chromosome": "11", "description": "sterol-C5-desaturase" }, "metanode": "Gene" }, "path_counts": [ { "id": 53687103, "adjusted_p_value": 1.806960567735926e-05, "path_count": 305, "dwpc": 4.1736785660937334, "p_value": 9.080203857969476e-08, "reversed": false, "metapath_abbreviation": "GdAuG<rG", "metapath_name": "Gene–downregulates–Anatomy–upregulates–Gene←regulates←Gene", "metapath_length": 3, "metapath_path_count_density": 0.15641, "metapath_path_count_mean": 12.9277, "metapath_path_count_max": 2428, "metapath_dwpc_raw_mean": 6.41159e-06, "metapath_n_similar": 199, "metapath_p_threshold": 6.419019708424056e-05, "metapath_id": "GdAuG<rG", "metapath_reversed": false, "metapath_metaedges": [ [ "Gene", "Anatomy", "downregulates", "both" ], [ "Anatomy", "Gene", "upregulates", "both" ], [ "Gene", "Gene", "regulates", "backward" ] ], "dgp_id": 31443025, "dgp_source_degree": 11, "dgp_target_degree": 125, "dgp_n_dwpcs": 832000, "dgp_n_nonzero_dwpcs": 832000, "dgp_nonzero_mean": 3.474798151673404, "dgp_nonzero_sd": 0.12618896894044707, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Gene)-[:DOWNREGULATES_AdG]-(n1)-[:UPREGULATES_AuG]-(n2)<-[:REGULATES_GrG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 56849 // TCEAL7\nAND n3.identifier = 6309 // SC5D\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)<-[:REGULATES_GrG]-()),\nsize(()<-[:REGULATES_GrG]-(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": 19181419, "adjusted_p_value": 0.0014911628863042109, "path_count": 311, "dwpc": 4.01783080741063, "p_value": 7.493280835699552e-06, "reversed": false, "metapath_abbreviation": "GuAdG<rG", "metapath_name": "Gene–upregulates–Anatomy–downregulates–Gene←regulates←Gene", "metapath_length": 3, "metapath_path_count_density": 0.165323, "metapath_path_count_mean": 12.5141, "metapath_path_count_max": 1494, "metapath_dwpc_raw_mean": 6.40903e-06, "metapath_n_similar": 199, "metapath_p_threshold": 6.419019708424056e-05, "metapath_id": "GuAdG<rG", "metapath_reversed": false, "metapath_metaedges": [ [ "Gene", "Anatomy", "upregulates", "both" ], [ "Anatomy", "Gene", "downregulates", "both" ], [ "Gene", "Gene", "regulates", "backward" ] ], "dgp_id": 36178965, "dgp_source_degree": 10, "dgp_target_degree": 125, "dgp_n_dwpcs": 1195200, "dgp_n_nonzero_dwpcs": 1195200, "dgp_nonzero_mean": 3.393292230596369, "dgp_nonzero_sd": 0.13668252403747502, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Gene)-[:UPREGULATES_AuG]-(n1)-[:DOWNREGULATES_AdG]-(n2)<-[:REGULATES_GrG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 56849 // TCEAL7\nAND n3.identifier = 6309 // SC5D\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)<-[:REGULATES_GrG]-()),\nsize(()<-[:REGULATES_GrG]-(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": 6091638, "adjusted_p_value": 0.002562696841440611, "path_count": 921, "dwpc": 3.94482803131234, "p_value": 1.2877873575078446e-05, "reversed": false, "metapath_abbreviation": "GdAeG<rG", "metapath_name": "Gene–downregulates–Anatomy–expresses–Gene←regulates←Gene", "metapath_length": 3, "metapath_path_count_density": 0.159218, "metapath_path_count_mean": 45.6846, "metapath_path_count_max": 8506, "metapath_dwpc_raw_mean": 5.424169999999999e-06, "metapath_n_similar": 199, "metapath_p_threshold": 6.419019708424056e-05, "metapath_id": "GdAeG<rG", "metapath_reversed": false, "metapath_metaedges": [ [ "Gene", "Anatomy", "downregulates", "both" ], [ "Anatomy", "Gene", "expresses", "both" ], [ "Gene", "Gene", "regulates", "backward" ] ], "dgp_id": 31387985, "dgp_source_degree": 11, "dgp_target_degree": 125, "dgp_n_dwpcs": 832000, "dgp_n_nonzero_dwpcs": 832000, "dgp_nonzero_mean": 3.4774384868203887, "dgp_nonzero_sd": 0.10670721358528555, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Gene)-[:DOWNREGULATES_AdG]-(n1)-[:EXPRESSES_AeG]-(n2)<-[:REGULATES_GrG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 56849 // TCEAL7\nAND n3.identifier = 6309 // SC5D\nAND n0 <> n2 AND n0 <> n3 AND n2 <> n3\nWITH\n[\nsize((n0)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(n1)),\nsize((n1)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n2)),\nsize((n2)<-[:REGULATES_GrG]-()),\nsize(()<-[:REGULATES_GrG]-(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": 9116890, "adjusted_p_value": 0.00861513832388664, "path_count": 3168, "dwpc": 3.5261238405409125, "p_value": 4.32921523813399e-05, "reversed": false, "metapath_abbreviation": "GeAeG<rG", "metapath_name": "Gene–expresses–Anatomy–expresses–Gene←regulates←Gene", "metapath_length": 3, "metapath_path_count_density": 0.190947, "metapath_path_count_mean": 219.74200000000002, "metapath_path_count_max": 16109, "metapath_dwpc_raw_mean": 7.98447e-06, "metapath_n_similar": 199, "metapath_p_threshold": 6.419019708424056e-05, "metapath_id": "GeAeG<rG", "metapath_reversed": false, "metapath_metaedges": [ [ "Gene", "Anatomy", "expresses", "both" ], [ "Anatomy", "Gene", "expresses", "both" ], [ "Gene", "Gene", "regulates", "backward" ] ], "dgp_id": 32142686, "dgp_source_degree": 36, "dgp_target_degree": 125, "dgp_n_dwpcs": 368000, "dgp_n_nonzero_dwpcs": 368000, "dgp_nonzero_mean": 3.150525158483583, "dgp_nonzero_sd": 0.09235368851096597, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Gene)-[:EXPRESSES_AeG]-(n1)-[:EXPRESSES_AeG]-(n2)<-[:REGULATES_GrG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 56849 // TCEAL7\nAND n3.identifier = 6309 // SC5D\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)<-[:REGULATES_GrG]-()),\nsize(()<-[:REGULATES_GrG]-(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": 43706963, "adjusted_p_value": 0.01005028635383048, "path_count": 679, "dwpc": 3.767024288138297, "p_value": 5.050395152678633e-05, "reversed": false, "metapath_abbreviation": "GeAuG<rG", "metapath_name": "Gene–expresses–Anatomy–upregulates–Gene←regulates←Gene", "metapath_length": 3, "metapath_path_count_density": 0.185857, "metapath_path_count_mean": 39.1558, "metapath_path_count_max": 2832, "metapath_dwpc_raw_mean": 5.409830000000001e-06, "metapath_n_similar": 199, "metapath_p_threshold": 6.419019708424056e-05, "metapath_id": "GeAuG<rG", "metapath_reversed": false, "metapath_metaedges": [ [ "Gene", "Anatomy", "expresses", "both" ], [ "Anatomy", "Gene", "upregulates", "both" ], [ "Gene", "Gene", "regulates", "backward" ] ], "dgp_id": 32297486, "dgp_source_degree": 36, "dgp_target_degree": 125, "dgp_n_dwpcs": 368000, "dgp_n_nonzero_dwpcs": 368000, "dgp_nonzero_mean": 3.219622924479821, "dgp_nonzero_sd": 0.1339879901401482, "dgp_reversed": false, "cypher_query": "MATCH path = (n0:Gene)-[:EXPRESSES_AeG]-(n1)-[:UPREGULATES_AuG]-(n2)<-[:REGULATES_GrG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 56849 // TCEAL7\nAND n3.identifier = 6309 // SC5D\nAND n0 <> n2 AND n0 <> n3 AND n2 <> n3\nWITH\n[\nsize((n0)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n1)),\nsize((n1)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(n2)),\nsize((n2)<-[:REGULATES_GrG]-()),\nsize(()<-[:REGULATES_GrG]-(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": 5, "pathcount_table_random_id": 9116890, "pathcount_table_max_id": 169602979 }