[Biopython] Biopython Digest, Vol 79, Issue 15
chen Ku
biopython.chen at gmail.com
Thu Jul 23 22:28:21 EDT 2009
Hi
I got successed in downloading all the pdb file
> by biopython module. But now I want to fectch an output file where my
> keyword word is ('carbonic andydrade')
> second criteria is >=2 chains
> third criteria is homology =30%
>
> Can you please write me few lines of codes to do it as I have some problem
> in doing this.Please suggest me step by step if possible as I am
struggling
> for few days in this .
>
> I will be waiting for your kind help.
>regards
chen
On Tue, Jul 21, 2009 at 9:00 AM, <biopython-request at lists.open-bio.org>wrote:
> Send Biopython mailing list submissions to
> biopython at lists.open-bio.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.open-bio.org/mailman/listinfo/biopython
> or, via email, send a message with subject or body 'help' to
> biopython-request at lists.open-bio.org
>
> You can reach the person managing the list at
> biopython-owner at lists.open-bio.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Biopython digest..."
>
>
> Today's Topics:
>
> 1. Writing into a PDB file using PDBIO module (life happy)
> 2. Re: Writing into a PDB file using PDBIO module (Peter)
> 3. Re: Writing into a PDB file using PDBIO module (Peter)
> 4. Re: Writing into a PDB file using PDBIO module (Peter)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 20 Jul 2009 14:08:21 -0700
> From: life happy <iitlife2008 at gmail.com>
> Subject: [Biopython] Writing into a PDB file using PDBIO module
> To: biopython at lists.open-bio.org
> Message-ID:
> <46a813870907201408j5d72e25eg9fffcf61331e4aaa at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi there,
>
> I am new to Biopython and have been working for a couple of weeks on
> Bio.PDB
> module.I would appreciate any clue or help in the following matter.
>
> I have some short ,closely related peptide sequences.I want to align these
> short peptides and send the aligned structures into a new PDB file.I used
> set_atoms class in Superimposer module to align the short peptides. I tried
> using PDBIO module, and send the aligned structures into a new PDB file.
> But
> when I see the output PDB file, I get the whole proteins not the short
> peptides. I like to have output PDB file with all the short peptides
> aligned
> to any particular short peptide.
>
>
> #This is the part of my code. B is list of atoms of peptides. C is a list
> with PDB ids of each peptide.
>
> from Bio.PDB.Superimposer import Superimposer
> fixed = B[0:1*(stop-start+1)]
> sup = Superimposer()
> for i in range(1,5) :
> moving = B[i*(stop-start+1):(i+1)*(stop-start+1)]
> sup.set_atoms(fixed, moving)
> print "RMS(%s file %s chain, %s file %s model) = %0.2f" %
>
> (C[0][0].split("'")[1],C[0][2].split("'")[1],C[i][0].split("'")[1],C[i][2].split("'")[1],
> sup.rms)
> print "Saving %s aligned structure as PDB file %s" %
> (C[0][2].split("'")[1], pdb_out_filename)
> io=Bio.PDB.PDBIO()
> io.set_structure(structure)
> io.save(pdb_out_filename)
>
> thanks in advance!!
>
> cheers,
> Kumar.
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 20 Jul 2009 22:14:50 +0100
> From: Peter <biopython at maubp.freeserve.co.uk>
> Subject: Re: [Biopython] Writing into a PDB file using PDBIO module
> To: life happy <iitlife2008 at gmail.com>
> Cc: biopython at lists.open-bio.org
> Message-ID:
> <320fb6e00907201414j549e0eefyc556157cf432b327 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Mon, Jul 20, 2009 at 10:08 PM, life happy<iitlife2008 at gmail.com> wrote:
> > Hi there,
> >
> > I am new to Biopython and have been working for a couple of weeks on
> Bio.PDB
> > module.I would appreciate any clue or help in the following matter.
> >
> > I have some short ,closely related peptide sequences.I want to align
> these
> > short peptides and send the aligned structures into a new PDB file.I used
> > set_atoms class in Superimposer module to align the short peptides. I
> tried
> > using PDBIO module, and send the aligned structures into a new PDB file.
> But
> > when I see the output PDB file, I get the whole proteins not the short
> > peptides. I like to have output PDB file with all the short peptides
> aligned
> > to any particular short peptide.
> >
> >
> > #This is the part of my code. B is list of atoms of peptides. C is a list
> > with PDB ids of each peptide.
> >
> > from Bio.PDB.Superimposer import Superimposer
> > fixed = B[0:1*(stop-start+1)]
> > sup = Superimposer()
> > for i in range(1,5) :
> > moving = B[i*(stop-start+1):(i+1)*(stop-start+1)]
> > sup.set_atoms(fixed, moving)
> > print "RMS(%s file %s chain, %s file %s model) = %0.2f" %
> >
> (C[0][0].split("'")[1],C[0][2].split("'")[1],C[i][0].split("'")[1],C[i][2].split("'")[1],
> > sup.rms)
> > print "Saving %s aligned structure as PDB file %s" %
> > (C[0][2].split("'")[1], pdb_out_filename)
> > io=Bio.PDB.PDBIO()
> > io.set_structure(structure)
> > io.save(pdb_out_filename)
> >
> > thanks in advance!!
>
> Your example never defines the "structure" variable. I guess it should
> be pointing at something in the "C" data structure...
>
> Peter
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 20 Jul 2009 23:15:54 +0100
> From: Peter <biopython at maubp.freeserve.co.uk>
> Subject: Re: [Biopython] Writing into a PDB file using PDBIO module
> To: life happy <iitlife2008 at gmail.com>
> Cc: biopython at biopython.org
> Message-ID:
> <320fb6e00907201515o517c885ahb2c396efc4281f73 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Mon, Jul 20, 2009 at 10:36 PM, life happy<iitlife2008 at gmail.com> wrote:
> > No..this is only a piece of code. The structure object 'structure' was
> > already created.
>
> You example never seems to appy the transformation. Have you read this?
> http://www.warwick.ac.uk/go/peter_cock/python/protein_superposition/
>
> It is a worked example using Bio.PDB's Superimposer, and it saves the
> output.
>
> Peter
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 21 Jul 2009 10:13:13 +0100
> From: Peter <biopython at maubp.freeserve.co.uk>
> Subject: Re: [Biopython] Writing into a PDB file using PDBIO module
> To: life happy <iitlife2008 at gmail.com>
> Cc: Biopython Mailing List <biopython at lists.open-bio.org>
> Message-ID:
> <320fb6e00907210213p5df40d5dl583a962069ed1867 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Please keep the mailing list CC'd.
>
> On Mon, Jul 20, 2009 at 11:59 PM, life happy<iitlife2008 at gmail.com> wrote:
> > Yes! I have read this.
>
> I'm glad you found that page (something I'd like to integrate into the
> main Biopython Tutorial at some point):
> http://www.warwick.ac.uk/go/peter_cock/python/protein_superposition/
>
> > Which step applies the transformation?Isn't that
> > set_atoms function? I am able to print RMS value. I did not follow the
> > superimpose.apply(alt_model.get_atoms()) .
>
> As the name should suggest, superimpose.apply(...) actually applies the
> transformation. This is what you are missing. The set_atoms(...) just tells
> the code which atoms are going to be superimposed.
>
> > According to description in BioPDB faq pdf and
> >
> http://www.biopython.org/DIST/docs/api/Bio.PDB.Superimposer%27.Superimposer-class.html
> > set_atom does the transformation, right? If I am wrong, please correct
> me!
>
> That docstring is rather confusing, we should fix that.
>
> > Also,In which step are we sending the transformed co-ordinates into
> > the PDB file?
>
> These lines write out the PDB file for the whole structure:
>
> io=Bio.PDB.PDBIO()
> io.set_structure(structure)
> io.save(pdb_out_filename)
>
> > Also, the output PDB file has whole protein, I only want the short
> peptides
> > aligned(only the atom lists that I gave as input must be aligned, not the
> > whole protein of peptides).
>
> If you only want some of the protein written, then you should only give
> some of the structure to the PDB output code.
>
> Peter
>
>
> ------------------------------
>
> _______________________________________________
> Biopython mailing list - Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>
>
> End of Biopython Digest, Vol 79, Issue 15
> *****************************************
>
More information about the Biopython
mailing list