Say I have a fasta containing 3 sequences...
ATTTTTGGA
AT
A
I want my sequence data to look like this:
ATTTTTGGA
ATTNNNNNN
ANNNNNNNN
Are there any programs or scripts that could accomplish this in a reasonable timeframe. I have thousands of sequences. Thanks!
I'm messing around and tried this, the file ended up blank but this is as far as I have gotten.
import sys
from Bio import SeqIO
from Bio.Seq import Seq
in_file = open(sys.argv[1],'r')
sequences = SeqIO.parse(in_file, "fasta")
output_in_file = open("test.fasta", "w")
for record in sequences:
n = 150
record.seq = record.seq + ("N" * n)
seq = seq[:n]
output_in_file.close()
in_file.close()