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/
HTTP 200 OK
Allow: GET
Content-Type: application/json
Vary: Accept

{
    "source": {
        "id": 1956,
        "identifier": "7003",
        "identifier_type": "int",
        "name": "TEAD1",
        "properties": {
            "url": "http://identifiers.org/ncbigene/7003",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "11",
            "description": "TEA domain family member 1 (SV40 transcriptional enhancer factor)"
        },
        "metanode": "Gene"
    },
    "target": {
        "id": 41087,
        "identifier": "342371",
        "identifier_type": "int",
        "name": "ATXN1L",
        "properties": {
            "url": "http://identifiers.org/ncbigene/342371",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "16",
            "description": "ataxin 1-like"
        },
        "metanode": "Gene"
    },
    "path_counts": [
        {
            "id": 143699287,
            "adjusted_p_value": 3.683110989341764e-06,
            "path_count": 1216,
            "dwpc": 2.6826549114915528,
            "p_value": 1.850809542382796e-08,
            "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": 32181537,
            "dgp_source_degree": 27,
            "dgp_target_degree": 60,
            "dgp_n_dwpcs": 889200,
            "dgp_n_nonzero_dwpcs": 889000,
            "dgp_nonzero_mean": 2.085520006770577,
            "dgp_nonzero_sd": 0.09985708335678052,
            "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 = 7003 // TEAD1\nAND n3.identifier = 342371 // ATXN1L\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": 88456088,
            "adjusted_p_value": 0.0001919920885182562,
            "path_count": 410,
            "dwpc": 3.084136435333317,
            "p_value": 9.647843644133477e-07,
            "reversed": false,
            "metapath_abbreviation": "GuAeGiG",
            "metapath_name": "Gene–upregulates–Anatomy–expresses–Gene–interacts–Gene",
            "metapath_length": 3,
            "metapath_path_count_density": 0.543858,
            "metapath_path_count_mean": 45.4929,
            "metapath_path_count_max": 130148,
            "metapath_dwpc_raw_mean": 1.26525e-05,
            "metapath_n_similar": 199,
            "metapath_p_threshold": 6.419019708424056e-05,
            "metapath_id": "GuAeGiG",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "upregulates",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "expresses",
                    "both"
                ],
                [
                    "Gene",
                    "Gene",
                    "interacts",
                    "both"
                ]
            ],
            "dgp_id": 36231215,
            "dgp_source_degree": 10,
            "dgp_target_degree": 60,
            "dgp_n_dwpcs": 2689200,
            "dgp_n_nonzero_dwpcs": 2688600,
            "dgp_nonzero_mean": 2.510546181207115,
            "dgp_nonzero_sd": 0.11271578302590024,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Gene)-[:UPREGULATES_AuG]-(n1)-[:EXPRESSES_AeG]-(n2)-[:INTERACTS_GiG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 7003 // TEAD1\nAND n3.identifier = 342371 // ATXN1L\nAND n0 <> n2 AND n0 <> n3 AND n2 <> n3\nWITH\n[\nsize((n0)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(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": 52098048,
            "adjusted_p_value": 0.012447548170720414,
            "path_count": 153,
            "dwpc": 3.090531693295043,
            "p_value": 6.255049332020309e-05,
            "reversed": false,
            "metapath_abbreviation": "GuAuGiG",
            "metapath_name": "Gene–upregulates–Anatomy–upregulates–Gene–interacts–Gene",
            "metapath_length": 3,
            "metapath_path_count_density": 0.489464,
            "metapath_path_count_mean": 12.8516,
            "metapath_path_count_max": 35035,
            "metapath_dwpc_raw_mean": 1.56171e-05,
            "metapath_n_similar": 199,
            "metapath_p_threshold": 6.419019708424056e-05,
            "metapath_id": "GuAuGiG",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "upregulates",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "upregulates",
                    "both"
                ],
                [
                    "Gene",
                    "Gene",
                    "interacts",
                    "both"
                ]
            ],
            "dgp_id": 36274215,
            "dgp_source_degree": 10,
            "dgp_target_degree": 60,
            "dgp_n_dwpcs": 2689200,
            "dgp_n_nonzero_dwpcs": 2688600,
            "dgp_nonzero_mean": 2.4574764055197766,
            "dgp_nonzero_sd": 0.15349166055561564,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Gene)-[:UPREGULATES_AuG]-(n1)-[:UPREGULATES_AuG]-(n2)-[:INTERACTS_GiG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 7003 // TEAD1\nAND n3.identifier = 342371 // ATXN1L\nAND n0 <> n2 AND n0 <> n3 AND n2 <> n3\nWITH\n[\nsize((n0)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(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"
        }
    ],
    "n_metapaths": 3,
    "pathcount_table_random_id": 88456088,
    "pathcount_table_max_id": 169602979
}