-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmodule_docu.txt
143 lines (106 loc) · 10.8 KB
/
module_docu.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
local flask: cd dataserver; export FLASK_ENV=app.py; flask run
###################################################################################
NEW SELECTION
Create new selection sets in the database:
POST request structure
{"selection_name": "DOCK2_variants","node_ids":[15266,12890,4530,16688]}
node_ids are internal IDs
App CALL via
http://127.0.0.1:1337/api/ppi/selection/create
app def: create_selection(db_namespace)
table call: def create_selection(db_namespace, selection_name, node_ids)
###################################################################################
COMBINE TWO NODE SETS
Combine two set of nodes by starting from one by indivdual depth first search (d_max=2)
POST request structure
{"seeds":[1,2,3,4],"variants":[99,100,5]}
node_ids are internal IDs
App CALL via
http://127.0.0.1:1337/api/ppi/node/connect_set_dfs
Returns: {"seeds":[1,2,3,4],"variants":[99,100,5],"linker":[15465,16243]}
###################################################################################
RANDOM WALK
Start a simulated random walk from set of node_ids
If list of variants is populated, variants will be attached to the set of returned nodes
Returns nodes with visiting frequency and group (0: seed, 1: visited node, 2: variant)
and all links found between them.
POST request structure
{"node_ids":[1,2,3,4],"variants":[99,100,5],"restart_probability": 0.8,"max_elements": 10}
App CALL via
http://127.0.0.1:1337/api/ppi/node/random_walk
Returns:
{"links":[{"source":2,"target":15465,"values":1},{"source":2,"target":15466,"values":1},{"source":2,"target":15469,"values":1},{"source":2,"target":15471,"values":1},{"source":3,"target":11900,"values":1},{"source":3,"target":15465,"values":1},{"source":3,"target":15466,"values":1},{"source":3,"target":15467,"values":1},{"source":3,"target":15469,"values":1},{"source":3,"target":15471,"values":1},{"source":5,"target":15465,"values":1},{"source":5,"target":15467,"values":1},{"source":5,"target":15469,"values":1},{"source":5,"target":15471,"values":1},{"source":99,"target":100,"values":1},{"source":100,"target":99,"values":1},{"source":11900,"target":3,"values":1},{"source":11900,"target":15466,"values":1},{"source":11900,"target":15467,"values":1},{"source":15465,"target":2,"values":1},{"source":15471,"target":3,"values":1},{"source":15471,"target":5,"values":1}],
"nodes":[{"frequency":0.20155,"group":0,"id":3,"symbol":"RGS5"},{"frequency":0.20053,"group":0,"id":2,"symbol":"RGS4"},{"frequency":0.19908,"group":0,"id":1,"symbol":"ASIC1"},{"frequency":0.19852,"group":0,"id":4,"symbol":"RGS6"},{"frequency":0.00923,"group":1,"id":15465,"symbol":"GNAI1"},{"frequency":0.00885,"group":1,"id":15466,"symbol":"GNAI2"},{"frequency":0.00882,"group":1,"id":15469,"symbol":"GNAO1"},{"frequency":0.00852,"group":1,"id":15471,"symbol":"GNAQ"},{"frequency":0.00586,"group":1,"id":15467,"symbol":"GNAI3"},{"frequency":0.0058,"group":1,"id":11900,"symbol":"ADRB2"},{"frequency":0.00013,"group":2,"id":5,"symbol":"RGS7"},{"frequency":0.0,"group":2,"id":99,"symbol":"RPL14"},{"frequency":0.0,"group":2,"id":100,"symbol":"RPL15"}]}
###################################################################################
SUB LAYOUT
generate network spring layout
POST request structure
{"node_ids":[3,2,1,4,15465,15466,15469,15471,15467,11900,5,99,100]}
node_ids are internal IDs
App CALL via
http://127.0.0.1:1337/api/ppi/node/sub_layout
Returns:
{"nodes":[{"id":[11900],"v":[0.5344443538461539,0.4968874615384616,0.3674840000000001]},{"id":[15465],"v":[0.4931649538461539,0.4300884615384616,0.3930590000000001]},{"id":[15466],"v":[0.4918485538461539,0.4319016615384616,0.3923636000000001]},{"id":[15467],"v":[0.4986453538461539,0.4463416615384616,0.3890072000000001]},{"id":[15469],"v":[0.4281747538461539,0.5453502615384616,0.4495158000000001]}]}
###################################################################################
SCALE SELECTION
shrinks node selection towards the center of mass
POST request structure
{"node_ids":[1,2,3,4],"layout":"3_mol"}
App CALL via
http://127.0.0.1:1337/api/ppi/node/scale_selection
Returns:
{"nodes":[{"id":[11900],"v":[0.5344443538461539,0.4968874615384616,0.3674840000000001]},{"id":[15465],"v":[0.4931649538461539,0.4300884615384616,0.3930590000000001]},{"id":[15466],"v":[0.4918485538461539,0.4319016615384616,0.3923636000000001]},{"id":[15467],"v":[0.4986453538461539,0.4463416615384616,0.3890072000000001]},{"id":[15469],"v":[0.4281747538461539,0.5453502615384616,0.4495158000000001]}]}
###################################################################################
GENE CARD
quick retrieval of basic informations for individual genes-
symbol, name, degree, functions, diseases, tissue expression
GET REQUEST
App CALL via
http://127.0.0.1:1337/api/ppi/node/gene_card?node_id=1111
RETURNS:
[{"degree":27,"diseases":[""],"functions":["DNA-binding transcription factor activity","DNA binding","transcription coregulator activity"],"name":"TATA-box binding protein associated factor 13","node_id":1111,"symbol":"TAF13","tissue":[{"symbol":"Adipose - Subcutaneous","value":28.5435},{"symbol":"Adipose - Visceral (Omentum)","value":34.187},{"symbol":"Adrenal Gland","value":21.276},{"symbol":"Artery - Aorta","value":39.6401},{"symbol":"Artery - Coronary","value":38.0428},{"symbol":"Artery - Tibial","value":35.4422},{"symbol":"Bladder","value":23.213},{"symbol":"Brain - Amygdala","value":30.423},{"symbol":"Brain - Anterior cingulate cortex (BA24)","value":35.3472},{"symbol":"Brain - Caudate (basal ganglia)","value":26.5117},{"symbol":"Brain - Cerebellar Hemisphere","value":29.5729},{"symbol":"Brain - Cerebellum","value":23.3154},{"symbol":"Brain - Cortex","value":33.8913},{"symbol":"Brain - Frontal Cortex (BA9)","value":54.1238},{"symbol":"Brain - Hippocampus","value":32.414},{"symbol":"Brain - Hypothalamus","value":44.8378},{"symbol":"Brain - Nucleus accumbens (basal ganglia)","value":25.0568},{"symbol":"Brain - Putamen (basal ganglia)","value":25.4485},{"symbol":"Brain - Spinal cord (cervical c-1)","value":58.5592},{"symbol":"Brain - Substantia nigra","value":43.2674},{"symbol":"Breast - Mammary Tissue","value":25.7523},{"symbol":"Cells - Cultured fibroblasts","value":58.9088},{"symbol":"Cells - EBV-transformed lymphocytes","value":22.0757},{"symbol":"Cervix - Ectocervix","value":25.0157},{"symbol":"Cervix - Endocervix","value":18.6899},{"symbol":"Colon - Sigmoid","value":29.8879},{"symbol":"Colon - Transverse","value":23.4151},{"symbol":"Esophagus - Gastroesophageal Junction","value":27.6162},{"symbol":"Esophagus - Mucosa","value":32.9651},{"symbol":"Esophagus - Muscularis","value":29.3494},{"symbol":"Fallopian Tube","value":23.9589},{"symbol":"Heart - Atrial Appendage","value":20.6464},{"symbol":"Heart - Left Ventricle","value":18.571},{"symbol":"Kidney - Cortex","value":18.7233},{"symbol":"Kidney - Medulla","value":27.6542},{"symbol":"Liver","value":16.9131},{"symbol":"Lung","value":28.5688},{"symbol":"Minor Salivary Gland","value":20.507},{"symbol":"Muscle - Skeletal","value":33.161},{"symbol":"Nerve - Tibial","value":30.1481},{"symbol":"Ovary","value":12.5578},{"symbol":"Pancreas","value":8.614},{"symbol":"Pituitary","value":34.8488},{"symbol":"Prostate","value":27.1133},{"symbol":"Skin - Not Sun Exposed (Suprapubic)","value":27.2809},{"symbol":"Skin - Sun Exposed (Lower leg)","value":26.6451},{"symbol":"Small Intestine - Terminal Ileum","value":18.1641},{"symbol":"Spleen","value":16.5622},{"symbol":"Stomach","value":20.5823},{"symbol":"Testis","value":26.3358},{"symbol":"Thyroid","value":26.8992},{"symbol":"Uterus","value":23.964},{"symbol":"Vagina","value":27.7009},{"symbol":"Whole Blood","value":5.72941}]}]
###################################################################################
ATTRIBUTE to ATTRIBUTE mapping
Gives phenotypes linked to OMIM disease
GET REQUEST
App CALL via
http://127.0.0.1:1337/api/ppi/attribute/attribute2attribute?att_id=81990
RETURNS:
[{"int_id":67976,"phenotype":"Autosomal recessive inheritance"},{"int_id":70435,"phenotype":"Aminoaciduria"}]
###################################################################################
GET ATTRIBUTES FOR NODES
GET REQUEST
http://127.0.0.1:1337/api/ppi/attribute/?node_id=1&namespace=DISEASE
(takes all available attribute namespaces)
RETURNS:
[{"description":null,"external_id":"DOID:2316","full_name":"","id":4967,"name":"brain ischemia","value":null}]
###################################################################################
SPECIAL MODULE -- RANDOM WALK PLUS CONNECTING VARIANTS WITH SEEDS
Does random walk and connecting two sets by df-search at once
GET REQUEST
App CALL via
http://127.0.0.1:1337/api/ppi/node/random_walk_dock2
RETURNS
{"links":[{"source":2,"target":15465,"values":1},{"source":3,"target":15465,"values":1},{"source":4,"target":16243,"values":1},{"source":5,"target":15465,"values":1},{"source":5,"target":16243,"values":1},{"source":99,"target":100,"values":1},{"source":100,"target":99,"values":1},{"source":15465,"target":2,"values":1},{"source":15465,"target":3,"values":1},{"source":15465,"target":5,"values":1},{"source":16243,"target":4,"values":1},{"source":16243,"target":5,"values":1}],"nodes":[{"frequency":0.20252,"group":0,"id":3,"symbol":"RGS5"},{"frequency":0.20028,"group":0,"id":4,"symbol":"RGS6"},{"frequency":0.19946,"group":0,"id":1,"symbol":"ASIC1"},{"frequency":0.19921,"group":0,"id":2,"symbol":"RGS4"},{"frequency":0.00921,"group":1,"id":15469,"symbol":"GNAO1"},{"frequency":0.00874,"group":1,"id":15466,"symbol":"GNAI2"},{"frequency":0.00845,"group":1,"id":15465,"symbol":"GNAI1"},{"frequency":0.00824,"group":1,"id":15471,"symbol":"GNAQ"},{"frequency":0.00619,"group":1,"id":11900,"symbol":"ADRB2"},{"frequency":0.00602,"group":1,"id":16851,"symbol":"APP"},{"frequency":9e-05,"group":2,"id":5,"symbol":"RGS7"},{"frequency":1e-05,"group":2,"id":99,"symbol":"RPL14"},{"frequency":0.0,"group":2,"id":100,"symbol":"RPL15"}]}
NOTE! "links" result from dfs and "nodes" from random walk
###################################################################################
WRITE JSON STRINGS WITH FILENAME TO DATABASE
INSERT INTO Vrnetzer_sessions.user_files (filename,json_str) VALUES ("%s","%s")
POST REQUEST
any valid jsopn that defines a filename such as: {"filename": "filename_x","pname": "F. Mueller","variants": [{"name": "galanin receptor 3","node_id": 15266,"symbol": "GALR3"}]}
App CALL via
http://127.0.0.1:1337/api/ppi/export/results
RETURNS
'0' + writes to db
###################################################################################
LOAD LIST OF AVAILABLE FILENAMES FROM DB
http://127.0.0.1:1337/api/ppi/import/results
RETURNS
[{"filename":["test_filename","filename_a","filename_b","filename_c","filename_x"]}]
###################################################################################
RECEIVING JSON BY FILENAME
GET REQUEST
App CALL via
http://127.0.0.1:1337/api/ppi/import/resultsfilename?fname='somefilename'
RETURNS
json