Hi there,
how to append the header line (chromosome or scaffold) to the end of each annotation.
Input:
@Chr1
54584 54773 100 1.9 98
55019 55105 22 3.9 22
@Chr2
2226 2261 18 1.9 19
4211 4259 26 1.9 25
4426 4468 22 2 22
@utg7294
919 1455 36 15 36
919 1455 71 7.5 72
4872 4913 22 1.9 22
Expected output
54584 54773 100 1.9 98 @Chr1
55019 55105 22 3.9 22 @Chr1
2226 2261 18 1.9 19 @Chr2
4211 4259 26 1.9 25 @Chr2
4426 4468 22 2 22 @Chr2
919 1455 36 15 36 @utg7294
919 1455 71 7.5 72 @utg7294
4872 4913 22 1.9 22 @utg7294
It must be simple as search line has '@', if so append that header to end until it finds another '@'. But I couldn't find an exact script.
Thanks for your help. Sam