forked from benben-miao/TOmicsVis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
1104 lines (962 loc) · 30.4 KB
/
README.Rmd
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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```
# TOmicsVis
## 1. Introduction
#### 1.1 Meta Information
**TOmicsVis**: TranscriptOmics Visualization.
**Website**: [https://benben-miao.github.io/TOmicsVis/](https://benben-miao.github.io/TOmicsVis/)
#### 1.2 Github and CRAN Install
**1.2.1 Install required packages from Bioconductor:**
```{r eval=FALSE}
# Install required packages from Bioconductor
install.packages("BiocManager")
BiocManager::install(c("ComplexHeatmap", "EnhancedVolcano", "clusterProfiler", "enrichplot", "impute", "preprocessCore", "Mfuzz"))
```
**1.2.2 Github**: [https://github.com/benben-miao/TOmicsVis/](https://github.com/benben-miao/TOmicsVis/)
**Install from Github:**
```{r eval=FALSE}
install.packages("devtools")
devtools::install_github("benben-miao/TOmicsVis")
# Resolve network by GitClone
devtools::install_git("https://gitclone.com/github.com/benben-miao/TOmicsVis.git")
```
**1.2.3 CRAN**: [https://cran.r-project.org/package=TOmicsVis](https://cran.r-project.org/package=TOmicsVis)
**Install from CRAN:**
```{r eval=FALSE}
# Install from CRAN
install.packages("TOmicsVis")
```
#### 1.3 Articles and Courses
**Videos Courses:** [https://space.bilibili.com/34105515/channel/series](https://space.bilibili.com/34105515/channel/series)
**Article Introduction:** [全解TOmicsVis完美应用于转录组可视化R包](https://mp.weixin.qq.com/s/g8sRcK_ExlsOFniMWEJnVQ)
**Article Courses:** [TOmicsVis 转录组学R代码分析及可视化视频](https://mp.weixin.qq.com/s/mVXJmHPAnC9J1-zMj7eG7g)
#### 1.4 About and Authors
**OmicsSuite**: [Omics Suite Github: https://github.com/omicssuite/](https://github.com/omicssuite/)
**Authors**:
- [benben-miao Github: https://github.com/benben-miao/](https://github.com/benben-miao/)
- [dongwei1220 Github: https://github.com/dongwei1220/](https://github.com/dongwei1220/)
## 2. Libary packages
```{r}
# 1. Library TOmicsVis package
library(TOmicsVis)
# 2. Extra package
# install.packages("ggplot2")
library(ggplot2)
```
## 3. Usage cases
### 3.1 Samples Statistics
#### 3.1.1 quantile_plot
Quantile plot for visualizing data distribution.
```{r quantile_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load box_data example datasets
data(quantile_data)
# 2. Run quantile_plot plot function
quantile_plot(
quantile_data,
my_shape = "fill_circle",
point_size = 1.5,
conf_int = TRUE,
conf_level = 0.95,
split_panel = "One_Panel",
legend_pos = "right",
legend_dir = "vertical",
sci_fill_color = "Sci_AAAS",
sci_color_alpha = 0.75,
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::quantile_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/quantile_plot.html](https://benben-miao.github.io/TOmicsVis/reference/quantile_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::quantile_plot
```
#### 3.1.2 corr_heatmap
Correlation Heatmap for samples/groups based on Pearson algorithm.
```{r corr_heatmap, fig.width=10.00, fig.height=6.18}
# 1. Load gene_exp example dataset
data(gene_exp)
head(gene_exp)
# 2. Run corr_heatmap plot function
corr_heatmap(
gene_exp,
corr_method = "pearson",
cell_shape = "square",
fill_type = "full",
lable_size = 3,
lable_digits = 3,
color_low = "blue",
color_mid = "white",
color_high = "red",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::corr_heatmap` or reference page [https://benben-miao.github.io/TOmicsVis/reference/corr_heatmap.html](https://benben-miao.github.io/TOmicsVis/reference/corr_heatmap.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::corr_heatmap
```
#### 3.1.3 pca_plot
PCA dimensional reduction visualization for RNA-Seq.
```{r pca_plot, fig.width=10.00, fig.height=6.18}
# 1. Load pca_sample_gene and pca_group_sample example datasets
data(pca_sample_gene)
data(pca_group_sample)
# 2. Run pca_plot plot function
pca_plot(
pca_sample_gene,
pca_group_sample,
point_size = 5,
text_size = 5,
ellipse_alpha = 0.3,
legend_pos = "right",
legend_dir = "vertical",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::pca_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/pca_plot.html](https://benben-miao.github.io/TOmicsVis/reference/pca_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::pca_plot
```
#### 3.1.4 dendro_plot
Dendrograms for multiple samples/groups clustering.
```{r dendro_plot, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(gene_exp)
# 2. Run plot function
dendro_plot(
gene_exp,
dist_method = "euclidean",
hc_method = "average",
tree_type = "rectangle",
k_num = 3,
palette = "npg",
color_labels_by_k = TRUE,
horiz = TRUE,
label_size = 0.8,
line_width = 0.7,
rect = TRUE,
rect_fill = TRUE,
title = "Cluster Dendrogram",
xlab = "",
ylab = "Height"
)
```
Get help using command `?TOmicsVis::dendro_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/dendro_plot.html](https://benben-miao.github.io/TOmicsVis/reference/dendro_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::dendro_plot
```
### 3.2 Traits Analysis
#### 3.2.1 box_plot
Box plot support two levels and multiple groups with P value.
```{r box_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load box_data example datasets
data(box_data)
# 2. Run box_plot plot function
box_plot(
box_data,
test_method = "t.test",
test_label = "p.format",
notch = TRUE,
group_level = "Three_Column",
add_element = "dotplot",
my_shape = "fill_circle",
sci_fill_color = "Sci_AAAS",
sci_fill_alpha = 0.5,
sci_color_alpha = 1,
legend_pos = "right",
legend_dir = "vertical",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::box_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/box_plot.html](https://benben-miao.github.io/TOmicsVis/reference/box_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::box_plot
```
#### 3.2.2 violin_plot
Violin plot support two levels and multiple groups with P value.
```{r violin_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load box_data example datasets
data(box_data)
# 2. Run violin_plot plot function
violin_plot(
box_data,
test_method = "t.test",
test_label = "p.format",
group_level = "Three_Column",
violin_orientation = "vertical",
add_element = "boxplot",
element_alpha = 0.5,
my_shape = "plus_times",
sci_fill_color = "Sci_AAAS",
sci_fill_alpha = 0.5,
sci_color_alpha = 1,
legend_pos = "right",
legend_dir = "vertical",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::violin_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/violin_plot.html](https://benben-miao.github.io/TOmicsVis/reference/violin_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::violin_plot
```
#### 3.2.3 survival_plot
Survival plot for analyzing and visualizing survival data.
```{r survival_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load survival_plot example datasets
data(survival_data)
# 2. Run survival_plot plot function
survival_plot(
survival_data,
curve_function = "pct",
conf_inter = TRUE,
interval_style = "ribbon",
risk_table = TRUE,
num_censor = TRUE,
sci_palette = "aaas",
ggTheme = "theme_light",
x_start = 0,
y_start = 0,
y_end = 100,
x_break = 100,
y_break = 25
)
```
Get help using command `?TOmicsVis::survival_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/survival_plot.html](https://benben-miao.github.io/TOmicsVis/reference/survival_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::survival_plot
```
#### 3.2.4 tsne_plot
TSNE plot for analyzing and visualizing TSNE algorithm.
```{r tsne_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load tsne_plot example datasets
data(tsne_data)
# 2. Run tsne_plot plot function
tsne_plot(
tsne_data,
seed = 5,
point_size = 4,
point_alpha = 0.8,
text_size = 2,
text_alpha = 0.8,
ci_level = 0.95,
ellipse_alpha = 0.3,
sci_fill_color = "Sci_JAMA",
sci_color_alpha = 0.9,
legend_pos = "right",
legend_dir = "vertical",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::tsne_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/tsne_plot.html](https://benben-miao.github.io/TOmicsVis/reference/tsne_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::tsne_plot
```
### 3.3 Differential Expression Analyais
#### 3.3.1 venn_plot
Venn plot for stat common and unique gene among multiple sets.
```{r venn_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load venn_data example datasets
data(venn_data)
# 2. Run venn_plot plot function
venn_plot(
venn_data,
line_type = "blank",
ellipse_shape = "circle",
sci_fill_color = "Sci_AAAS",
sci_fill_alpha = 0.65
)
```
Get help using command `?TOmicsVis::venn_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/venn_plot.html](https://benben-miao.github.io/TOmicsVis/reference/venn_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::venn_plot
```
#### 3.3.2 flower_plot
Venn plot for stat common and unique gene among multiple sets.
```{r flower_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(venn_data)
# 2. Run plot function
flower_plot(
venn_data,
angle = 90,
a = 0.5,
b = 2,
r = 1,
ellipse_col_pal = "Spectral",
circle_col = "white",
label_text_cex = 1
)
```
Get help using command `?TOmicsVis::flower_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/flower_plot.html](https://benben-miao.github.io/TOmicsVis/reference/flower_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::flower_plot
```
#### 3.3.3 circos_heatmap
Circos heatmap plot for visualizing gene expressing in multiple samples.
```{r circos_heatmap, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load circos_heatmap_data example datasets
data(circos_heatmap_data)
# 2. Run circos_heatmap plot function
circos_heatmap(
circos_heatmap_data,
low_color = "#0000ff",
mid_color = "#ffffff",
high_color = "#ff0000",
gap_size = 10,
cluster_method = "complete",
distance_method = "euclidean",
dend_height = 0.2,
rowname_size = 0.8
)
```
Get help using command `?TOmicsVis::circos_heatmap` or reference page [https://benben-miao.github.io/TOmicsVis/reference/circos_heatmap.html](https://benben-miao.github.io/TOmicsVis/reference/circos_heatmap.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::circos_heatmap
```
#### 3.3.4 volcano_plot
Volcano plot for visualizing differentailly expressed genes.
```{r volcano_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load deg_data example datasets
data(deg_data)
# 2. Run volcano_plot plot function
volcano_plot(
deg_data,
log2fc_cutoff = 1,
pq_value = "pvalue",
pq_cutoff = 0.005,
cutoff_line = "longdash",
point_shape = "large_circle",
point_size = 1,
point_alpha = 0.5,
color_normal = "#888888",
color_log2fc = "#008000",
color_pvalue = "#0088ee",
color_Log2fc_p = "#ff0000",
label_size = 3,
boxed_labels = FALSE,
draw_connectors = FALSE,
legend_pos = "right"
)
```
Get help using command `?TOmicsVis::volcano_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/volcano_plot.html](https://benben-miao.github.io/TOmicsVis/reference/volcano_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::volcano_plot
```
#### 3.3.5 ma_plot
MversusA plot for visualizing differentially expressed genes.
```{r ma_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load deg_data example datasets
data(deg_data2)
# 2. Run volcano_plot plot function
ma_plot(
deg_data2,
foldchange = 2,
fdr_value = 0.05,
point_size = 0.5,
color_up = "#FF0000",
color_down = "#008800",
color_alpha = 0.5,
top_method = "fc",
top_num = 20,
label_size = 8,
label_box = TRUE,
title = "Group1 -versus- Group2",
xlab = "Log2 mean expression",
ylab = "Log2 fold change",
ggTheme = "theme_minimal"
)
```
Get help using command `?TOmicsVis::ma_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/ma_plot.html](https://benben-miao.github.io/TOmicsVis/reference/ma_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::ma_plot
```
#### 3.3.6 heatmap_group
Heatmap group for visualizing grouped gene expression data.
```{r heatmap_group, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(heatmap_group_data)
head(heatmap_group_data)
# 2. Run heatmap_group plot function
heatmap_group(
data = heatmap_group_data,
scale_data = "none",
clust_method = "complete",
border_show = TRUE,
value_show = TRUE,
low_color = "#00880088",
mid_color = "#ffffff",
high_color = "#ff000088",
na_color = "#ff8800",
x_angle = 45
)
```
Get help using command `?TOmicsVis::heatmap_group` or reference page [https://benben-miao.github.io/TOmicsVis/reference/heatmap_group.html](https://benben-miao.github.io/TOmicsVis/reference/heatmap_group.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::heatmap_group
```
### 3.4 Advanced Analysis
#### 3.4.1 trend_plot
Trend plot for visualizing gene expression trend profile in multiple traits.
```{r trend_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load chord_data example datasets
data(trend_data)
# 2. Run trend_plot plot function
trend_plot(
trend_data,
scale_method = "globalminmax",
miss_value = "exclude",
line_alpha = 0.5,
show_points = TRUE,
show_boxplot = TRUE,
num_column = 2,
xlab = "Traits",
ylab = "Genes Expression",
sci_fill_color = "Sci_AAAS",
sci_fill_alpha = 0.8,
sci_color_alpha = 0.8,
legend_pos = "right",
legend_dir = "vertical",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::trend_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/trend_plot.html](https://benben-miao.github.io/TOmicsVis/reference/trend_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::trend_plot
```
#### 3.4.2 gene_cluster_trend
Gene cluster trend plot for visualizing gene expression trend profile in multiple samples.
```{r gene_cluster_trend, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(gene_cluster_data)
# 2. Run plot function
gene_cluster_trend(
gene_cluster_data,
thres = 0.25,
min_std = 0.2,
palette = "PiYG",
cluster_num = 4
)
```
Get help using command `?TOmicsVis::gene_cluster_trend` or reference page [https://benben-miao.github.io/TOmicsVis/reference/gene_cluster_trend.html](https://benben-miao.github.io/TOmicsVis/reference/gene_cluster_trend.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::gene_cluster_trend
```
#### 3.4.3 gene_rank_plot
Gene cluster trend plot for visualizing gene expression trend profile in multiple samples.
```{r gene_rank_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(deg_data)
# 2. Run plot function
gene_rank_plot(
data = deg_data,
log2fc = 1,
palette = "Spectral",
top_n = 10,
genes_to_label = NULL,
label_size = 5,
base_size = 12,
title = "Gene ranking dotplot",
xlab = "Ranking of differentially expressed genes",
ylab = "Log2FoldChange"
)
```
Get help using command `?TOmicsVis::gene_rank_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/gene_rank_plot.html](https://benben-miao.github.io/TOmicsVis/reference/gene_rank_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::gene_rank_plot
```
#### 3.4.4 wgcna_pipeline
WGCNA analysis pipeline for RNA-Seq.
```{r wgcna_pipeline, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load wgcna_pipeline example datasets
data(wgcna_gene_exp)
data(wgcna_sample_group)
# 2. Run wgcna_pipeline plot function
# wgcna_pipeline(wgcna_gene_exp, wgcna_sample_group)
```
Get help using command `?TOmicsVis::wgcna_pipeline` or reference page [https://benben-miao.github.io/TOmicsVis/reference/wgcna_pipeline.html](https://benben-miao.github.io/TOmicsVis/reference/wgcna_pipeline.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::wgcna_pipeline
```
#### 3.4.5 network_plot
Network plot for analyzing and visualizing relationship of genes.
```{r network_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(network_data)
head(network_data)
# 2. Run network_plot plot function
network_plot(
network_data,
calcBy = "degree",
degreeValue = 0.05,
nodeColorNormal = "#00888888",
nodeBorderColor = "#FFFFFF",
nodeColorFrom = "#FF000088",
nodeColorTo = "#00880088",
nodeShapeNormal = "circle",
nodeShapeSpatial = "csquare",
nodeSize = 10,
labelSize = 0.5,
edgeCurved = TRUE,
netLayout = "layout_on_sphere"
)
```
Get help using command `?TOmicsVis::network_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/network_plot.html](https://benben-miao.github.io/TOmicsVis/reference/network_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::network_plot
```
#### 3.4.6 heatmap_cluster
Heatmap cluster plot for visualizing clustered gene expression data.
```{r heatmap_cluster, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(gene_exp2)
head(gene_exp2)
# 2. Run network_plot plot function
heatmap_cluster(
data = gene_exp2,
dist_method = "euclidean",
hc_method = "average",
k_num = 5,
show_rownames = FALSE,
palette = "Spectral",
cluster_pal = "Set1",
gaps_col = NULL,
angle_col = 45,
label_size = 10,
base_size = 12
)
```
Get help using command `?TOmicsVis::heatmap_cluster` or reference page [https://benben-miao.github.io/TOmicsVis/reference/heatmap_cluster.html](https://benben-miao.github.io/TOmicsVis/reference/heatmap_cluster.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::heatmap_cluster
```
### 3.5 GO and KEGG Enrichment
#### 3.5.1 chord_plot
Chord plot for visualizing the relationships of pathways and genes.
```{r chord_plot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load chord_data example datasets
data(chord_data)
# 2. Run chord_plot plot function
chord_plot(
chord_data,
multi_colors = "RainbowColors",
color_alpha = 0.5,
link_visible = TRUE,
link_dir = -1,
link_type = "diffHeight",
sector_scale = "Origin",
width_circle = 3,
dist_name = 3,
label_dir = "Vertical",
dist_label = 0.3
)
```
Get help using command `?TOmicsVis::chord_plot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/chord_plot.html](https://benben-miao.github.io/TOmicsVis/reference/chord_plot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::chord_plot
```
#### 3.5.2 go_enrich
GO enrichment analysis based on GO annotation results (None/Exist Reference Genome).
```{r go_enrich, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(go_anno)
head(go_anno)
data(go_deg_fc)
head(go_deg_fc)
# 2. Run go_enrich analysis function
res <- go_enrich(
go_anno,
go_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 0.5,
qvalue_cutoff = 0.5
)
head(res)
```
Get help using command `?TOmicsVis::go_enrich` or reference page [https://benben-miao.github.io/TOmicsVis/reference/go_enrich.html](https://benben-miao.github.io/TOmicsVis/reference/go_enrich.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::go_enrich
```
#### 3.5.3 go_enrich_stat
GO enrichment analysis and stat plot based on GO annotation results (None/Exist Reference Genome).
```{r go_enrich_stat, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(go_anno)
# head(go_anno)
data(go_deg_fc)
# head(go_deg_fc)
# 2. Run go_enrich_stat analysis function
go_enrich_stat(
go_anno,
go_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 0.5,
qvalue_cutoff = 0.5,
max_go_item = 15,
strip_fill = "#CDCDCD",
xtext_angle = 45,
sci_fill_color = "Sci_AAAS",
sci_fill_alpha = 0.8,
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::go_enrich_stat` or reference page [https://benben-miao.github.io/TOmicsVis/reference/go_enrich_stat.html](https://benben-miao.github.io/TOmicsVis/reference/go_enrich_stat.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::go_enrich_stat
```
#### 3.5.4 go_enrich_bar
GO enrichment analysis and bar plot based on GO annotation results (None/Exist Reference Genome).
```{r go_enrich_bar, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(go_anno)
# head(go_anno)
data(go_deg_fc)
# head(go_deg_fc)
# 2. Run go_enrich_bar analysis function
go_enrich_bar(
go_anno,
go_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 0.5,
qvalue_cutoff = 0.5,
sign_by = "p.adjust",
category_num = 30,
font_size = 12,
low_color = "#ff0000aa",
high_color = "#008800aa",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::go_enrich_bar` or reference page [https://benben-miao.github.io/TOmicsVis/reference/go_enrich_bar.html](https://benben-miao.github.io/TOmicsVis/reference/go_enrich_bar.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::go_enrich_bar
```
#### 3.5.5 go_enrich_dot
GO enrichment analysis and dot plot based on GO annotation results (None/Exist Reference Genome).
```{r go_enrich_dot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(go_anno)
# head(go_anno)
data(go_deg_fc)
# head(go_deg_fc)
# 2. Run go_enrich_dot analysis function
go_enrich_dot(
go_anno,
go_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 0.5,
qvalue_cutoff = 0.5,
sign_by = "p.adjust",
category_num = 30,
font_size = 12,
low_color = "#ff0000aa",
high_color = "#008800aa",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::go_enrich_dot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/go_enrich_dot.html](https://benben-miao.github.io/TOmicsVis/reference/go_enrich_dot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::go_enrich_dot
```
#### 3.5.6 go_enrich_tree
GO enrichment analysis and tree plot based on GO annotation results (None/Exist Reference Genome).
```{r go_enrich_tree, warning=FALSE, fig.width=10.00, fig.height=6.18, eval=FALSE}
# 1. Load example datasets
data(go_anno)
# head(go_anno)
data(go_deg_fc)
# head(go_deg_fc)
# 2. Run go_enrich_tree analysis function
go_enrich_tree(
go_anno,
go_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 0.5,
qvalue_cutoff = 0.5,
sign_by = "p.adjust",
category_num = 20,
font_size = 4,
low_color = "#ff0000aa",
high_color = "#008800aa",
hclust_method = "complete",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::go_enrich_tree`.
```{r}
# Get help with command in R console.
# ?TOmicsVis::go_enrich_tree
```
#### 3.5.7 go_enrich_net
GO enrichment analysis and net plot based on GO annotation results (None/Exist Reference Genome).
```{r go_enrich_net, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(go_anno)
# head(go_anno)
data(go_deg_fc)
# head(go_deg_fc)
# 2. Run go_enrich_net analysis function
go_enrich_net(
go_anno,
go_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 0.5,
qvalue_cutoff = 0.5,
category_num = 20,
net_layout = "circle",
net_circular = TRUE,
low_color = "#ff0000aa",
high_color = "#008800aa"
)
```
Get help using command `?TOmicsVis::go_enrich_net` or reference page [https://benben-miao.github.io/TOmicsVis/reference/go_enrich_net.html](https://benben-miao.github.io/TOmicsVis/reference/go_enrich_net.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::go_enrich_net
```
#### 3.5.8 kegg_enrich
KEGG enrichment analysis based on KEGG annotation results (None/Exist Reference Genome).
```{r kegg_enrich, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(kegg_anno)
head(kegg_anno)
data(kegg_deg_fc)
head(kegg_deg_fc)
# 2. Run go_enrich analysis function
res <- kegg_enrich(
kegg_anno,
kegg_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 1,
qvalue_cutoff = 1
)
head(res)
```
Get help using command `?TOmicsVis::kegg_enrich` or reference page [https://benben-miao.github.io/TOmicsVis/reference/kegg_enrich.html](https://benben-miao.github.io/TOmicsVis/reference/kegg_enrich.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::kegg_enrich
```
#### 3.5.9 kegg_enrich_bar
KEGG enrichment analysis and bar plot based on KEGG annotation results (None/Exist Reference Genome).
```{r kegg_enrich_bar, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(kegg_anno)
# head(kegg_anno)
data(kegg_deg_fc)
# head(kegg_deg_fc)
# 2. Run kegg_enrich_bar analysis function
kegg_enrich_bar(
kegg_anno,
kegg_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 1,
qvalue_cutoff = 1,
sign_by = "p.adjust",
category_num = 30,
font_size = 12,
low_color = "#ff0000aa",
high_color = "#008800aa",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::kegg_enrich_bar` or reference page [https://benben-miao.github.io/TOmicsVis/reference/kegg_enrich_bar.html](https://benben-miao.github.io/TOmicsVis/reference/kegg_enrich_bar.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::kegg_enrich_bar
```
#### 3.5.10 kegg_enrich_dot
KEGG enrichment analysis and dot plot based on KEGG annotation results (None/Exist Reference Genome).
```{r kegg_enrich_dot, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(kegg_anno)
# head(kegg_anno)
data(kegg_deg_fc)
# head(kegg_deg_fc)
# 2. Run kegg_enrich_dot analysis function
kegg_enrich_dot(
kegg_anno,
kegg_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 1,
qvalue_cutoff = 1,
sign_by = "p.adjust",
category_num = 30,
font_size = 12,
low_color = "#ff0000aa",
high_color = "#008800aa",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::kegg_enrich_dot` or reference page [https://benben-miao.github.io/TOmicsVis/reference/kegg_enrich_dot.html](https://benben-miao.github.io/TOmicsVis/reference/kegg_enrich_dot.html).
```{r}
# Get help with command in R console.
# ?TOmicsVis::kegg_enrich_dot
```
#### 3.5.11 kegg_enrich_tree
KEGG enrichment analysis and tree plot based on KEGG annotation results (None/Exist Reference Genome).
```{r kegg_enrich_tree, warning=FALSE, fig.width=10.00, fig.height=6.18, eval=FALSE}
# 1. Load example datasets
data(kegg_anno)
# head(kegg_anno)
data(kegg_deg_fc)
# head(kegg_deg_fc)
# 2. Run kegg_enrich_tree analysis function
kegg_enrich_tree(
kegg_anno,
kegg_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 1,
qvalue_cutoff = 1,
sign_by = "p.adjust",
category_num = 20,
font_size = 4,
low_color = "#ff0000aa",
high_color = "#008800aa",
hclust_method = "complete",
ggTheme = "theme_light"
)
```
Get help using command `?TOmicsVis::kegg_enrich_tree`.
```{r}
# Get help with command in R console.
# ?TOmicsVis::kegg_enrich_tree
```
#### 3.5.12 kegg_enrich_net
KEGG enrichment analysis and net plot based on KEGG annotation results (None/Exist Reference Genome).
```{r kegg_enrich_net, warning=FALSE, fig.width=10.00, fig.height=6.18}
# 1. Load example datasets
data(kegg_anno)
# head(kegg_anno)
data(kegg_deg_fc)
# head(kegg_deg_fc)
# 2. Run kegg_enrich_net analysis function
kegg_enrich_net(
kegg_anno,
kegg_deg_fc,
padjust_method = "fdr",
pvalue_cutoff = 1,
qvalue_cutoff = 1,
category_num = 20,
net_layout = "circle",