-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
512 lines (512 loc) · 32.5 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
p, package="nDSPA", p_size=10, p_family = "Aller_Rg",p_color="#171717",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#54436B", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "heiti",p_color="#171717",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#54436B", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
font_add_google("Gochi Hand", "gochi")
font_install(source_han_serif())
font_families()
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "heiti",p_color="#A03C78",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#54436B", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "heiti",p_color="#D9DD6B",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#54436B", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "heiti",p_color="#A03C78",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#D9DD6B", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "heiti",p_color="#A03C78",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#54436B", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "mono",p_color="#A03C78",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#54436B", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "mono",p_color="#A03C78",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#50CB93", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "mono",p_color="#A03C78",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#5D8233", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=10, p_family = "mono",p_color="#A03C78",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#33CC33", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=15, p_family = "mono",p_color="#2C2E43",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#5D8233", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=15, p_family = "mono",p_color="#2C2E43",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#33CC33", h_fill = "#FFFFFF",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#2C2E43",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#F29191", h_fill = "#EEC4C4",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#2C2E43",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#F29191", h_fill = "#EEC4C4",h_size=5,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
par(mar = c(2, 2, 2, 2))
p.sticker
plot(p.sticker)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#2C2E43",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#F29191", h_fill = "#EEC4C4",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#2C2E43",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#F29191", h_fill = "#EEC4C4",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#2C2E43",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#630000", h_fill = "#810000",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#EEEBDD",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#630000", h_fill = "#810000",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#810000",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#630000", h_fill = "#EEEBDD",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#810000",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#630000", h_fill = "#EEC4C4",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#558776",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#7F8B52", h_fill = "#A3A847",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#EAE2B6",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#7F8B52", h_fill = "#A3A847",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#FEFFDE",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#52734D", h_fill = "#DDFFBC",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#91C788",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#52734D", h_fill = "#DDFFBC",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#171010",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#52734D", h_fill = "#DDFFBC",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#2C2E43",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#F29191", h_fill = "#EEC4C4",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
p.sticker <- sticker(
p, package="nDSPA", p_size=20, p_family = "mono",p_color="#171010",s_x=1, s_y=.8, s_width=1, s_height=1.2,
h_color = "#52734D", h_fill = "#DDFFBC",h_size=4,
filename="figures/boxplot-icon-sticker.png"
)
p.sticker
load("D:/E/pfalciparum/.RData")
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
library(ggpubr)
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), outlier.shape=NA)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), outlier.shape=-1)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), outlier.shape=1)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
?ggviolin
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), outlier.shape=1, size = -1)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), outlier.shape=1, size = 0)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), outlier.shape=NA,outlier.size=NA size = 0)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), outlier.shape=NA,outlier.size=NA, size = 0)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), trim = TRUE,outlier.shape=NA,outlier.size=NA, size = 0)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), trim = TRUE)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), trim = F)+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
hw_p <- ggplot(df, aes( x="batch",y="perc", color = "group"))
hw_p
hw_p +
geom_violin()
df
hw_p <- ggplot(df, aes( x="batch",y="perc"))
hw_p +
geom_violin()
hw_p <- ggplot(df, aes( x=batch,y=perc))
hw_p +
geom_violin()
hw_p +
geom_violin(trim=F)
hw_p +
geom_violin(trim=T)
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"), trim = F,yscale = "log2")+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
library(Seurat)
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = rev(brewer.pal(n = 9, name = "Set1")),label = T,label.size = 3)+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))& NoAxes()
library(rev)
library(RColorBrewer)
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = rev(brewer.pal(n = 9, name = "Set1")),label = T,label.size = 3)+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))& NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = c("16R","16D","40R","40D"),by.col = T,cols = rev(brewer.pal(n = 9, name = "Set1")),label = T,label.size = 3)+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))& NoAxes()
df
unique(df$group)
df$group <- factor(levels = c("Normal (D)","Knockout (R)"))
df$group <- factor(df$group,levels = c("Normal (D)","Knockout (R)"))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#FF43F4','#0047AB'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.015, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.015)
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.012)
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)
is_outlier <- function(x) {
return(x < quantile(x, 0.25) - 1.5 * IQR(x) | x > quantile(x, 0.75) + 1.5 * IQR(x))
}
OUT=is_outlier(df$group)
OUT=is_outlier(df$perc)
ggviolin(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df, x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)
ggviolin(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.028, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggviolin(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,fill = "group",palette = c('#0047AB','#FF43F4'),add = "boxplot",add.params = list(fill = "white"))+
stat_compare_means(aes(group=group),label.y = 0.011, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)+geom_jitter()
?geom_jitter
ggboxplot(df, x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)+geom_point()
ggboxplot(df[!OUT], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)+geom_point(position = jitter)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)+geom_jitter(size=1)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)+geom_jitter(size=0.1)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)+geom_jitter(size=0.01)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+ylim(0.000,0.011)+geom_jitter(size=0.001)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+geom_jitter(size=0.001)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+geom_jitter(size=0.001, alpha=0.1)
ggboxplot(df[!OUT,], x="batch",y="perc", color = "group", outlier.shape = NA,palette = c('#0047AB','#FF43F4'))+
stat_compare_means(aes(group=group),label.y = 0.010, label="p.format", size=3)+xlab("Samples")+ylab("Avg. Var-Gene Expression")+theme_classic()+theme(text = element_text(face="bold",color="black",size = 10),
legend.title = element_blank(),
legend.text = element_text(face = "bold",color = "black",size = 10))+geom_jitter(size=0.001, alpha=0.05)
FeaturePlot(q,features = "Var-Gene Expression",split.by = c("16R","16D","40R","40D"),by.col = T,cols = rev(brewer.pal(n = 9, name = "Set1")),label = T,label.size = 3)+theme_classic()& NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = c("16R","16D","40R","40D"),by.col = T,cols = rev(brewer.pal(n = 9, name = "Set1")),label = T,label.size = 3)+theme_classic() & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = rev(brewer.pal(n = 9, name = "Set1")),label = T,label.size = 3)+theme_classic() & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = rev(brewer.pal(n = 9, name = "Set1")),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = rev(brewer.pal(n = 9, name = "YIOrRd")),label = T,label.size = 3) & NoAxes()
display.brewer.all(colorblindFriendly = TRUE)
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = rev(brewer.pal(n = 9, name = "OrRd")),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = "Red",label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal("Blues"),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = rev(brewer.pal("Blues")),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=9,name="Blues"),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=9,name="Reds"),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=5,name="Reds"),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=6,name="Reds"),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = rev(brewer.pal(n=9,name="Blues")),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=9,name="Blues"),label = T,label.size = 3) & NoAxes()
?rev
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=9,name="Reds"),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=6,name="Reds"),label = T,label.size = 3) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=6,name="Reds"),label = F) & NoAxes()
FeaturePlot(q,features = "Var-Gene Expression",split.by = "Sample",by.col = T,cols = brewer.pal(n=9,name="Reds"),label = F) & NoAxes()
setwd("D:/E/nDSPA")
library(devtools)
build()
load_all()
fpath.rna <- system.file("extdata", "01-1.dsp_data.raw.sim", package =
"nDSPA",mustWork = TRUE)
fpath.rna <- system.file("extdata", "01-1.dsp_data.raw.sim",mustWork = TRUE)
fpath.rna <- system.file("extdata", "01-1.dsp_data.raw.sim.tsv", package =
"nDSPA",mustWork = TRUE)
library(nDSPA)
set.seed(199)
test.rna <- readnDSPA(fpath.rna, experiment = "RNA")
library(magick)
test.rna <- readnDSPA(fpath.rna, experiment = "RNA", meta = "D:/E/nDSPA/inst/extdata/01-2.dsp_roi.metadata.sim.tsv")
str(magick::magick_config())
?image_read
img <- image_read("../01-3.P001_1B.png")
img
cat(image_ocr(img))
install.packages("tesseract")
library(tesseract)
cat(image_ocr(img))
img
as.numeric(magick::image_info(img$width))
img$width
image_info(img)
image_info(img)$width
image_info(img)$height
rasterGrob(im,width=unit(1,"npc"), height=unit(1,"npc") )
library(ggplot2)
rasterGrob(im,width=unit(1,"npc"), height=unit(1,"npc") )
library(grid)
rasterGrob(im,width=unit(1,"npc"), height=unit(1,"npc") )
rasterGrob(img,width=unit(1,"npc"), height=unit(1,"npc") )
g <-rasterGrob(img,width=unit(1,"npc"), height=unit(1,"npc") )
g
g$raster
assay(test.rna)
anno <- colData(test.rna)
val_Endo <- assay(test.rna)
probes <- rowData(test.rna)
View(data.frame(anno))
tesseract::ocr(img)
tesseract::ocr("../01-3.P001_1B.png")
shiny::runApp()
library(jpeg)
image <- png::readPNG("../01-3.P001_1B.png")
annotation_custom(rasterGrob(imgage,
width = unit(1,"npc"),
height = unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
annotation_custom(rasterGrob(image,
width = unit(1,"npc"),
height = unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
ggplot(mtcars, aes(x = wt, y = mpg)) + geom_blank()
ggplot(mtcars, aes(x = wt, y = mpg)) + geom_blank()+annotation_custom(rasterGrob(image,
width = unit(1,"npc"),
height = unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
runApp()
runApp()
ggplot(mtcars, aes(wt, mpg))
rnorm(10)
runApp()
mapImDimW <- image_info(img)$width
mapImDimH <- image_info(img)$height
runApp()
dim(mtcars)
geom_blank()
geom_blank()
library(patchwork)
plot.new()
plot.new()+geom_blank()
plot(1, type="n", xlab="", ylab="", xlim=c(0, 10), ylim=c(0, 10))
plot(1, type="n", xlab="", ylab="", xlim=c(0, 10), ylim=c(0, 10))+geom_blank()
plot(1, type="n", xlab="", ylab="", xlim=c(0, 10), ylim=c(0, 10))+geom_blank()+annotation_custom(rasterGrob(image,
width = unit(1,"npc"),
height = unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
runApp()
runApp()
library(DT)
dashboardPage(dashboardHeader(disable = T),
dashboardSidebar(disable = T),
dashboardBody(uiOutput("MainBody")
)
)
library(shinydashboard)
dashboardPage(dashboardHeader(disable = T),
dashboardSidebar(disable = T),
dashboardBody(uiOutput("MainBody")
)
)
runApp('D:/E/app2.R')
runApp()
View(data.frame(g))
View(data.frame(probes))
View(data.frame(anno))
runApp('D:/E/app2.R')
runApp()
check()
library(BiocCheck)
BiocCheck("nDSPA")
BiocCheck(".")
BiocCheck(".")
check()
a <- readRDS("../cta.rds")
a
rownames(a)
rownames(test.rna)
View(data.frame(probes, check.names = F))
colnames(probes)
rownames(probes)
View(rowData(a))
View(data.frame(rowData(a),check.names = F))
View(data.frame(colData(a),check.names = F))
document()
load_all()
a <- readnDSPA("../Initial Dataset_Truncated_Edited.xlsx", experiment = "CTA")
View(data.frame(rowData(a),check.names = F))
build()