Hello,
I've put together a small script to retrieve gene information from a REST service. The script works well but unfortunately relies on small snippet of Python code.
To become more user friendly (ie having to install python on all machines), I'm trying to convert the Python portion to JSL code.
Unfortunately, I'm stuck trying to interpret the python code in a jsl equivalent.
Here's the code I have so far
names default to here(1);
clear log();
genelist={"Aif1","Cd68","Cst7","Clec7a","Ccl6"};
Python Init();
Python Send( genelist );
ml = Python Submit(
"\[
import json
import requests
ENRICHR_URL = 'http://maayanlab.cloud/Enrichr/addList'
genes_str = '\n'.join(genelist)
description = 'TRANSPOSiON'
payload = {
'list': (genes_str),
'description': (description)
}
response = requests.post(ENRICHR_URL, files=payload)
if not response.ok:
raise Exception('Error analyzing gene list')
data = json.loads(response.text)
print(data)]\"
);
//Wait( 0.5 );
getstr = Python Get( data );
Python Term();Any suggestions would be greatly appreciated,
Thanks
Sebastien