File 1 contains two columns. Column 1 has names of metabolic pathways and column 2 has the number of genes present in that pathway:
pathway1 3
pathway2 4
pathway3 5
pathway4 6
pathway5 9
File 2 has three columns. Column 1 has group number, column 2 has metabolic pathway names belonging to a particular group, column 3 has number of genes present in each pathway:
group1 pathway1 2
group1 pathway4 5
group1 pathway2 3
group2 pathway2 1
group2 pathway3 2
File1 and File2 are in csv format.
Output required:
Based on the name of the pathway, how can I print the number of genes from column 2 of File1 beside column 3 of File2, so that it looks like this:
group1 pathway1 2 3
group1 pathway4 5 6
group1 pathway2 3 4
group2 pathway2 1 4
group2 pathway3 2 5