cgdsr-getProfileData {cgdsr}R Documentation

Retrieves genomic profile data for genes and genetic profiles.

Description

Queries the CGDS API and returns data based on gene(s), genetic profile(s), and a case list.

Usage

## S3 method for class 'CGDS'
getProfileData(x,genes,geneticProfiles,caseList,cases,caseIdsKey,...)

Arguments

x

A CGDS object (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.

...

Not used.

Details

Only one list is allowed, specify either a list of genes or genetic profiles. The format of the output data.frame depends on if a single or a list of genes was specified in the arguments.

Value

When requesting one or multiple genes and a single genetic profile, the function returns a data.frame with genetic profile data in columns for each gene.

When requesting a single gene and multiple genetic profiles, the function returns a data.frame containing columns with data for each genetic profile.

Cases can be specified either through a case list ID, or a vector of case IDs.

Author(s)

<jacobsen@cbio.mskcc.org>

References

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

See Also

cgdsr,CGDS,getCancerStudies,getGeneticProfiles,getCaseLists

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)[1,1]

# Get data slices for a specified list of genes, genetic profile and case list
getProfileData(mycgds,c('BRCA1','BRCA2'),mygeneticprofile,mycaselist)

# Get data slice for a single gene
getProfileData(mycgds,'HMGA2',mygeneticprofile,mycaselist)

# Get data slice for multiple genetic profiles and single gene
getProfileData(mycgds,'HMGA2',getGeneticProfiles(mycgds,mycancerstudy)[c(1,2),1],mycaselist)

# Get the same dataset from a vector of case IDs
cases = unlist(strsplit(getCaseLists(mycgds,mycancerstudy)[1,'case_ids'],' '))
getProfileData(mycgds,'HMGA2',getGeneticProfiles(mycgds,mycancerstudy)[c(1,2),1],cases=cases)


[Package cgdsr version 1.3.0 Index]