Ok. I went through the scripts and applied it on my data. elixir_sinari it seems your script does not work for all factors. It doesn't give the information for all factors. With minor knowledge that I have about perl I couldn't find what is the problem.
pamu, your scripts seems to work just fine. There is just problem with those factors at the very end of each line. for some reasons the output is not true for those ones.
To make it more clear for you guys I write the first 5 lines of my input with some simplicity:
region1 A=0.001037;B=0.001054;C=0.001035;D=0.001026;D=0.001028 |
region2 A=0.002409;E=0.428007;D=0.002406;D=0.002408 |
region3 A=0.003289;C=0.0033;D=0.00331;D=0.00331;F=0.133698531 |
region4 A=0.005823;B=0.005901;C=0.005809;D=0.005819;D=0.005821;F=0.111969159 |
region5 A=0.005986;E=0.23462;D=0.005984;D=0.005987 |
And in this case the desired output will be:
* region1 region2 region3 region4 region5 |
A 0.001037 0.002409 0.003289 0.005823 0.005986 |
B 0.001054 NA NA 0.005901 NA |
C 0.001035 NA 0.0033 0.005809 NA |
D 0.001028 0.002408 0.00331 0.005821 |
E NA 0.428007 NA NA 0.23462 |
F NA NA 0.133698531 0.111969159 NA |
If you can find out the solution you will make me so happy!
P.S. I have some factors which their names start with similar letters (for exmaple: zfh, z, zld). But I don't think that's the problem.
Thanks again
##before posting this I just applied pamu's script on this exmaple here and it works just fine! But on my own data which is rather big and compicated I face the problem that I mentioned!
Help me! :| :|