Hi, (sorry if this question is super simple or I have asked it in a wrong place)
I have some data as bellow and I want to draw a histogram same as this with ggplot2 in R program (on linux terminal).
As you can see it is the letters from A to Z in the X axis (Function class) and the frequencies as numbers in the Y and the important point is this that each bar has its own unique color.
In addition, there is a "color help" that describe each class by the same color of each bars that I am not sure if it is some characteristics of R ggplot package or not?
I have checked some online helps but I do not know how to insert my data in the ggplo2 and asigne a unique color for each class.
Please help me and thank you in advance.
my sample numbers:
COG class.... count.... description
A ....5.......RNA processing and modification
B.... 2...... Chromatin structure and dynamics
C.... 18..... Energy production and conversion
D..... 26..... Cell cycle control, cell division, chromosome partitioning
E..... 15..... Amino acid transport and metabolism
F....... 5..... Nucleotide transport and metabolism
G...... 13.... Carbohydrate transport and metabolism
H........ 6.... Coenzyme transport and metabolism
I 15 Lipid transport and metabolism
J 20 Translation, ribosomal structure and biogenesis
K 24 Transcription
L 28 Replication, recombination and repair
M 18 Cell wall/membrane/envelope biogenesis
N 1 Cell motility
O 29 Posttranslational modification, protein turnover, chaperones
P 19 Inorganic ion transport and metabolism
Q 16 Secondary metabolites biosynthesis, transport and catabolism
R 85 General function prediction only
S 20 Function unknown
T 32 Signal transduction mechanisms
U 14 Intracellular trafficking, secretion, and vesicular transport
V 6 Defense mechanisms
Z.... 14..... Cytoskeleton