Entering edit mode
8.7 years ago
bright602
▴
50
How can I tranform the table 1 to table 2 by adding consecutive integer number in column 4? Thanks a lot.
Table 1:
1 1 16007
1 16008 24571
1 24572 27981
1 27982 30429
1 30430 32153
1 32154 32774
1 32775 37752
1 37753 38369
1 38370 38791
1 38792 39255
By adding 1, 2, 3, ….n on the forth column
Table 2:
1 1 16007 1
1 16008 24571 2
1 24572 27981 3
1 27982 30429 4
1 30430 32153 5
1 32154 32774 6
1 32775 37752 7
1 37753 38369 8
1 38370 38791 9
1 38792 39255 10
... ... ... ...
Bed file is tab delimited, as @Alex wrote, in that case
You can still use the comma, but you might specify the output field separator parameter just to make sure:
Commas are easier to read and type; they don't require pairing quotes around tab characters. Either way works.