Kinase Enrichment Analysis 3 (KEA3) infers upstream kinases whose putative substrates are overrepresented in a user-inputted list of proteins or differentially phosphorylated proteins.
KEA3 has an API to enable programmatic access for querying the KEA3 database
The KEA3 REST API uses POST to transport user submitted JSON-formatted gene sets and JSON-formatted query results between the KEA3 server and the user's script. The user gene set and optional additional information are encoded in JSON format.
Method: POST
URL: /KEA3/api/enrich/
Returns: JSON array of KEA3 library result objects
Parameters:
query_name: String
gene_set: An array of strings
The following returns results from all KEA3 libraries in JSON format:
$ curl -d '{"query_name":"myQuery", "gene_set":["FOXM1","SMAD9","MYC","SMAD3","STAT1","STAT3"]}' -H 'Content-Type: application/json' https://maayanlab.cloud/kea3/api/enrich/
library(httr)
library(jsonlite)
genes = c("SMAD9","FOXO1","MYC","STAT1",'STAT3',"SMAD3")
url = "https://maayanlab.cloud/kea3/api/enrich/"
encode = "json"
payload = list(query_name = "myQuery", gene_set = genes)
response = POST(url = url, body = payload, encode = encode)
json = content(response, "text")
results = fromJSON(json)
import json
import requests
from pprint import pprint
from time import sleep
def get_kea3_results(gene_set, query_name):
ADDLIST_URL = 'https://amp.pharm.mssm.edu/kea3/api/enrich/'
payload = {
'gene_set': gene_set,
'query_name': query_name
}
response = requests.post(ADDLIST_URL, data=json.dumps(payload))
if not response.ok:
raise Exception('Error analyzing gene list')
sleep(1)
return json.loads(response.text)
def main():
gene_list = ['ZNF264', 'TMPO', 'ISL2', 'MAP3K8', 'EFNB1', 'EIF3C', 'OSBPL11',
'ABCF1', 'UTRN', 'OPRK1', 'TSC1', 'GAB2', 'RPS3P2', 'DDX3X', 'PPP1CA',
'NF2', 'RBM3', 'IRAK1', 'KCNH2', 'NPR1', 'MOCOS', 'ITSN2', 'MITF',
'ARAF', 'DAPK2', 'EPHB2', 'CACNA1G', 'YWHAZ', 'GMFB']
pprint(get_kea3_results(gene_list, 'Test query'), indent=2)
return None
if __name__ == '__main__':
main()