Post

Transf. matrix


Code to take a file with the parameters and results in columns and transform into a matrix. Need to be used to use the heatmap.gp.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
BEGIN{
col1 = 2.
col2 = 0.
i=0;
}
{
if ($1 != col1)
 {
	printf("\n");
	col1 = $1
	#if($4+$6 !=0)
	#{
 	#printf("%f ",$4/($4+$6));
	#}
	#else{printf("0 ");} 
	printf("%f ",$3);
}
else 
{
     #if ($2 !=1.3 )

	#if($4+$6 !=0)
	#{
 	#printf("%f ",$4/($4+$6));
	#}
	#else{printf("0 ");} 
	printf("%f ",$3);

#   ++i;
#   if (i==16)
#   {
#	  printf("\n");
#	i=0;
#   }
}

}
END{
 printf("\n");
}

Download file

This post is licensed under CC BY 4.0 by the author.