Replace whole column in BED file with motif length
I was mining STR using MISA and I collected data from gff file to make a BED file including 5 column. Chromosome|Start|End|Motif length|Motif. But the 4th column showed Times of repeat example of my BED file
I want to replace 4th column in to Motif length.
for i in perfect.SSR_MISA.bed; do awk '{OFS="\t"} n=$5 q=$(expr length "$n") {print $1, $2, $3, q, $5}' >> perfect.SSR_MISA.bed; sleep 1; done
I tried this buts it doesn't work
awk '{OFS="\t"} q=length($5) {print $1, $2, $3, q, $5}' perfect.SSR_MISA.bed > perfect.SSR_MISA.result.bed