I've tried the tr
function to transpose in bash but it's not working. e.g. tr 'abcd' 'jkmn'
...
The idea is to take a series of numbers:
92121
92911
and switch them so that they would look like this:
99
22
19
21
11
Here is a test dataset:
echo "92121
92911
29222
22222
22222
22222" > ~/Desktop/output.geno
I know we can separate numbers using the cut function.
I feel that I could use
for var in 1:96
do
tmp=$(cut -c var output.geno)
tr $tmp
done