箭头基因结构图gggenes

作者: 吴十三和小可爱的札记 | 来源:发表于2019-10-25 19:10 被阅读0次

总共就几个功能参数

geom_gene_arrow():绘制箭头基因图

geom_gene_label():绘制基因labels

geom_subgene_arrow()

geom_subgene_label()

make_alignment_dummies()

theme_genes()

安装和数据准备

# install.packages("gggenes")
sub_data <- subset(example_genes, 
                   molecule == "Genome4"|molecule == "Genome5")
f <- list(
  geom_gene_arrow(),
  facet_wrap(~ molecule, scales = "free", ncol = 1) ,
  scale_fill_brewer(palette = "Set3"),
  theme_genes())

基本箭头图

ggplot(sub_data, 
       aes(xmin = start, xmax = end, y = molecule, fill = gene,
           forward = direction)) + f
arrow.png

标记基因名称

ggplot(sub_data, 
       aes(xmin = start, xmax = end, y = molecule, fill = gene,
           forward = direction)) + f +
  geom_gene_label(aes(label = gene)) + 
  theme(legend.position='none')
gene_label.png

相关文章

网友评论

    本文标题:箭头基因结构图gggenes

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