Entering edit mode
10.2 years ago
lqdo2000
▴
20
Hi,
I am trying to generate .pdb files from fasta sequences using BioPython SeqIO module to parse them to Pymol, and fab command:
from Bio import SeqIO
for seq_record in SeqIO.parse(file, "fasta"):
pymol.cmd.do("fab %s, %s" % (seq_record.seq, seq_record.id))
pymol.cmd.save("%s.pdb" % seq_record.id, "all")
The script produces the files without displaying any errors, but they are either empty or the sequence is incomplete.
Does someone already encounter this problem? Is something wrong with my script?
Thanks !
Note: the exact same happens if I include a handle for the SeqIO module.
Are there any errors in a log file? You have at least one mistake which will break your script,
seq_record_seq
should probably beseq_record.seq
Sorry, for
seq_record_seq
it was a typo (corrected).The stout doesn't return any error (same when I use the other syntax:
pymol.cmd.do("save %s.pdb, all" % seq_record.id))
.But when I use this syntax, it returns that the number of selected atoms is either "0" or lower then the total sequence.