【发布时间】:2018-10-13 20:45:01
【问题描述】:
我正在做基因序列分析,我有一个基因组,我已经绘制了基因及其蛋白质的图,但是情节非常繁忙,当我编织我的 R 降价以呈现图像时,它被切断了。不知道从哪里开始如何调整它,任何帮助将不胜感激。这是它的代码:
library(tidyverse)
library(ggplot2)
library(devtools)
install_github("wilkox/gggenes")
library(gggenes)
gene_prediction <-read.csv('~/genome1table.csv', header=TRUE, sep=',')
gene_names<-c(gene_prediction$Gene)
starts <- c(gene_prediction$Start)
ends<-c(gene_prediction$End)
strand<-c(gene_prediction$Strand)
genome_name<-rep('Genome',62)
dfgenome1map<-data.frame(genome_name=genome_name, name=gene_names, start=starts, end=ends, category=category, strand=strand)
dfgenome1map$direction<- ifelse(dfgenome1map$strand == "+", 1, -1)
ggplot(dfgenome1map, aes(xmin=start, xmax=end, y='',
fill=category,
label=gene_names, forward= direction)) +
geom_gene_arrow() +
geom_gene_label(align = "center") +
labs(x='locus (bp)', fill='VOG category')+
theme_genes() +
scale_color_continuous() +
theme(axis.title.y = element_blank(),
axis.title.x=element_text())
【问题讨论】: