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": 26881,
        "identifier": "22909",
        "identifier_type": "int",
        "name": "FAN1",
        "properties": {
            "url": "http://identifiers.org/ncbigene/22909",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "15",
            "description": "FANCD2/FANCI-associated nuclease 1"
        },
        "metanode": "Gene"
    },
    "target": {
        "id": 24602,
        "identifier": "390",
        "identifier_type": "int",
        "name": "RND3",
        "properties": {
            "url": "http://identifiers.org/ncbigene/390",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "2",
            "description": "Rho family GTPase 3"
        },
        "metanode": "Gene"
    },
    "path_counts": [
        {
            "id": 83285321,
            "adjusted_p_value": 0.002311951166489114,
            "path_count": 4387,
            "dwpc": 3.5378437343640026,
            "p_value": 1.1617845057734242e-05,
            "reversed": false,
            "metapath_abbreviation": "GeAeGr>G",
            "metapath_name": "Gene–expresses–Anatomy–expresses–Gene→regulates→Gene",
            "metapath_length": 3,
            "metapath_path_count_density": 0.290157,
            "metapath_path_count_mean": 203.988,
            "metapath_path_count_max": 67513,
            "metapath_dwpc_raw_mean": 7.691210000000001e-06,
            "metapath_n_similar": 199,
            "metapath_p_threshold": 6.419019708424056e-05,
            "metapath_id": "GeAeGr>G",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "expresses",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "expresses",
                    "both"
                ],
                [
                    "Gene",
                    "Gene",
                    "regulates",
                    "forward"
                ]
            ],
            "dgp_id": 32261118,
            "dgp_source_degree": 44,
            "dgp_target_degree": 155,
            "dgp_n_dwpcs": 59000,
            "dgp_n_nonzero_dwpcs": 59000,
            "dgp_nonzero_mean": 3.342947858957172,
            "dgp_nonzero_sd": 0.04524279508926039,
            "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 = 22909 // FAN1\nAND n3.identifier = 390 // RND3\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": 129000887,
            "adjusted_p_value": 0.009464213579053677,
            "path_count": 879,
            "dwpc": 3.7384310454429723,
            "p_value": 4.755886220629989e-05,
            "reversed": false,
            "metapath_abbreviation": "GeAuGr>G",
            "metapath_name": "Gene–expresses–Anatomy–upregulates–Gene→regulates→Gene",
            "metapath_length": 3,
            "metapath_path_count_density": 0.275194,
            "metapath_path_count_mean": 38.1606,
            "metapath_path_count_max": 11526,
            "metapath_dwpc_raw_mean": 5.270599999999999e-06,
            "metapath_n_similar": 199,
            "metapath_p_threshold": 6.419019708424056e-05,
            "metapath_id": "GeAuGr>G",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "expresses",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "upregulates",
                    "both"
                ],
                [
                    "Gene",
                    "Gene",
                    "regulates",
                    "forward"
                ]
            ],
            "dgp_id": 32415918,
            "dgp_source_degree": 44,
            "dgp_target_degree": 155,
            "dgp_n_dwpcs": 59000,
            "dgp_n_nonzero_dwpcs": 59000,
            "dgp_nonzero_mean": 3.375698622563631,
            "dgp_nonzero_sd": 0.09001191762969761,
            "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 = 22909 // FAN1\nAND n3.identifier = 390 // RND3\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": 2,
    "pathcount_table_random_id": 83285321,
    "pathcount_table_max_id": 169602979
}