plot.cogs.legend(ProGenExpress) | R Documentation |
This is a simple function which plots a legend of the COGS categories.
This function can be used directly, and is also used by plotrange
and plotrange.vertical
plot.cogs.legend(col.cogs = NULL, desc.col = "Description", col.col = "Color")
col.cogs |
A data frame with at least two columns - one giving a textual description and the other giving a color to be assigned to that description |
desc.col |
The column name of the column in col.cogs that contains the descriptions |
col.col |
The column name of the column in col.cogs that contains the colors |
Rather surprisingly, internally this function uses barplot
A graph is plotted to the current device
Michael Watson
Tatusov RL, Fedorova ND, Jackson JD, Jacobs AR, Kiryutin B, Koonin EV, Krylov DM, Mazumder R, Mekhedov SL, Nikolskaya AN, Rao BS, Smirnov S, Sverdlov AV, Vasudevan S, Wolf YI, Yin JJ, Natale DA. The COG database: an updated version includes eukaryotes. BMC Bioinformatics. 2003 Sep 11;4(1):41.
data(cogstab) # produced by: # cogstab <- read.table("cogs_category.txt", sep="\t", header=TRUE, quote=NULL, # colClasses="character") # cogstab <- data.frame(cogstab,Color=I(rainbow(nrow(cogstab)))) plot.cogs.legend(cogstab)