Last data update: 2014.03.03

R: Gather Mutations for TCGA Datasets
mutationsTCGAR Documentation

Gather Mutations for TCGA Datasets

Description

Function gathers mutations over multiple TCGA datasets and extracts mutations and further informations about them for desired genes. See mutations.

Usage

mutationsTCGA(..., extract.cols = c("Hugo_Symbol", "Variant_Classification",
  "bcr_patient_barcode"), extract.names = TRUE, unique = TRUE)

Arguments

...

A data.frame or data.frames from TCGA study containing mutations information (RTCGA.mutations).

extract.cols

A character specifing the names of columns to be extracted with bcr_patient_barcode. If NULL all columns are returned.

extract.names

Logical, whether to extract names of passed data.frames in ....

unique

Should the outputed data be unique. By default it's TRUE.

Issues

If you have any problems, issues or think that something is missing or is not clear please post an issue on https://github.com/RTCGA/RTCGA/issues.

Note

Input data.frames should contain column bcr_patient_barcode if extract.cols is specified.

Author(s)

Marcin Kosinski, m.p.kosinski@gmail.com

See Also

RTCGA website http://rtcga.github.io/RTCGA/Visualizations.html.

Other RTCGA: RTCGA-package, boxplotTCGA, checkTCGA, convertTCGA, datasetsTCGA, downloadTCGA, expressionsTCGA, heatmapTCGA, infoTCGA, installTCGA, kmTCGA, pcaTCGA, readTCGA, survivalTCGA, theme_RTCGA

Examples


library(RTCGA)
library(RTCGA.mutations)
library(dplyr)
mutationsTCGA(BRCA.mutations, OV.mutations) %>%
	filter(Hugo_Symbol == 'TP53') %>%
	filter(substr(bcr_patient_barcode, 14, 15) == "01") %>% # cancer tissue
	mutate(bcr_patient_barcode = substr(bcr_patient_barcode, 1, 12)) -> BRCA_OV.mutations

library(RTCGA.clinical)
survivalTCGA(BRCA.clinical, OV.clinical, extract.cols = "admin.disease_code") %>%
	rename(disease = admin.disease_code)-> BRCA_OV.clinical

BRCA_OV.clinical %>%
	left_join(BRCA_OV.mutations,
	by = "bcr_patient_barcode") %>%
	mutate(TP53 = ifelse(!is.na(Variant_Classification), "Mut",
 "WILDorNOINFO")) -> BRCA_OV.clinical_mutations

BRCA_OV.clinical_mutations %>%
	select(times, patient.vital_status, disease, TP53) -> BRCA_OV.2plot
kmTCGA(BRCA_OV.2plot, explanatory.names = c("TP53", "disease"),
			 break.time.by = 400, xlim = c(0,2000))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RTCGA)
Welcome to the RTCGA (version: 1.2.2).
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RTCGA/mutationsTCGA.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mutationsTCGA
> ### Title: Gather Mutations for TCGA Datasets
> ### Aliases: mutationsTCGA
> 
> ### ** Examples
> 
> 
> library(RTCGA)
> library(RTCGA.mutations)
> library(dplyr)

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

> mutationsTCGA(BRCA.mutations, OV.mutations) %>%
+ 	filter(Hugo_Symbol == 'TP53') %>%
+ 	filter(substr(bcr_patient_barcode, 14, 15) == "01") %>% # cancer tissue
+ 	mutate(bcr_patient_barcode = substr(bcr_patient_barcode, 1, 12)) -> BRCA_OV.mutations
> 
> library(RTCGA.clinical)
> survivalTCGA(BRCA.clinical, OV.clinical, extract.cols = "admin.disease_code") %>%
+ 	rename(disease = admin.disease_code)-> BRCA_OV.clinical
> 
> BRCA_OV.clinical %>%
+ 	left_join(BRCA_OV.mutations,
+ 	by = "bcr_patient_barcode") %>%
+ 	mutate(TP53 = ifelse(!is.na(Variant_Classification), "Mut",
+  "WILDorNOINFO")) -> BRCA_OV.clinical_mutations
> 
> BRCA_OV.clinical_mutations %>%
+ 	select(times, patient.vital_status, disease, TP53) -> BRCA_OV.2plot
> kmTCGA(BRCA_OV.2plot, explanatory.names = c("TP53", "disease"),
+ 			 break.time.by = 400, xlim = c(0,2000))
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>