Modifying/ manipulating text using vim, sed or awk (again) -
sorry 1 more quick question regarding previous 1 - want add in underscore between peak number , range. i'm getting odd results vim.
macs_peak_1 range=chr1:569425-569625 5'pad=0 3'pad=0 strand=+ repeatmasking=none ttcgctctaagattaaaaatgccctagcccacttcttaccacaaggcaca cctacaccccttatccctatactagttattatcgaaaccatcagcctact
to
macs_peak_1_range=chr1:569425-569625 5'pad=0 3'pad=0 strand=+ repeatmasking=none ttcgctctaagattaaaaatgccctagcccacttcttaccacaaggcaca cctacaccccttatccctatactagttattatcgaaaccatcagcctact
thank harriet
awk '/macs_peak/{$1=$1"_"$2;$2="";}1' your_file
Comments
Post a Comment