I am trying to replace the sequences from file_1.fasta with specific sequences from file_2.fasta. The files are set up this way:
head -2 file_1.fasta >Scaffolds_1 TAAATCAAATTGGACAGTCAATGCTATTATGTCTCAATCTACAACACATAATACACAATT CCAAACCACCTTCTTGGAATATCCACATTTTCTTTATTGGAAGAGAAATTAGTTTAACAA TGACCACTCTTTTTCTCACTAATGTTACAACCACCTAGAAACTGAATTTCAAGCCTATAC head -6 file_2.fasta >Scaffolds_1:327519-327900 AAATCAAATTGGACAGTCAATGCTATTATGTCTCAATCTACAACACATAAT >Scaffolds_1:344277-344478 ACCTTTGAAACTTTGACTCTAACTCAGCTTGAATATTGGAAGTTAGGGGT >Scaffolds_1:345134-345287 CCTTCTCTGCTAGAACACGTAGGGCCACTTCAGTAGATTCGCCAATCTTT
I have tried to set up a script to replace the sequences at the right coordinates, but got a bit confused with the sed script.
Would anybody know if there is simple tool (Samtools, Biopython) designed to make this kind of replacement?