Menu

Developer guide for CellWhere

CellWhere API*

CellWhere can be queried remotely using the http POST method.

This will return a standard CellWhere output page (in html), so for example if you have a website that gives a user a list of genes or proteins, the CellWhere API can be used to provide the user with a link to automatically open a CellWhere graph for those query genes/proteins.

The POST method also allows for upload of a custom mapping flavor, so if your site or tool is oriented towards a particular research area, you can set CellWhere to automatically highlight subcellular locations that are pertinent to that research area.

* Developers are encouraged to periodically check this page for updates



The fields and their possible values are given in the table below, followed by some example code using the PHP cURL library:

FieldPossible value(s)Effect
ID_typeGeneSymbol
UniprotACC
UniprotID
Entrez
Ensembl
Specify the ID type of your query list:
Gene Symbol (e.g. TP53, Dmd)
Uniprot Accession (e.g. P04637, P11531)
Uniprot ID (e.g. P53_HUMAN, DMD_MOUSE)
Entrez Gene ID (e.g. 7157, 13405)
Ensembl ID (e.g. ENSG00000141510, ENSMUSG00000045103)
ID_listString listing gene/protein IDs. IDs separated by newline character: e.g. "PAX7\nDMD\nMYOZ2\nDAG1"CellWhere will query these gene/protein IDs
uploadedfileText file listing gene/protein Ids. IDs separated by newline character.CellWhere will query these gene/protein IDs
Species_ID9606
10090
3702
6239
83333
7227
10116
559292
CellWhere currently supports the following species (please contact us if yours is not on the list):
Homo sapiens (9606)
Mus musculus (10090)
Arabidopsis thaliana (3702)
Caenorhabditis elegans (6239)
Escherichia coli K12 (83333)
Drosophila melanogaster (7227)
Rattus norvegicus (10116)
Saccharomyces cerevisiae (559292)
Source_Loc_TermUniprotAndGO
UniprotOnly
GOonly
Localization terms will be obtained from both UniProt and GO (UniprotAndGO), or UniProt only (UniprotOnly), or GO only (Goonly)
PriorityMethodgeneric
premade_flavour
upload_flavour
How to prioritize the CellWhere localizations to select the one at which the protein will be displayed in the graph. Please see http://sys-myo.com/cellwhere/FAQ.php#How_does_CellWhere_localize
Flavourmuscle
secretory
mitochondria
If Priority Method is set to premade_flavour, this allows selection of the premade flavour
uploadedflavourCustom prioritization 'flavor' (tab-delimited table)If Priority Method is set to upload_flavour, this allows upload of your custom prioritization mapping file ('flavor'). Please see http://sys-myo.com/cellwhere/FAQ.php#How_does_CellWhere_localize
mentha_add0 or 1If mentha_add=1, then interacting proteins will be added from the Mentha server, based on the strength of the Mentha evidence score
mentha_max_nodesNumber from 2 to 50If mentha_add=1, then nodes will be added up until this maximum network size is reached
primary_submitSubmitRequired to submit query


Here is an example POST using cURL in PHP:

<?php

$url = 'http://sys-myo.com/cellwhere/process.php';

$ID_array = array("PAX7", "DMD", "MYOZ2", "DAG1");
$TheseIDs = implode(PHP_EOL, $ID_array);

$post = array(
     'ID_type' => 'GeneSymbol' ,
     'ID_list' => $TheseIDs ,
     'Species_ID' => '9606',
     'Source_Loc_Term' => 'UniprotOnly' ,
     'PriorityMethod' => 'premade_flavour' ,
     'Flavour' => 'muscle' ,
     'mentha_add' => '1' ,
     'mentha_max_nodes' => '12' ,
     'primary_submit' => 'Submit'
);

/* If wishing to upload a list of IDs, then remove the ID_list field from above, and uncomment these two lines, adding your path: */
//$file_to_upload = 'Path/to/your/ID_List_File.txt';
//$post['uploadedfile'] = '@'.$file_to_upload;

/* If wishing to upload a custom flavor, then uncomment these two lines, adding your path: */
//$flavor_to_upload = 'Path/to/your/Custom_Flavor_File.txt';
//$post['uploadedflavour'] = '@'.$flavor_to_upload;

/* Note: later versions of PHP may not be compatible with '@', in which case replace those lines with something like this: */
//$post['uploadedfile'] = new CurlFile('Path/to/your/ID_List_File.txt', 'text/plain');

$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $post);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(240);
$OutputFromCellWhere = curl_exec( $ch );

echo $OutputFromCellWhere;
?>




Please contact us if you have any questions regarding programmatic access: