View Single Post
Old 01-24-2017, 10:05 PM   #1
sadiexiaoyu
Member
 
Location: Switzerland

Join Date: Apr 2013
Posts: 55
Default help about the following python script

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
sadiexiaoyu is offline   Reply With Quote