Advertisement

R语言生信绘图全集

阅读量:

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)) 
    
    
    
    
    
    

全部评论 (0)

还没有任何评论哟~