Hi,
I have text file that looks like this:
tmm_S
28 chr1
54 chr1X
51 chr1Y
22 chr2
30 chr2X
29 chr2Y
tmm_Z
10 chr1
14 chr1X
67 chr1Y
23 chr2
12 chr2X
tmm_T
4 chr1X
12 chr1Y
23 chr2
34 chr2X
and so on...
As you can see there is a header followed by two columns (values and names).
I need the output in a tab delimited column format and use a '0' for any missing data:
row_level chr1 chr1X chr1Y chr2 chr2X chr2Y
tmm_S 28 54 51 22 30 29
tmm_Z 10 14 67 23 12 0
tmm_T 0 4 12 23 34 0
Thanks for our help.