生信小白更新利用RIdeogram画染色体位置图
2023-07-05 本文已影响0人
生信漫谈
不错的RIdeogram 包
由Guangchuang Yu与Jinhui Chen指导,Zhaodong Hao同学出品的R包。功能一目了然,就是在染色体上直接体现某些基因的value。
The R package RIdeogram allows users to build high-quality idiograms of any species of interest. It can map continuous and discrete genome-wide data on the idiograms and visualize them in a heat map and track labels, respectively.
![](https://img.haomeiwen.com/i24438764/79593bb0b2990b8a.png)
运行RStudio,设置工作路径
查询工作路径
getwd()
设置工作路径
setwd("D:/RStudio/data")
包安装路径
.libPaths()
染色体基因位置图
#安装RIdeogram
#安装RIdeogram
install.packages('RIdeogram')
#调用RIdeogram
library(RIdeogram)
karyotype <- read.table("Os_karyotype.txt", sep = "\t", header = T, stringsAsFactors = F)
density <- read.table("Os_density.txt", sep = "\t", header = T, stringsAsFactors = F)
location <- read.table("Os_location.txt", sep = "\t", header = T, stringsAsFactors = F)
ideogram(karyotype = karyotype, overlaid = density,label=location,label_type = "marker")
convertSVG("chromosome.svg", device = "tiff", dpi = 300)
convertSVG("chromosome.svg", device = "png")
![](https://img.haomeiwen.com/i24438764/e3e00fa77185aafc.png)
![](https://img.haomeiwen.com/i24438764/3f09e23a033e13ff.png)
得到的是三个格式的图片:
![](https://img.haomeiwen.com/i24438764/e78a703acc265de3.png)
Os_density示例文件格式如下:
![](https://img.haomeiwen.com/i24438764/3fac60ea9524f529.png)
Os_karyotype示例文件格式如下:
![](https://img.haomeiwen.com/i24438764/7b5439d2f470ae01.png)
Os_location基因位置示例文件如下:
![](https://img.haomeiwen.com/i24438764/a73a02f362449aa6.png)
![](https://img.haomeiwen.com/i24438764/6e57b1385f6ef431.png)
今天就先给大家介绍到这里,希望大家的科研能有所帮助!祝您科研顺利快乐!
![](https://img.haomeiwen.com/i24438764/aff72bcc831ec160.png)
生信漫谈
生信漫谈,认识生信,学习生信,跨越生信入门路上的障碍,从而利用生信技术解决科研学习路上的绊脚石!