I have a file
Gene stable GO_ID
AAEL025769 AAEL025769-RA GO:0005525
AAEL020629 AAEL020629-RA GO:0003677
AAEL020629 AAEL020629-RA GO:0005634
AAEL020629 AAEL020629-RA GO:0000786
AAEL020629 AAEL020629-RA GO:0046982
AAEL011255 AAEL011255-RA GO:0005525
AAEL000004 AAEL000004-RA GO:0016021
AAEL000004 AAEL000004-RA GO:0016757
AAEL000004 AAEL000004-RA GO:0005789
AAEL000004 AAEL000004-RA GO:0006506
AAEL000004 AAEL000004-RA GO:0000030
AAEL003589 AAEL003589-RA NA
AAEL026354 AAEL026354-RA NA
For some genes there are multiple GO-IDs (such as AAEL020629 and AAEL000004 in the example above) . For each gene, if there are multiple GO_IDs, I want to combine them all together in single row (separate them by comma and space).
below is my desired output:
Gene GO_ID
AAEL025769 GO:0005525
AEL020629 GO:0003677, GO:0005634, GO:0000786, GO:0046982
AAEL011255 GO:0005525
AAEL000004 GO:0016021, GO:0016757, GO:0005789, GO:0006506, GO:0000030
AAEL003589 NA
AAEL026354 NA
Any idea how I can do this? Thanks