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

{
    "source": {
        "id": 4881,
        "identifier": "346157",
        "identifier_type": "int",
        "name": "ZNF391",
        "properties": {
            "url": "http://identifiers.org/ncbigene/346157",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "6",
            "description": "zinc finger protein 391"
        },
        "metanode": "Gene"
    },
    "target": {
        "id": 39717,
        "identifier": "6597",
        "identifier_type": "int",
        "name": "SMARCA4",
        "properties": {
            "url": "http://identifiers.org/ncbigene/6597",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "19",
            "description": "SWI/SNF related, matrix associated, actin dependent regulator of chromatin, subfamily a, member 4"
        },
        "metanode": "Gene"
    },
    "path_counts": [
        {
            "id": 10379416,
            "adjusted_p_value": 7.097231659854215e-05,
            "path_count": 1220,
            "dwpc": 3.0112043163957547,
            "p_value": 3.5664480702785004e-07,
            "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": 32136387,
            "dgp_source_degree": 10,
            "dgp_target_degree": 144,
            "dgp_n_dwpcs": 592000,
            "dgp_n_nonzero_dwpcs": 592000,
            "dgp_nonzero_mean": 2.5581744060817475,
            "dgp_nonzero_sd": 0.08667614450373883,
            "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 = 346157 // ZNF391\nAND n3.identifier = 6597 // SMARCA4\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"
        }
    ],
    "n_metapaths": 1,
    "pathcount_table_random_id": 10379416,
    "pathcount_table_max_id": 169602979
}