I have a CSV-file with 177 columns and 54248 rows as below:
SNP_Name,Chr,Coordinate,R921B12,R921C12,R921D12,...
CL635944_160.1,0,0,CC,CC,CC,...
CR_594.1,0,0,TT,TT,TT,...
CR_816.1,0,0,CC,TT,TT,...
I need to have a tab-delimited file with 54284 columns and 177 rows like:
R921B12 C C T T C C ...
R921C12 C C T T T T ...
R921D12 C C T T T T ...
The following command allows me to transpose a single column (number 3)
awk '{ printf( "%s ", $3); } END { printf( "\n" ); }' a.csv
but how can I do this for all of them?