cgdsr-getProfileData: Retrieves genomic profile data for genes and genetic...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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)

cgdsr documentation built on June 27, 2019, 5:07 p.m.