Entering edit mode
2.1 years ago
Ap1438
▴
50
I have 3 files,
- a gbff3 file (Main file) with some accessions wrong
- a text file with list of wrong accessions
- a text file with list of write accessions to be replaced in place of wrong once in File 1
I tried it with while loop but couldn't declare 3 variables.
I was trying like this
While read line
do
sed 's/$file2/$file3/g' File1
done > output
But it didn't work .
Can you please let me know why it didn't work. And if not this then what will work.
If I understand, it hould be something like
and then :
BUT that's not that simple and it's dangerous. 1) if you have any '/' in your file 2) if you have identifiers like GENE111111 and GENE1 -> they both share the same prefix and could be both replaced.