Question: Incompatibility between BioPython SeqIO module and pymol?
0
gravatar for lqdo2000
6.1 years ago by
lqdo200020
Australia
lqdo200020 wrote:

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.

biopython pymol python • 2.0k views
ADD COMMENTlink modified 5.9 years ago by Biostar ♦♦ 20 • written 6.1 years ago by lqdo200020

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 REPLYlink modified 6.1 years ago • written 6.1 years ago by Peter5.8k

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 REPLYlink modified 6.1 years ago • written 6.1 years ago by lqdo200020
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1629 users visited in the last hour