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": 46871,
        "identifier": "GO:0044273",
        "identifier_type": "str",
        "name": "sulfur compound catabolic process",
        "properties": {
            "url": "http://purl.obolibrary.org/obo/GO_0044273",
            "source": "Gene Ontology",
            "license": "CC BY 4.0"
        },
        "metanode": "Biological Process"
    },
    "target": {
        "id": 42522,
        "identifier": "51635",
        "identifier_type": "int",
        "name": "DHRS7",
        "properties": {
            "url": "http://identifiers.org/ncbigene/51635",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "14",
            "description": "dehydrogenase/reductase (SDR family) member 7"
        },
        "metanode": "Gene"
    },
    "path_counts": [
        {
            "id": 80672868,
            "adjusted_p_value": 0.008560775622594042,
            "path_count": 109,
            "dwpc": 2.15623363660758,
            "p_value": 0.00018214416218285197,
            "reversed": false,
            "metapath_abbreviation": "BPpGuAuG",
            "metapath_name": "Biological Process–participates–Gene–upregulates–Anatomy–upregulates–Gene",
            "metapath_length": 3,
            "metapath_path_count_density": 0.710444,
            "metapath_path_count_mean": 42.83,
            "metapath_path_count_max": 4956,
            "metapath_dwpc_raw_mean": 2.62684e-05,
            "metapath_n_similar": 47,
            "metapath_p_threshold": 0.0003263577347198679,
            "metapath_id": "BPpGuAuG",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Biological Process",
                    "Gene",
                    "participates",
                    "both"
                ],
                [
                    "Gene",
                    "Anatomy",
                    "upregulates",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "upregulates",
                    "both"
                ]
            ],
            "dgp_id": 18133561,
            "dgp_source_degree": 44,
            "dgp_target_degree": 9,
            "dgp_n_dwpcs": 7945800,
            "dgp_n_nonzero_dwpcs": 7945800,
            "dgp_nonzero_mean": 1.54284865282796,
            "dgp_nonzero_sd": 0.15484180102646536,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:BiologicalProcess)-[:PARTICIPATES_GpBP]-(n1)-[:UPREGULATES_AuG]-(n2)-[:UPREGULATES_AuG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 'GO:0044273' // sulfur compound catabolic process\nAND n3.identifier = 51635 // DHRS7\nAND n1 <> n3\nWITH\n[\nsize((n0)-[:PARTICIPATES_GpBP]-()),\nsize(()-[:PARTICIPATES_GpBP]-(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"
        }
    ],
    "n_metapaths": 1,
    "pathcount_table_random_id": 80672868,
    "pathcount_table_max_id": 169602979
}