Entering edit mode
3.6 years ago
marcos.a.godoy.f
▴
10
hi, I need to change the header of several files and update the gff3 files
I need to add a string at the end of all headers something like :
sed 's />.*/&_ string /' file.fasta> outfile.fasta
the names of the scaffolds are in the first column, so I tried to update the gffs with:
awk '{$ 1 = $ 1 "_string"} 1' file.gff3> outfile.gff3
but the final file is unformatted, loses \ t for all columns, that is, the final result is just a single column I tried :
awk '{$ 1 = $ 1 "_string \ t"} 1' file.gff3> outfile.gff3
but resolves only to separate the first and second columns, as expected
Any suggestion? obs: I know I need to do these commands only for lines that don't start #, I will probably use python for this.
Have you tried using
'{OFS="\t"}'
option in awk ??