I am trying to use bedtools getfasta on a txt file but some of the chromosome coordinates from big to low, how can I fix this so that all chromosome coordinates are from low to big? I am using command line on Ubuntu.
I expected the command to run properly when running but the bedtools getfasta -fi file.fasta -bed file.txt
the text file looks like this:
ChromosomeName Position1 Position2 ChromosomeName Position1 Position2 ChromosomeName Position1 Position2
Sometimes P1 > P2 which causes the error in the title.