Entering edit mode
3.0 years ago
Adnan
•
0
Dear community,
Hope you are doing great. As asked in title, please guide if there is any way to fill or replace N or N's in fasta file with the help of reference file.
For example
INPUT
Fasta with Ns
>fasta1
ACTGGCATCATGNNNNACTTTTGACC
Reference Fasta
>reference
ACTGGCATCATGTCAGACTTTTGACC
OUTPUT
>fasta1
ACTGGCATCATG**TCAG**ACTTTTGACC
I will really appreciate any help in this regard
Kind regards Ad
you have to explain how your problem is different from
cp ref.fa user.fa
It is different in a way that it is exactly/completely copying the complete ref.fa into user.fa. However, what I want is manipulation at "N" regions only. For example: my ref file =ACTGGCATCATGTTTTACTTTTGACC and user file is=ACTGGCATCATGNNNNACTTTTGACC. So i want only Ns to be replaced by TTTT [as specified in reference] and not change any other characters. Hope it answers your query
Is the each entry in the "Fasta with Ns" always going to be exactly the same length as the equivalent entry in the "reference fasta"?.
Yes, its the same. coordinates wise. However the length of Ns might be different across the complete FASTA
cross posted: https://stackoverflow.com/questions/70135133/