Mercurial > repos > dereeper > sniplay
annotate hapmap2mlmm/transpose.awk @ 14:d15869b3731a draft
Deleted selected files
author | dereeper |
---|---|
date | Tue, 08 Jan 2019 08:46:57 -0500 |
parents | c6640c49fd01 |
children |
rev | line source |
---|---|
1 | 1 BEGIN { |
2 max_x =0; | |
3 max_y =0; | |
4 } | |
5 | |
6 { | |
7 max_y++; | |
8 for( i=1; i<=NF; i++ ) | |
9 { | |
10 if (i>max_x) max_x=i; | |
11 A[i,max_y] = $i; | |
12 } | |
13 } | |
14 | |
15 END { | |
16 for ( x=1; x<=max_x; x++ ) | |
17 { | |
18 for ( y=1; y<=max_y; y++ ) | |
19 { | |
20 if ( (x,y) in A ) printf "%s",A[x,y]; | |
21 if ( y!=max_y ) printf " "; | |
22 } | |
23 printf "\n"; | |
24 } | |
25 } |