cBio Portal API Client
cBio Portal API client. Parses tab separated responses into JSON format and works in node and also in the browser via a module loader such as Webpack.
API Reference
module.exports(config) ⇒ cbioPortal
⏏
Creates a new cBio Portal API client
Kind: Exported function
Param | Type | Description |
---|
config | Object | Configuration options object. |
config.includeRaw | Boolean | Include the raw TSV response |
Example
Basic usage:
import CbioPortal from 'cbioportal-api-client';
const cbioPortal = CbioPortal();
cbioPortal.getCancerStudies()
.then(response => {
console.log(response);
});
module.exports.convertResponse(response) ⇒ Promise
Converts tab delimited responses to JSON format
Kind: static method of module.exports
Returns: Promise
- Resolves with the response JSON
Param | Type | Description |
---|
response | string | TSV string |
module.exports~cbioPortal : Object
cbioPortal API Object Prototype. Used as the object prototype
when creating an API client object via the module factory method.
Kind: inner constant of module.exports
See: Use CbioPortal() for object creation.
cbioPortal.getTypesOfCancer() ⇒ Promise
Retrieves a list of all the clinical types of cancer stored on the server.
Kind: instance method of cbioPortal
Returns: Promise
- resolves with JSON data
cbioPortal.getCancerStudies() ⇒ Promise
Retrieves meta-data regarding cancer studies stored on the server.
Kind: instance method of cbioPortal
Returns: Promise
- resolves with JSON data
cbioPortal.getGeneticProfiles(query) ⇒ Promise(data)
Retrieves meta-data regarding all genetic profiles, e.g.
mutation or copy number profiles, stored about a specific cancer study.
Kind: instance method of cbioPortal
Returns: Promise(data)
- resolves with JSON data
Param | Type | Description |
---|
query | Object | |
query.cancer_study_id | string | Cancer study ID |
cbioPortal.getCaseLists(query) ⇒ Promise(data)
Retrieves meta-data regarding all case lists stored about a specific cancer study.
For example, a within a particular study, only some cases may have sequence data, and another subset of cases may have been sequenced and treated with a specific therapeutic protocol.
Multiple case lists may be associated with each cancer study, and this method enables you to retrieve meta-data regarding all of these case lists.
Kind: instance method of cbioPortal
Param | Type | Description |
---|
query | Object | |
query.cancer_study_id | string | Cancer study ID |
cbioPortal.getProfileData() ⇒ Promise(data)
Retrieves genomic profile data for one or more genes.
Kind: instance method of cbioPortal
Param | Type | Description |
---|
options.case_set_id | string | A unique ID used to identify the case list ID in subsequent interface calls. This is a human readable ID. For example, "gbm_all" identifies all cases profiles in the TCGA GBM study. |
options.genetic_profile_id | Array.<string> | string | One or more genetic profile IDs |
options.gene_list | Array.<string> | string | One or more genes, specified as HUGO Gene Symbols or Entrez Gene IDs |