gmt file for gProfiler : Linux/R

Viewed 50

I am preparing the background gmt file for gProfiler(custom, non-model plant) but what I have is the Gene id on first column, which needs to be in the reverse order. Is there a way in Linux or R to rearrange these data?

**current**
Gene1   GO:A    GO:B    GO:C    GO:D    GO:E
Gene2   GO:E    GO:F    GO:G    GO:H    GO:I    GO:J
Gene3   GO:A    GO:D    GO:E    GO:H    GO:J
Gene4   GO:B    GO:C    GO:E    GO:F    GO:1J   
Gene5   GO:C    GO:J
**new**
GO:A    Gene1   Gene3
GO:B    Gene1   Gene4
GO:C    Gene1   Gene4   Gene5
GO:D    Gene1   Gene3
GO:E    Gene1   Gene2   Gene3   Gene4
GO:F    Gene2   Gene4
GO:G    Gene2
GO:H    Gene2   Gene3
GO:I    Gene2
GO:J    Gene2   Gene3   Gene4   Gene5
0 Answers
Related