I have list of ids matched with key values of second column, I want to remove the duplicates and retain the corresponding values as comma or colon separated as shown in the out put format Input file
TRINITY_DN728479_c0_g1_i1 GO:0003674
TRINITY_DN728479_c0_g1_i1 GO:0003824
TRINITY_DN728479_c0_g1_i1 GO:0003887
TRINITY_DN728480_c0_g1_i1 GO:0003891
TRINITY_DN728480_c0_g1_i1 GO:0003892
I want the output
TRINITY_DN728479_c0_g1_i1 GO:0003674, GO:0003824, GO:0003887
TRINITY_DN728480_c0_g1_i1 GO:0003891,GO:0003892
I have tried awk but it not working out
awk -vORS=, '{ print $2 }' Gene.GO | sed 's/,$/\n/'