update fasta header and gff3 file

0

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.


fasta


gff


awk


header


python

• 42 views



Source link