This is a test version of Biostars. For the public version, visit https://www.biostars.org.
gff format mvista convert...
KX639503    EMBL    biological_region   1636    4249    .   -   .   ID=KX639503.14 featflags=type:tRNA gene=trnK-UUU

Hi

I want to design a shell script using awk or gsub.

How do I write a script to change biological_region in field 3 to utr when field 10 is a tRNA pattern?

I

awk '{if ($10 ~ /tRNA/) {gsub(/\biological_region/, "utr")} ' test1.txt

I entered it but it comes out as 0

If anyone knows, please advise.

Thanks in advance!

mvista gsub gff awk

not sure what is going on here but as far as I remember GFF only has 9 fields (so there should not be any space/tab in that last field) ...

moreover the cmdline you post there can not work as it at least misses an }

0 answers

No answers yet.

Log in to answer this question.