I need to reformat the kegg reconstruct pathway
output, I have something like this in file1:
00550 Peptidoglycan biosynthesis (2)
K01000
K02563
00511 Other glycan degradation (8) K01190 K01191
K01192
K01201
K01227
K12309
I need some things like that in file2:
00550 Peptidoglycan biosynthesis (2) K01000 K02563
00511 Other glycan degradation (6) K01190 K01191 K01192 K01201 K01227 K12309
How could I reformat this in linux or python ?
Thanks
(8)
is what? And it is changed to(6)
for what? The count of items to follow?