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": 13579,
        "identifier": "4437",
        "identifier_type": "int",
        "name": "MSH3",
        "properties": {
            "url": "http://identifiers.org/ncbigene/4437",
            "source": "Entrez Gene",
            "license": "CC0 1.0",
            "chromosome": "5",
            "description": "mutS homolog 3"
        },
        "metanode": "Gene"
    },
    "target": {
        "id": 40129,
        "identifier": "WP1471_r82750",
        "identifier_type": "str",
        "name": "TOR Signaling",
        "properties": {
            "url": "http://www.wikipathways.org/instance/WP1471_r82750",
            "source": "WikiPathways",
            "license": "CC BY 3.0"
        },
        "metanode": "Pathway"
    },
    "path_counts": [
        {
            "id": 13296193,
            "adjusted_p_value": 0.0022270258616906534,
            "path_count": 283,
            "dwpc": 1.892010627725295,
            "p_value": 4.7383528972141565e-05,
            "reversed": false,
            "metapath_abbreviation": "GeAdGpPW",
            "metapath_name": "Gene–expresses–Anatomy–downregulates–Gene–participates–Pathway",
            "metapath_length": 3,
            "metapath_path_count_density": 0.8381299999999999,
            "metapath_path_count_mean": 124.3,
            "metapath_path_count_max": 10352,
            "metapath_dwpc_raw_mean": 4.688e-05,
            "metapath_n_similar": 47,
            "metapath_p_threshold": 0.0005654360906725609,
            "metapath_id": "GeAdGpPW",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "expresses",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "downregulates",
                    "both"
                ],
                [
                    "Gene",
                    "Pathway",
                    "participates",
                    "both"
                ]
            ],
            "dgp_id": 32086357,
            "dgp_source_degree": 46,
            "dgp_target_degree": 36,
            "dgp_n_dwpcs": 772800,
            "dgp_n_nonzero_dwpcs": 772800,
            "dgp_nonzero_mean": 1.2263459983293856,
            "dgp_nonzero_sd": 0.1482891509456548,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Gene)-[:EXPRESSES_AeG]-(n1)-[:DOWNREGULATES_AdG]-(n2)-[:PARTICIPATES_GpPW]-(n3:Pathway)\nUSING JOIN ON n1\nWHERE n0.identifier = 4437 // MSH3\nAND n3.identifier = 'WP1471_r82750' // TOR Signaling\nAND n0 <> n2\nWITH\n[\nsize((n0)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n1)),\nsize((n1)-[:DOWNREGULATES_AdG]-()),\nsize(()-[:DOWNREGULATES_AdG]-(n2)),\nsize((n2)-[:PARTICIPATES_GpPW]-()),\nsize(()-[:PARTICIPATES_GpPW]-(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": 147819240,
            "adjusted_p_value": 0.002908523721824169,
            "path_count": 223,
            "dwpc": 1.8357675422727966,
            "p_value": 6.188348344306743e-05,
            "reversed": false,
            "metapath_abbreviation": "GeAuGpPW",
            "metapath_name": "Gene–expresses–Anatomy–upregulates–Gene–participates–Pathway",
            "metapath_length": 3,
            "metapath_path_count_density": 0.8334219999999999,
            "metapath_path_count_mean": 123.65899999999999,
            "metapath_path_count_max": 8985,
            "metapath_dwpc_raw_mean": 4.93454e-05,
            "metapath_n_similar": 47,
            "metapath_p_threshold": 0.0005654360906725609,
            "metapath_id": "GeAuGpPW",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "expresses",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "upregulates",
                    "both"
                ],
                [
                    "Gene",
                    "Pathway",
                    "participates",
                    "both"
                ]
            ],
            "dgp_id": 32387857,
            "dgp_source_degree": 46,
            "dgp_target_degree": 36,
            "dgp_n_dwpcs": 772800,
            "dgp_n_nonzero_dwpcs": 772800,
            "dgp_nonzero_mean": 1.2380046072355437,
            "dgp_nonzero_sd": 0.13725627762055062,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Gene)-[:EXPRESSES_AeG]-(n1)-[:UPREGULATES_AuG]-(n2)-[:PARTICIPATES_GpPW]-(n3:Pathway)\nUSING JOIN ON n1\nWHERE n0.identifier = 4437 // MSH3\nAND n3.identifier = 'WP1471_r82750' // TOR Signaling\nAND n0 <> n2\nWITH\n[\nsize((n0)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n1)),\nsize((n1)-[:UPREGULATES_AuG]-()),\nsize(()-[:UPREGULATES_AuG]-(n2)),\nsize((n2)-[:PARTICIPATES_GpPW]-()),\nsize(()-[:PARTICIPATES_GpPW]-(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": 150430179,
            "adjusted_p_value": 0.005220400069579087,
            "path_count": 1225,
            "dwpc": 1.654943405255587,
            "p_value": 0.00011107234190593803,
            "reversed": false,
            "metapath_abbreviation": "GeAeGpPW",
            "metapath_name": "Gene–expresses–Anatomy–expresses–Gene–participates–Pathway",
            "metapath_length": 3,
            "metapath_path_count_density": 0.8626309999999999,
            "metapath_path_count_mean": 665.92,
            "metapath_path_count_max": 55830,
            "metapath_dwpc_raw_mean": 7.12822e-05,
            "metapath_n_similar": 47,
            "metapath_p_threshold": 0.0005654360906725609,
            "metapath_id": "GeAeGpPW",
            "metapath_reversed": false,
            "metapath_metaedges": [
                [
                    "Gene",
                    "Anatomy",
                    "expresses",
                    "both"
                ],
                [
                    "Anatomy",
                    "Gene",
                    "expresses",
                    "both"
                ],
                [
                    "Gene",
                    "Pathway",
                    "participates",
                    "both"
                ]
            ],
            "dgp_id": 32233057,
            "dgp_source_degree": 46,
            "dgp_target_degree": 36,
            "dgp_n_dwpcs": 772800,
            "dgp_n_nonzero_dwpcs": 772800,
            "dgp_nonzero_mean": 1.235660333797718,
            "dgp_nonzero_sd": 0.10353677305531254,
            "dgp_reversed": false,
            "cypher_query": "MATCH path = (n0:Gene)-[:EXPRESSES_AeG]-(n1)-[:EXPRESSES_AeG]-(n2)-[:PARTICIPATES_GpPW]-(n3:Pathway)\nUSING JOIN ON n1\nWHERE n0.identifier = 4437 // MSH3\nAND n3.identifier = 'WP1471_r82750' // TOR Signaling\nAND n0 <> n2\nWITH\n[\nsize((n0)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n1)),\nsize((n1)-[:EXPRESSES_AeG]-()),\nsize(()-[:EXPRESSES_AeG]-(n2)),\nsize((n2)-[:PARTICIPATES_GpPW]-()),\nsize(()-[:PARTICIPATES_GpPW]-(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": 150430179,
    "pathcount_table_max_id": 169602979
}