Comparing version 0.1.1 to 0.1.2
@@ -19,14 +19,15 @@ "use strict"; | ||
} | ||
// Browserify does not default to port 80 if the page | ||
// is served from a port other than 80. | ||
options.port = 80; | ||
http.get(options, function (res) { | ||
var body; | ||
body = new Buffer(0); | ||
// Browserify does not seem to work well with buffers ("no method copy"), | ||
// therefore fall back to strings. | ||
body = ""; | ||
res.on("data", function (chunk) { | ||
var buffer; | ||
buffer = new Buffer(body.length + chunk.length); | ||
body.copy(buffer); | ||
chunk.copy(buffer, body.length); | ||
body = buffer; | ||
body += chunk; | ||
}); | ||
res.on("end", function () { | ||
callback(null, body.toString("utf8")); | ||
callback(null, body); | ||
}); | ||
@@ -33,0 +34,0 @@ }); |
{ | ||
"name": "cgds", | ||
"description": "A module for querying the Cancer Genomics Data Server (CGDS).", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Alexander Grüneberg", |
CGDS-JS | ||
======= | ||
A Node.js module for querying the Cancer Genomics Data Server (CGDS), hosted by the Computational Biology Center at Memorial-Sloan-Kettering Cancer Center (MSKCC). Read more about this service at the [cBio Cancer Genomics Portal](http://www.cbioportal.org/public-portal/). | ||
A Node.js and browser module for querying the Cancer Genomics Data Server (CGDS), hosted by the Computational Biology Center at Memorial-Sloan-Kettering Cancer Center (MSKCC). Read more about this service at the [cBio Cancer Genomics Portal](http://www.cbioportal.org/public-portal/). | ||
Example | ||
------- | ||
var CGDS, cgds; | ||
CGDS = require("cgds"); | ||
cgds = new CGDS("http://www.cbioportal.org/public-portal/webservice.do"); | ||
cgds.getMutationData("brca_tcga_mutations", ["TP53", "GATA3"], "brca_tcga_all", function (err, res) { | ||
console.log(res); | ||
}); | ||
Usage | ||
----- | ||
### Node.js | ||
1. Install it: | ||
@@ -23,2 +35,21 @@ | ||
### Browser | ||
1. Include it: | ||
<script src="http://agrueneberg.github.io/CGDS-JS/cgds.min.js"></script> | ||
2. Require it: | ||
var CGDS = require("cgds"); | ||
3. Instantiate a CGDS client (you will need a CORS proxy such as [Proxer](https://github.com/agrueneberg/Proxer) for this): | ||
var cgds = new CGDS({ | ||
url: "http://www.cbioportal.org/public-portal/webservice.do", | ||
proxy: "http://example.com/corsproxy?url=" | ||
}); | ||
4. See below for a list of methods. | ||
Methods | ||
@@ -29,21 +60,51 @@ ------- | ||
### `getTypesOfCancer(callback)` | ||
### getTypesOfCancer | ||
Retrieves a list of all the clinical types of cancer. | ||
### `getCancerStudies(callback)` | ||
###### Parameters | ||
1. `callback` | ||
### getCancerStudies | ||
Retrieves meta-data regarding cancer studies. | ||
### `getGeneticProfiles(cancer_study_id, callback)` | ||
###### Parameters | ||
1. `callback` | ||
### getGeneticProfiles | ||
Retrieves meta-data regarding all genetic profiles, e.g. mutation or copy number profiles, stored about a specific cancer study. | ||
### `getCaseLists(cancer_study_id, callback)` | ||
###### Parameters | ||
1. `cancer_study_id` | ||
2. `callback` | ||
### getCaseLists | ||
Retrieves meta-data regarding all case lists stored about a specific cancer study. | ||
### `getProfileData(case_set_id, genetic_profile_id, gene_list, callback)` | ||
###### Parameters | ||
1. `cancer_study_id` | ||
2. `callback` | ||
### getProfileData | ||
Retrieves genomic profile data for one or more genes. | ||
### `getMutationData(genetic_profile_id, case_set_id, gene_list, callback)` | ||
###### Parameters | ||
1. `case_set_id` | ||
2. `genetic_profile_id` | ||
3. `gene_list` | ||
4. `callback` | ||
### getMutationData | ||
Retrieves the full set of annotated extended mutation data. | ||
### `getClinicalData(case_set_id, callback)` | ||
###### Parameters | ||
1. `genetic_profile_id` | ||
2. `gene_list` | ||
3. `case_set_id` (optional) | ||
4. `callback` | ||
### getClinicalData | ||
Retrieves overall survival, disease free survival and age at diagnosis for specified cases. | ||
###### Parameters | ||
1. `case_set_id` | ||
2. `callback` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
29836
509
109
1