1.利用R语言从多种给癌症中画基因在癌症中的表达的箱线图和小提琴图。
rna_cancer_sample <- read.delim("D:/desk_user/morning/TCGA_ALL/rna_cancer_sample.tsv")
View(rna_cancer_sample)
typeof(rna_cancer_sample$Gene)
[1] "integer"
t2=as.character(rna_cancer_sample$Gene)
t3=rna_cancer_sample[t2%in%t,]
View(t3)
library(ggplot2)
library(ggpubr)
library(reshape2)
p <- ggplot(t3,aes(x=Cancer, y=FPKM), colour=Cancer)+
geom_violin(aes(fill=Cancer))
p
p1 <- ggplot(t3,aes(x=Cancer, y=FPKM), colour=Cancer)+
geom_boxplot(aes(fill=Cancer))
rna_cancer_sample数据格式如下
t3的数据格式
小提琴图
箱线图