Skip to content

Commit

Permalink
Simplify docs a bit and remove other modules
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmarks committed Jan 23, 2016
1 parent 669d216 commit 1f011c6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 102 deletions.
116 changes: 17 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,32 +69,18 @@ $ cbioportal-api-client getProfileData -s gbm_tcga_cnaseq -p gbm_tcga_mutations
## API Reference
## Modules
<dl>
<dt><a href="#module_cbioportal-api-client">cbioportal-api-client</a><code>cbioPortal</code></dt>
<dd><p>Creates a new cBio Portal API client</p>
</dd>
<dt><a href="#module_cbioportal-api-client/utils/convertResponse">cbioportal-api-client/utils/convertResponse</a><code>Promise</code></dt>
<dd><p>Converts tab delimited responses to JSON format</p>
</dd>
<dt><a href="#module_cbioportal-api-client/utils/summarizeAlterations">cbioportal-api-client/utils/summarizeAlterations</a></dt>
<dd><p>Exports utility functions for summarizing gene alterations</p>
</dd>
</dl>
<a name="module_cbioportal-api-client"></a>
## cbioportal-api-client ⇒ <code>cbioPortal</code>
Creates a new cBio Portal API client
**See**: [cbioPortal](#module_cbioportal-api-client..cbioPortal)
**See**: [cbioPortal](#module_cbioportal-api-client..cbioPortal)
| Param | Type | Description |
| --- | --- | --- |
| config | <code>Object</code> | Configuration options object. |
| config.includeRaw | <code>Boolean</code> | Include the raw TSV response |
**Example**
**Example**
Basic usage:
```javascript
Expand Down Expand Up @@ -124,8 +110,8 @@ cbioPortal.getCancerStudies()
cbioPortal API Object Prototype. Used as the object prototype
when creating an API client object via the module factory method.
**Kind**: inner constant of <code>[cbioportal-api-client](#module_cbioportal-api-client)</code>
**See**: Use [CbioPortal()](#module_cbioportal-api-client) for object creation.
**Kind**: inner constant of <code>[cbioportal-api-client](#module_cbioportal-api-client)</code>
**See**: Use [CbioPortal()](#module_cbioportal-api-client) for object creation.
* [~cbioPortal](#module_cbioportal-api-client..cbioPortal) : <code>Object</code>
* [.getTypesOfCancer()](#module_cbioportal-api-client..cbioPortal+getTypesOfCancer) ⇒ <code>Promise</code>
Expand All @@ -141,19 +127,19 @@ when creating an API client object via the module factory method.
#### cbioPortal.getTypesOfCancer() ⇒ <code>Promise</code>
Retrieves a list of all the clinical types of cancer stored on the server.
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Returns**: <code>Promise</code> - See fullfills/rejects
**Fulfills**: <code>Array</code> response data converted from TSV to JSON
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Returns**: <code>Promise</code> - See fullfills/rejects
**Fulfills**: <code>Array</code> response data converted from TSV to JSON
-----
<a name="module_cbioportal-api-client..cbioPortal+getCancerStudies"></a>
#### cbioPortal.getCancerStudies() ⇒ <code>Promise</code>
Retrieves meta-data regarding cancer studies stored on the server.
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Returns**: <code>Promise</code> - See fullfills/rejects
**Fulfills**: <code>Array</code> response data converted from TSV to JSON
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Returns**: <code>Promise</code> - See fullfills/rejects
**Fulfills**: <code>Array</code> response data converted from TSV to JSON
-----
Expand All @@ -162,9 +148,9 @@ Retrieves meta-data regarding cancer studies stored on the server.
Retrieves meta-data regarding all genetic profiles, e.g.
mutation or copy number profiles, stored about a specific cancer study.
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Returns**: <code>Promise</code> - See fullfills/rejects
**Fulfills**: <code>Array</code> response data converted from TSV to JSON
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Returns**: <code>Promise</code> - See fullfills/rejects
**Fulfills**: <code>Array</code> response data converted from TSV to JSON
| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -182,8 +168,8 @@ For example, a within a particular study, only some cases may have sequence data
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 <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Fulfill**: JSON formatted response
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Fulfill**: JSON formatted response
| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -197,8 +183,8 @@ Multiple case lists may be associated with each cancer study, and this method en
#### cbioPortal.getProfileData(query) ⇒ <code>Promise</code>
Retrieves genomic profile data for one or more genes.
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Fulfill**: JSON formatted response
**Kind**: instance method of <code>[cbioPortal](#module_cbioportal-api-client..cbioPortal)</code>
**Fulfill**: JSON formatted response
| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -210,71 +196,3 @@ Retrieves genomic profile data for one or more genes.
-----
<a name="module_cbioportal-api-client/utils/convertResponse"></a>
## cbioportal-api-client/utils/convertResponse ⇒ <code>Promise</code>
Converts tab delimited responses to JSON format
**Returns**: <code>Promise</code> - Resolves with the response JSON
| Param | Type | Description |
| --- | --- | --- |
| response | <code>string</code> | TSV string |
-----
<a name="module_cbioportal-api-client/utils/summarizeAlterations"></a>
## cbioportal-api-client/utils/summarizeAlterations
Exports utility functions for summarizing gene alterations
* [cbioportal-api-client/utils/summarizeAlterations](#module_cbioportal-api-client/utils/summarizeAlterations)
* [.summarizeMutations(mutations)](#module_cbioportal-api-client/utils/summarizeAlterations.summarizeMutations) ⇒ <code>Array</code>
* [.summarizeCopyNumberAlterations(copyNumberAlterations)](#module_cbioportal-api-client/utils/summarizeAlterations.summarizeCopyNumberAlterations) ⇒ <code>Array</code>
* [.summarizeAlterations(response)](#module_cbioportal-api-client/utils/summarizeAlterations.summarizeAlterations) ⇒ <code>Promise</code>
-----
<a name="module_cbioportal-api-client/utils/summarizeAlterations.summarizeMutations"></a>
### cbioportal-api-client/utils/summarizeAlterations.summarizeMutations(mutations) ⇒ <code>Array</code>
Summarize mutations
**Kind**: static method of <code>[cbioportal-api-client/utils/summarizeAlterations](#module_cbioportal-api-client/utils/summarizeAlterations)</code>
**Returns**: <code>Array</code> - Array of summaries
| Param | Type | Description |
| --- | --- | --- |
| mutations | <code>Array</code> | Array of mutation rows as parsed by this library |
-----
<a name="module_cbioportal-api-client/utils/summarizeAlterations.summarizeCopyNumberAlterations"></a>
### cbioportal-api-client/utils/summarizeAlterations.summarizeCopyNumberAlterations(copyNumberAlterations) ⇒ <code>Array</code>
Summarize copy number alterations
**Kind**: static method of <code>[cbioportal-api-client/utils/summarizeAlterations](#module_cbioportal-api-client/utils/summarizeAlterations)</code>
**Returns**: <code>Array</code> - Array of summaries
| Param | Type | Description |
| --- | --- | --- |
| copyNumberAlterations | <code>Array</code> | Array of copy number alteration rows as parsed by this library |
-----
<a name="module_cbioportal-api-client/utils/summarizeAlterations.summarizeAlterations"></a>
### cbioportal-api-client/utils/summarizeAlterations.summarizeAlterations(response) ⇒ <code>Promise</code>
Converts tab delimited responses to JSON format
**Kind**: static method of <code>[cbioportal-api-client/utils/summarizeAlterations](#module_cbioportal-api-client/utils/summarizeAlterations)</code>
**Returns**: <code>Promise</code> - Resolves with the response JSON
| Param | Type | Description |
| --- | --- | --- |
| response | <code>string</code> | TSV string |
-----
2 changes: 1 addition & 1 deletion lib/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import SummarizeAlterations from './summarizeAlterations';
import * as SummarizeAlterations from './summarizeAlterations';
import ConvertResponse from './convertResponse';

export const summarizeAlterations = SummarizeAlterations;
Expand Down
9 changes: 8 additions & 1 deletion lib/utils/summarizeAlterations.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ import _merge from 'lodash/merge';
/**
* Exports utility functions for summarizing gene alterations
*
* @exports summarizeAlterations
* @example
* ```javascript
* import {
* summarizeMutations,
* summarize
* } from 'cbioportal-api-client/dist/utils/summarizeAlterations';
* ```
*
* @module cbioportal-api-client/utils/summarizeAlterations
*/

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"coverage": "npm run clean:coverage && babel-node node_modules/.bin/isparta cover --report lcov --report text --report html test/index.js",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"dev": "nodemon -w lib -w test --exec \"npm run -s lint && npm run -s test:dev\"",
"docs": "jsdoc2md --src \"lib/**/*.js\" -t docs/README.md.hbs -d 2 --partial \"./docs/partials/**/*.hbs\" --separators -l JavaScript > README.md",
"docs": "jsdoc2md --src \"lib/index.js\" -t docs/README.md.hbs -d 2 --partial \"./docs/partials/**/*.hbs\" --separators -l JavaScript > README.md",
"lint": "eslint lib",
"precommit": "npm run docs",
"prepublish": "in-publish && npm run build || not-in-publish",
Expand Down

0 comments on commit 1f011c6

Please sign in to comment.