Y叔团队参与开发的一个R包RIdeogram,可用来绘制基因组染色体的可视化图形,如基因密度、分子标记等。
直接上代码。
#install.packages("RIdeogram")
library(RIdeogram)
data(human_karyotype, package="RIdeogram")
data(gene_density, package="RIdeogram")
data(Random_RNAs_500, package="RIdeogram")
数据格式:
> head(human_karyotype)
Chr Start End CE_start CE_end
1 0 248956422 122026459 124932724
2 0 242193529 92188145 94090557
3 0 198295559 90772458 93655574
4 0 190214555 49712061 51743951
5 0 181538259 46485900 50059807
6 0 170805979 58553888 59829934
> head(gene_density)
Chr Start End Value
1 1 1000000 65
1 1000001 2000000 76
1 2000001 3000000 35
1 3000001 4000000 30
1 4000001 5000000 10
1 5000001 6000000 10
> head(Random_RNAs_500)
Type Shape Chr Start End color
tRNA circle 6 69204486 69204568 6a3d9a
rRNA box 3 68882967 68883091 33a02c
rRNA box 5 55777469 55777587 33a02c
rRNA box 21 25202207 25202315 33a02c
miRNA triangle 1 86357632 86357687 ff7f00
miRNA triangle 11 74399237 74399333 ff7f00
绘图。
ideogram(karyotype = human_karyotype)
convertSVG("chromosome.svg", device = "png")
ideogram(karyotype = human_karyotype, overlaid = gene_density)
convertSVG("chromosome.svg", device = "png")
ideogram(karyotype = human_karyotype,
overlaid = gene_density,
label = Random_RNAs_500,
label_type = "marker")
convertSVG("chromosome.svg", device = "png")
更多细节可查看:https://cran.r-project.org/web/packages/RIdeogram/vignettes/RIdeogram.html
注意事项:输入数据的列名需与示例数据一致。
标签:gene,density,基因组,Chr,human,RIdeogram,karyotype,绘制 From: https://www.cnblogs.com/miyuanbiotech/p/18250279