-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.Rhistory
168 lines (168 loc) · 5.81 KB
/
.Rhistory
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
The TCGA Data Analysis with R course is designed to equip participants with the knowledge and skills necessary to effectively analyze and interpret data from The Cancer Genome Atlas (TCGA) using the R programming language. TCGA is a valuable resource for cancer researchers, providing comprehensive genomic and clinical data on various cancer types. This course will cover essential concepts, tools, and techniques for data preprocessing, exploratory data analysis, differential gene expression analysis, survival analysis, and data visualization using R. Participants will gain hands-on experience by working with real TCGA datasets and will learn to derive meaningful insights from complex cancer genomics data.
# Load packages
library(tidyverse)
library(TCGAbiolinks)
library(maftools)
library(pheatmap)
library(SummarizedExperiment)
# get a list of projects
gdcprojects <- getGDCprojects()
gdcprojects
View(gdcprojects)
# get project summary
getProjectSummary('TCGA-BRCA')
# build a query
query_TCGA <- GDCquery(project = 'TCGA-BRCA',
data.category = 'Transcriptome Profiling')
# build a query
query_TCGA <- GDCquery(project = 'TCGA-BRCA',
data.category = 'Transcriptome Profiling')
# Load packages
library(tidyverse)
library(TCGAbiolinks)
library(maftools)
library(pheatmap)
library(SummarizedExperiment)
# get a list of projects
gdcprojects <- getGDCprojects()
gdcprojects
# get project summary
getProjectSummary('TCGA-BRCA')
# build a query
query_TCGA <- GDCquery(project = 'TCGA-BRCA',
data.category = 'Transcriptome Profiling')
str(iris)
ls
str(iris)
plot(iris)
# load packages
library(hexSticker)
library(showtext)
# Loading Google fonts (http://www.google.com/fonts)
font_add_google("Gochi Hand", "gochi")
# Automatically use showtext to render text for future devices
showtext_auto()
# Automatically use showtext to render text for future devices
showtext_auto()
sticker(p,
package="hexSticker",
p_size=22, s_x=1, s_y=.75,
s_width=1.3, s_height=1,
p_family = "gochi",
filename="ggplot2-google-font.png")
sticker(~plot(cars, cex=.5, cex.axis=.5, mgp=c(0,.3,0),
xlab="", ylab=""), package="hexSticker",
p_size=20, s_x=.8, s_y=.6, s_width=1.4,
s_height=1.2,
filename="inst/figures/baseplot.png")
sticker(~plot(cars, cex=.5, cex.axis=.5, mgp=c(0,.3,0),
xlab="", ylab=""), package="hexSticker",
p_size=20, s_x=.8, s_y=.6, s_width=1.4,
s_height=1.2,
filename="baseplot.png")
# load packages
library(hexSticker)
library(showtext)
sticker(~plot(cars, cex=.5, cex.axis=.5, mgp=c(0,.3,0),
xlab="", ylab=""), package="hexSticker",
p_size=20, s_x=.8, s_y=.6, s_width=1.4,
s_height=1.2,
filename="images/baseplot.png")
p <- ggplot(aes(x = mpg, y = wt), data = mtcars) + geom_point()
# load packages
library(hexSticker)
library(showtext)
library(tidyverse)
p <- ggplot(aes(x = mpg, y = wt), data = mtcars) + geom_point()
p <- p + theme_void() + theme_transparent()
p
sticker(p, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=1.3, s_height=1,
filename="images/ggplot2.png")
imgurl <- system.file("images/Rlogo.png", package="hexSticker")
sticker(imgurl, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=.6,
filename="images/imgfile.png")
p <- ggplot(aes(x = mpg, y = wt), data = mtcars) + geom_point()
p <- p + theme_void() + theme_transparent()
p
sticker(p, package="TCGA", p_size=20, s_x=1, s_y=.75, s_width=1.3, s_height=1,
filename="images/ggplot2.png")
# Install and load the hexSticker package
library(hexSticker)
# Create the hexsticker
tcga_hex <- hexSticker("TCGA Data Analysis\nwith R",
package="hexSticker",
p_size=15,
s_x = 0.9,
s_y = 0.8,
filename="tcga_hexsticker.png")
tcga_hex <- sticker("TCGA Data Analysis\nwith R",
package="hexSticker",
p_size=15,
s_x = 0.9,
s_y = 0.8,
filename="tcga_hexsticker.png")
tcga_hex <- sticker("TCGA Data Analysis",
package="hexSticker",
p_size=15,
s_x = 0.9,
s_y = 0.8,
filename="tcga_hexsticker.png")
# load packages
library(maftools)
# Path to TCGA LAML MAF file
laml_maf <- system.file("extdata", "tcga_laml.maf.gz", package = "maftools")
# Clinical information containing survival information and histology
laml_clinical <- system.file("extdata", "tcga_laml_annot.tsv", package = "maftools")
# Without clinical data
brca <- system.file("extdata", "brca.maf.gz", package = "maftools")
brca <- read.maf(maf = brca, verbose = FALSE)
# data view
maf_data_view <- laml@data
laml <- read.maf(maf = laml_maf, clinicalData = laml_clinical)
# data view
maf_data_view <- laml@data
maf_data_view
maf_gene_summary <- [email protected]
maf_gene_summary
# access data
library(TCGAbiolinks)
# Access data using tcgabiolinks
getGDCprojects()
# Access data using tcgabiolinks
gdc_projects <- getGDCprojects()
View(gdc_projects)
summary <- getProjectSummary("TCGA-CHOL")
View(summary)
query_maf_hg19 <- GDCquery(project = "TCGA-CHOL",
data.category = "Simple nucleotide variation",
data.type = "Simple somatic mutation",
access = "open",
file.type = "bcgsc.ca_CHOL.IlluminaHiSeq.1.somatic.maf",
legacy = TRUE)
query.maf.hg19 <- GDCquery(project = "TCGA-CHOL",
data.category = "Simple nucleotide variation",
data.type = "Simple somatic mutation",
access = "open",
file.type = "bcgsc.ca_CHOL.IlluminaHiSeq_DNASeq.1.somatic.maf",
legacy = TRUE)
# load packages
library(maftools)
library(TCGAbiolinks)
# Path to TCGA LAML MAF file
laml_maf <- system.file("extdata", "tcga_laml.maf.gz", package = "maftools")
# Access data using tcgabiolinks
gdc_projects <- getGDCprojects()
summary <- getProjectSummary("TCGA-CHOL")
query.maf.hg19 <- GDCquery(project = "TCGA-CHOL",
data.category = "Simple nucleotide variation",
data.type = "Simple somatic mutation",
access = "open",
file.type = "bcgsc.ca_CHOL.IlluminaHiSeq_DNASeq.1.somatic.maf",
legacy = TRUE)
query.maf.hg19 <- GDCquery(project = "TCGA-CHOL",
data.category = "Simple nucleotide variation",
data.type = "Simple somatic mutation",
access = "open",
file.type = "bcgsc.ca_CHOL.IlluminaHiSeq_DNASeq.1.somatic.maf",
legacy = TRUE)