Entering edit mode
7.3 years ago
a.rex
▴
350
I have a bed file that looks like this:
scaffold1 206 262 loc.00001 + .
scaffold1 749 1391 loc.00001 + .
scaffold1 1549 1595 loc.00001 + .
scaffold1 2090 2657 loc.00001 + .
scaffold1 3013 3065 loc.00001 + .
scaffold1 3315 3371 loc.00001 + .
I wish to append the transcript id's in linux with a peak id so that it looks like this:
scaffold1 206 262 loc.00001_peak1 + .
scaffold1 749 1391 loc.00001_peak2 + .
scaffold1 1549 1595 loc.00001_peak3 + .
scaffold1 2090 2657 loc.00001_peak4 + .
scaffold1 3013 3065 loc.00001_peak5 + .
scaffold1 3315 3371 loc.00001_peak6 + .
I have used the following command to add peak_ids to the file. I just don't know how to conjugate it to the column itself.
awk '{printf "peak_%d\t%s\n", NR, $0}' int.bed > int.new.bed