Hi there,
I cant figure it out how to solve a problem in unix, so a little help would be appritiated.
So, I want to delete a line (or swap the two column) only if the column3 is greater then column4. Its a tab delimited bed file. The expected output would be the same as the original file, but swapped coordinates if start is greater then stop. Maybe awk, sed?
x1 I 139154 139256 y1 +
x2 I 166268 166340 y2 +
x3 I 181135 181248 y3 +
x4 I 182597 182516 y4 +
Thanks a lot!
L
I cant figure it out how to solve a problem in unix, so a little help would be appritiated.
So, I want to delete a line (or swap the two column) only if the column3 is greater then column4. Its a tab delimited bed file. The expected output would be the same as the original file, but swapped coordinates if start is greater then stop. Maybe awk, sed?
x1 I 139154 139256 y1 +
x2 I 166268 166340 y2 +
x3 I 181135 181248 y3 +
x4 I 182597 182516 y4 +
Thanks a lot!
L
Comment