Hello, everybody,
I would like to run the following python script, but it gives me back error report.
from Bio import SeqIO
out=open("try_out.fasta","w")
for seq_record in SeqIO.parse ("try.fasta","fasta"):
a=seq_record.seq
a=a[5:-6]
id=seq_record.id
out.write(id,a,"fasta")
out.close()
File "try", line 7, in <module>
out.write(id,a,"fasta")
TypeError: function takes exactly 1 argument (3 given)
Could anyone help me about it? I think there might be something wrong with the output file, but I cannot find the solution.
Thanks!
All the best,
Sadiexiaoyu
I would like to run the following python script, but it gives me back error report.
from Bio import SeqIO
out=open("try_out.fasta","w")
for seq_record in SeqIO.parse ("try.fasta","fasta"):
a=seq_record.seq
a=a[5:-6]
id=seq_record.id
out.write(id,a,"fasta")
out.close()
File "try", line 7, in <module>
out.write(id,a,"fasta")
TypeError: function takes exactly 1 argument (3 given)
Could anyone help me about it? I think there might be something wrong with the output file, but I cannot find the solution.
Thanks!
All the best,
Sadiexiaoyu
Comment