cstubben / trinotateR

Trinotate annotation report summaries in R
12 stars 6 forks source link

plot_NOGs.R: How to actually plot the annotations? #3

Open browngcm opened 6 years ago

browngcm commented 6 years ago

Hello,

Forgive my ignorance, but I was wondering if you could specify how I would actually create a visual plot of the eggnog annotaions using the plot_NOGs function. This is the only part of the trinotateR functions that I'm having trouble with. Any info would be great. Thanks!

Mike

cstubben commented 6 years ago

No problem. That function requires eggNOG annotations from EMBL, which I should add to the data directory. You can download it using the code below (note the function requires both cog and eggNOG tables).

x <- read_trinotate("Trinotate_report.xls")
data(cogs)
download.file("http://eggnogdb.embl.de/download/eggnog_4.5/data/NOG/NOG.annotations.tsv.gz", "NOG.annotations.tsv.gz")
system("gunzip NOG.annotations.tsv.gz")
egg <- read.table("NOG.annotations.tsv", sep="\t", stringsAsFactors=FALSE, quote="")
names(egg) <- c("db", "nog", "proteins", "species", "class", "description")
plot_NOGs(x)
plot_nogs
mostafaabuzaid25 commented 5 years ago

png::writePNG(plot_NOGs(x),"eggnog.png") Error in plot.new() : figure margins too large