Incompatibility between BioPython SeqIO module and pymol?
0
0
Entering edit mode
9.6 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.

python pymol BioPython • 2.7k views
ADD COMMENT
0
Entering edit mode

Are there any errors in a log file? You have at least one mistake which will break your script, seq_record_seq should probably be seq_record.seq

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 4031 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6