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": 42956,
        "identifier": "UBERON:0001460",
        "identifier_type": "str",
        "name": "arm",
        "properties": {
            "url": "http://purl.obolibrary.org/obo/UBERON_0001460",
            "bto_id": "BTO:0001435",
            "source": "Uberon",
            "license": "CC BY 3.0",
            "mesh_id": "D001132"
        },
        "metanode": "Anatomy"
    },
    "target": {
        "id": 33996,
        "identifier": "GO:0080019",
        "identifier_type": "str",
        "name": "fatty-acyl-CoA reductase (alcohol-forming) activity",
        "properties": {
            "url": "http://purl.obolibrary.org/obo/GO_0080019",
            "source": "Gene Ontology",
            "license": "CC BY 4.0"
        },
        "metanode": "Molecular Function"
    },
    "path_counts": [
        {
            "id": 123674369,
            "adjusted_p_value": 0.05944000647359745,
            "path_count": 1,
            "dwpc": 3.2260126603987795,
            "p_value": 0.00396266709823983,
            "reversed": false,
            "metapath_abbreviation": "AlDuGpMF",
            "metapath_name": "Anatomy–localizes–Disease–upregulates–Gene–participates–Molecular Function",
            "metapath_length": 3,
            "metapath_path_count_density": 0.236089,
            "metapath_path_count_mean": 0.9852780000000001,
            "metapath_path_count_max": 218,
            "metapath_dwpc_raw_mean": 0.000131449,
            "metapath_n_similar": 15,
            "metapath_p_threshold": 0.005053733687704034,
            "metapath_id": "AlDuGpMF",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Anatomy",
                    "Disease",
                    "localizes",
                    "both"
                ],
                [
                    "Disease",
                    "Gene",
                    "upregulates",
                    "both"
                ],
                [
                    "Gene",
                    "Molecular Function",
                    "participates",
                    "both"
                ]
            ],
            "dgp_id": 9533358,
            "dgp_source_degree": 15,
            "dgp_target_degree": 2,
            "dgp_n_dwpcs": 1246000,
            "dgp_n_nonzero_dwpcs": 114800,
            "dgp_nonzero_mean": 2.199688390945336,
            "dgp_nonzero_sd": 0.549883993797173,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Anatomy)-[:LOCALIZES_DlA]-(n1)-[:UPREGULATES_DuG]-(n2)-[:PARTICIPATES_GpMF]-(n3:MolecularFunction)\nUSING JOIN ON n1\nWHERE n0.identifier = 'UBERON:0001460' // arm\nAND n3.identifier = 'GO:0080019' // fatty-acyl-CoA reductase (alcohol-forming) activity\nWITH\n[\nsize((n0)-[:LOCALIZES_DlA]-()),\nsize(()-[:LOCALIZES_DlA]-(n1)),\nsize((n1)-[:UPREGULATES_DuG]-()),\nsize(()-[:UPREGULATES_DuG]-(n2)),\nsize((n2)-[:PARTICIPATES_GpMF]-()),\nsize(()-[:PARTICIPATES_GpMF]-(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": 123674369,
    "pathcount_table_max_id": 169602979
}