画染色体图

作者: 落寞的橙子 | 来源:发表于2020-06-22 03:58 被阅读0次

    Y叔的Chipseeker包是个很好的工具
    另外介绍karyoploteR包
    how-to-make-chromosome-color-maps-for-bed-ranges
    karyoploteR: 将基因组信息在染色体上“画”出来
    我的一个例子

    rm(list=ls())
    suppressMessages(library(karyoploteR))
    fed<-read.table("~/Desktop/Fed.all.m6a.delate.bed",sep = "\t")
    fasting<-read.table("~/Desktop//Fasting.all.m6a.delate.bed",sep = "\t")
    fed<-fed[,1:3]
    colnames(fed)<-c("chr","start","end")
    fasting<-fasting[,1:3]
    colnames(fasting)<-c("chr","start","end")
    #输入文件这里其实就是最简单的bed file的格式 即"chr","start","end"
    fed_gr<- toGRanges(fed)
    fasting_gr<-toGRanges(fasting)
    my_kp <- plotKaryotype(genome="hg38",plot.type =2)
    kpPlotRegions(my_kp, fed_gr, col="#54C6DC",border = "#54C6DC",r0 = 0, r1 = 1,num.layers = 5,avoid.overlapping=T)
    kpPlotRegions(my_kp, fasting_gr, col="#F16446",border = "#F16446",data.panel = 2,r0 = 0, r1 = 1,avoid.overlapping=T)
    
    

    相关文章

      网友评论

        本文标题:画染色体图

        本文链接:https://www.haomeiwen.com/subject/tjytfktx.html