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": 22944,
        "identifier": "10855",
        "identifier_type": "int",
        "name": "HPSE",
        "properties": {
            "url": "http://identifiers.org/ncbigene/10855",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "4",
            "description": "heparanase"
        },
        "metanode": "Gene"
    },
    "target": {
        "id": 9014,
        "identifier": "3400",
        "identifier_type": "int",
        "name": "ID4",
        "properties": {
            "url": "http://identifiers.org/ncbigene/3400",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "6",
            "description": "inhibitor of DNA binding 4, dominant negative helix-loop-helix protein"
        },
        "metanode": "Gene"
    },
    "path_counts": [
        {
            "id": 37369077,
            "adjusted_p_value": 9.082256382128991e-11,
            "path_count": 1507,
            "dwpc": 3.5428088548415952,
            "p_value": 4.563947930718086e-13,
            "reversed": false,
            "metapath_abbreviation": "GeAeGcG",
            "metapath_name": "Gene–expresses–Anatomy–expresses–Gene–covaries–Gene",
            "metapath_length": 3,
            "metapath_path_count_density": 0.491192,
            "metapath_path_count_mean": 68.824,
            "metapath_path_count_max": 16177,
            "metapath_dwpc_raw_mean": 1.7037899999999998e-05,
            "metapath_n_similar": 199,
            "metapath_p_threshold": 6.419019708424056e-05,
            "metapath_id": "GeAeGcG",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "expresses",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "expresses",
                    "both"
                ],
                [
                    "Gene",
                    "Gene",
                    "covaries",
                    "both"
                ]
            ],
            "dgp_id": 32162611,
            "dgp_source_degree": 35,
            "dgp_target_degree": 68,
            "dgp_n_dwpcs": 432000,
            "dgp_n_nonzero_dwpcs": 431800,
            "dgp_nonzero_mean": 2.602254635934823,
            "dgp_nonzero_sd": 0.11874052266385927,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Gene)-[:EXPRESSES_AeG]-(n1)-[:EXPRESSES_AeG]-(n2)-[:COVARIES_GcG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 10855 // HPSE\nAND n3.identifier = 3400 // ID4\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)-[:COVARIES_GcG]-()),\nsize(()-[:COVARIES_GcG]-(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": 106676179,
            "adjusted_p_value": 0.0026092084424447705,
            "path_count": 186,
            "dwpc": 3.1671789068183167,
            "p_value": 1.3111600213290304e-05,
            "reversed": false,
            "metapath_abbreviation": "GuAeGcG",
            "metapath_name": "Gene–upregulates–Anatomy–expresses–Gene–covaries–Gene",
            "metapath_length": 3,
            "metapath_path_count_density": 0.408713,
            "metapath_path_count_mean": 14.3401,
            "metapath_path_count_max": 6757,
            "metapath_dwpc_raw_mean": 1.25236e-05,
            "metapath_n_similar": 199,
            "metapath_p_threshold": 6.419019708424056e-05,
            "metapath_id": "GuAeGcG",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "upregulates",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "expresses",
                    "both"
                ],
                [
                    "Gene",
                    "Gene",
                    "covaries",
                    "both"
                ]
            ],
            "dgp_id": 36224087,
            "dgp_source_degree": 4,
            "dgp_target_degree": 68,
            "dgp_n_dwpcs": 3225600,
            "dgp_n_nonzero_dwpcs": 3225600,
            "dgp_nonzero_mean": 2.4292779646102773,
            "dgp_nonzero_sd": 0.16118737142836323,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Gene)-[:UPREGULATES_AuG]-(n1)-[:EXPRESSES_AeG]-(n2)-[:COVARIES_GcG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 10855 // HPSE\nAND n3.identifier = 3400 // ID4\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)-[:COVARIES_GcG]-()),\nsize(()-[:COVARIES_GcG]-(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": 73110424,
            "adjusted_p_value": 0.009551127992104875,
            "path_count": 85,
            "dwpc": 3.4565439642995233,
            "p_value": 4.799561805077827e-05,
            "reversed": false,
            "metapath_abbreviation": "GuAdGcG",
            "metapath_name": "Gene–upregulates–Anatomy–downregulates–Gene–covaries–Gene",
            "metapath_length": 3,
            "metapath_path_count_density": 0.34624299999999997,
            "metapath_path_count_mean": 4.56433,
            "metapath_path_count_max": 1812,
            "metapath_dwpc_raw_mean": 1.48281e-05,
            "metapath_n_similar": 199,
            "metapath_p_threshold": 6.419019708424056e-05,
            "metapath_id": "GuAdGcG",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "upregulates",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "downregulates",
                    "both"
                ],
                [
                    "Gene",
                    "Gene",
                    "covaries",
                    "both"
                ]
            ],
            "dgp_id": 36183337,
            "dgp_source_degree": 4,
            "dgp_target_degree": 68,
            "dgp_n_dwpcs": 3225600,
            "dgp_n_nonzero_dwpcs": 3225600,
            "dgp_nonzero_mean": 2.369525527000389,
            "dgp_nonzero_sd": 0.2468919698668274,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Gene)-[:UPREGULATES_AuG]-(n1)-[:DOWNREGULATES_AdG]-(n2)-[:COVARIES_GcG]-(n3:Gene)\nUSING JOIN ON n1\nWHERE n0.identifier = 10855 // HPSE\nAND n3.identifier = 3400 // ID4\nAND n0 <> n2 AND n0 <> n3 AND n2 <> n3\nWITH\n[\nsize((n0)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(n1)),\nsize((n1)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(n2)),\nsize((n2)-[:COVARIES_GcG]-()),\nsize(()-[:COVARIES_GcG]-(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": 37369077,
    "pathcount_table_max_id": 169602979
}