Learn R Programming

g3viz (version 0.1.4)

getMutationsFromCbioportal: Query cancer genomic mutation data from cBioPortal

Description

Retrieve and parse mutation data from cBioPortal by the given cBioPortal cancer study ID and the gene symbol.

Usage

getMutationsFromCbioportal(study.id, gene.symbol, output.file = NA,
  mutation.type.to.class.df = NA)

Arguments

study.id

cbioprotal study ID

gene.symbol

HGNC gene symbol.

output.file

if specified, output to a file in CSV format. Default is NA.

mutation.type.to.class.df

mapping table from mutation type to class. See mapMutationTypeToMutationClass for details. Default NA, which indicates to use default mappings.

Value

a data frame with columns

Hugo_Symbol

Hugo gene symbol

Protein_Change

Protein change information (cBioprotal uses HGVSp format)

Sample_ID

Sample ID

Mutation_Type

mutation type, aka, variant classification.

Chromosome

chromosome

Start_Position

start position

End_Position

end position

Reference_Allele

reference allele

Variant_Allele

variant allele

Mutation_Class

mutation class (e.g., Truncating/Missense/Inframe/Other)

AA_Position

amino-acid position of the variant; if the variant is not in protein-coding region, NA

Examples

Run this code
# NOT RUN {
# Note: internet access required.  May need more than 10 seconds.
# list all studies of cBioPortal
library(cgdsr)
cgds <- CGDS("http://www.cbioportal.org/public-portal/")
all.studies <- getCancerStudies(cgds)

# pick a "caner_study_id" (contain a mutation data set)
# pick a primary HGNC gene symbol to query
mutation.dat <- getMutationsFromCbioportal("msk_impact_2017", "TP53")
mutation.dat <- getMutationsFromCbioportal("all_stjude_2016", "TP53")
# }

Run the code above in your browser using DataLab