Thanks a lot bro for the help! i am dealing with the query_pan_genome output of roary. I updated the query example, I apologize and if your help returned. Seeing your answer, I should convert to this the table and then your command?
Initial:
g1: 00A98_01563 00554_01552 CCUG38_01373
d2: 00554_01444
g3_3: 00A98_04566 CCUG38_05322
Delete what follows after the "_"
g1: 00A98 00554 CCUG38
d2: 00554
g3_3: 00A98 CCUG38
Your command:
00A98 00554 CCUG38
g1 1 1 1
d2 0 1 0
g3_3 1 0 1
How can I do?
I think this will be quite cumbersome on the commandline alone I think. This is a task for python or R really.