My lab is looking to analyze 30 environmental samples containing NGS data. My when I tar'd the tar.bz2 file, the fastq files that were released were out of order in the new directory. I didn't think anything of it and figured the order would be simply be corrected as I progressed through my workflow. This didn't happen. Now in the frequency table my sample columns out of order. Here is an example of what I mean:
sample-B1 | sample-B4 | sample-B3 | sample-B2 | species |
---|---|---|---|---|
2 | 0 | 4 | 8 | dog |
14 | 3 | 10 | 9 | cat |
I want to change the sample columns to order B1-B4 like so:
sample-B1 | sample-B2 | sample-B3 | sample-B4 | species |
---|---|---|---|---|
2 | 8 | 4 | 0 | dog |
14 | 9 | 10 | 3 | cat |
This is a simplification. In my actual data I have 30 "sample" columns. Is there an easy way to accomplish this?
Thank you in advance for your time :)