I have seen your (jcbermu) script on how to select columns and copy to new file. It works perfect if all the columns are space delimited (any number of spaces will work fine). I would like to improve tour script to work in a file with this special format:
- First row has the headers for each column (animalid snp1 snp2 etc.) they are space separated.
- Second raw: FirstColumn has the animalid, space, then all the SNP genotypes (one cell per SNP) and they are all together as a block (genotypes are not space separated).
So, how to tell in the script that after row 1 and after column 1, we have columns data not separated (each cell is one field).
Example of my file:
animalid snp1 snp2 snp3 snp4 snp5 snp6 snp7 ....... snp8000 fish1 2020121 ....... 2 fish2 0202102 ....... 1 fish3 1201201 ....... 2 . . Fish1500 2010211 ...... 1