cgdsr-plot {cgdsr}R Documentation

Generic plot function for CGDS API data.

Description

Queries the CGDS API and plots data for specified genes and genetic profiles.

Usage

## S3 method for class 'CGDS'
plot(x,cancerStudy, genes, geneticProfiles,
caseList, cases, caseIdsKey, skin, skin.normals, skin.col.gp, add.corr, legend.pos, ...)

Arguments

x

A CGDS object (required)

cancerStudy

cancer study ID (required)

genes

A vector of gene names or a String specifying a single gene (required)

geneticProfiles

A vector of genetic profile IDs or String specifying a single genetic profile (required)

caseList

A case list ID

cases

A vector of case IDs)

caseIdsKey

Only used by web portal.

skin

A string specifying which plotting layout skin to use (default is continous data 'cont')

skin.normals

Specify a case list ID with normal samples, only some skins handle normal data.

skin.col.gp

Specify a vector of additional case list IDs to use for color coding of data points. Color coding is only handled by some skins.

add.corr

Computes correlation between the two data vectors. Specify correlation method ('pearson' or 'spearman') as argument.

legend.pos

Position of legend in plot (default is 'topright').

...

Not used.

Details

Queries the CGDS API and plots data for specified genes and genetic profiles.

The following combinations are allowed:

  1. 1 gene and 1 genetic profile. Plots genetic profile data histogram for specified gene.

  2. 2 genes and 1 genetic profile. Scatter plot of continuous genetic profile data for the two genes.

  3. 3 1 gene and 2 genetic profiles. Scatterplot or boxplot relating two genetic profile datasets for single gene.

The function currently implements the following skins:

  1. cont: This is the default skin. It treats all data as being continuous.

  2. disc: Requires a single gene and a single genetic profile. The genetic profile data is handled as a discrete dataset and barplot is returned. being continuous.

  3. disc_cont: Requires two genetic profiles. The first dataset is handled as being discrete data, and the function generates a boxplot with distributions for each level of the discrete genetic profile.

  4. cna_mrna_mut: This skin plots mRNA expression level as function of copy number status for a given gene. Data points are colored by mutation status if specified (skin.col.gp), and normal data points are included if specified (skin.normals).

  5. cna_mrna_mut: This skin plots mRNA expression level as function of DNA methylation status for a given gene. Data points are colored by copy number and mutation status if specified (two element vector of copy number and mutation genetic profiles specified for skin.col.gp). Normal data points are included if specified (skin.normals).

Author(s)

<jacobsen@cbio.mskcc.org>

References

cBio Cancer Genomics Portal: http://www.cbioportal.org/

See Also

cgdsr,CGDS,getCancerStudies,getGeneticProfiles,getProfileData

Examples

# Create CGDS object
mycgds = CGDS("http://www.cbioportal.org/")

# Get list of cancer studies at server
getCancerStudies(mycgds)

# Get available case lists (collection of samples) for a given cancer study  
mycancerstudy = getCancerStudies(mycgds)[2,1]
mycaselist = getCaseLists(mycgds,mycancerstudy)[1,1]

# Get available genetic profiles
mygeneticprofile = getGeneticProfiles(mycgds,mycancerstudy)[4,1]

# histogram of genetic profile data for gene
plot(mycgds,mycancerstudy,'MDM2',mygeneticprofile,mycaselist)

# scatter plot of genetic profile data for two genes
plot(mycgds,mycancerstudy,c('MDM2','MDM4'),mygeneticprofile,mycaselist)

# See vignette for more details ...


[Package cgdsr version 1.3.0 Index]