Closed dhimmel closed 5 years ago
As of https://github.com/greenelab/hetmech-backend/pull/48/commits/0b493648801f0a55de5157c0a53a960c5ceb346f, the output is like:
{
"source_id": 28735,
"target_id": 40330,
"n_metapaths": 3,
"pathcount_table_random_id": 154386408,
"pathcount_table_max_id": 166199174
}
@vincerubinetti does this look good to you.
Also I posted the method for selecting a random instance from a Django model on StackOverflow.
It is also trivial to implement the following return structure which uses the existing NodeSerializer
:
{
"source": {
"id": 20528,
"identifier": "6927",
"identifier_type": "int",
"name": "HNF1A",
"data": {
"url": "http://identifiers.org/ncbigene/6927",
"source": "Entrez Gene",
"license": "CC0 1.0",
"chromosome": "12",
"description": "HNF1 homeobox A"
},
"metanode": "Gene"
},
"target": {
"id": 2137,
"identifier": "3554",
"identifier_type": "int",
"name": "IL1R1",
"data": {
"url": "http://identifiers.org/ncbigene/3554",
"source": "Entrez Gene",
"license": "CC0 1.0",
"chromosome": "2",
"description": "interleukin 1 receptor, type I"
},
"metanode": "Gene"
},
"n_metapaths": 1,
"pathcount_table_random_id": 105421750,
"pathcount_table_max_id": 166199174
}
@vincerubinetti do you prefer this?
Response is like: