Minami Mo | 2 Feb 2005 17:30
Picon

[BioPython] using NeighborSearch

Hi,

I am a new user to Biopython. I have to use the NeighborSearch
function to find out the contacting atoms within certain distance.
However, it returns error immediately when i instantiates the class
NeighborSearch. below is a fragment of the code:

s=p.get_structure('1i4f','1I4F.pdb')
atom_list=Selection.unfold_entities(s,'A')
ns=NeighborSearch(atom_list)  // error returns here
center=atom.get_coord()
R=5.0
neighbor_l=ns.search(center,R)
residue_list=Selection.unfold_entities(neighbor_l,'R')

/// ------------ error message

Traceback (most recent call last):
  File "run.py", line 21, in ?
    ns=NeighborSearch(atom_list)
  File "/ZB/IMPRS/siu/Linux/lib/python2.3/site-packages/Bio/PDB/NeighborSearch.py",
line 40, in __init__
    self.kdt.set_coords(self.coords)
  File "/ZB/IMPRS/siu/Linux/lib/python2.3/site-packages/Bio/KDTree/KDTree.py",
line 141, in set_coords
    self.kdt.set_data(coords, coords.shape[0])
  File "/ZB/IMPRS/siu/Linux/lib/python2.3/site-packages/Bio/KDTree/CKDTree.py",
line 42, in set_data
    def set_data(*args): return apply(_CKDTree.KDTree_set_data,args)
SystemError: NULL result without error in PyObject_Call
(Continue reading)

Thomas Hamelryck | 2 Feb 2005 18:02
Picon
Favicon

Re: [BioPython] using NeighborSearch

On Wednesday 02 February 2005 17:30, Minami Mo wrote:
> Hi,
>
> I am a new user to Biopython. I have to use the NeighborSearch
> function to find out the contacting atoms within certain distance.
> However, it returns error immediately when i instantiates the class
> NeighborSearch. below is a fragment of the code:

The following code works for me:

----
from Bio.PDB import *
import sys

p=PDBParser()
s=p.get_structure('X', sys.argv[1])
atom_list=Selection.unfold_entities(s,'A')
ns=NeighborSearch(atom_list)
center=atom_list[0].get_coord()
R=5.0
neighbor_l=ns.search(center,R)
residue_list=Selection.unfold_entities(neighbor_l,'R')

print residue_list
----

Maybe the PDB file is corrupt? In any case, I'll look into it
later (I'm a bit busy this week)....

Cheers,
(Continue reading)

Picon

Re: [BioPython] Patch to fix testing failures in biopython-1.30

Thanks for your patch, Bill. The failed test_SVDSuperimposer may be due 
to an incorrect compilation of the Lapack libraries on your computer. 
For example, the default compilation of numerical python on Cygwin and 
possibly Linux results in a broken Lapack, in which some linear algebra 
functions hang forever. The SVD code in Biopython uses these functions, 
so that may be the reason that the test didn't finish. You can try this 
with:

 >>> from Numeric import *
 >>> from LinearAlgebra import eigenvalues
 >>> x = array([[1,2],[3,4]])
 >>> eigenvalues(x)

If eigenvalues doesn't return, Lapack is broken. I submitted a patch for 
this bug to Numerical Python and numarray a while ago, but they have not 
(yet) been included.

--Michiel.

Bill Barnard wrote:
> I installed the release version of biopython, v1.30, a couple days ago.
> I was familiarizing myself with the code by running the test suites and
> noted a few small difficulties. I am attaching a patch which fixes one
> problem, and permits the test suite to run to completion without errors
> by stubbing out the implementation for one new feature, and moving a
> broken test to a Tests/broken directory.
> 
> The fixed problem is in Bio/dbdefs/pdb.py - the location of the cgi has
> changed, and there appears to be an extraneous newline in the returned
> text.
(Continue reading)

Arnaout, Ramy | 5 Feb 2005 19:13
Picon

[BioPython] Installation problem---c++ os x


I'm having a problem installing biopython (see excerpt below). I am 
definitely no expert, but I have troubleshot installation problems with 
other packages; however, here, I can't figure out what's resulting in 
the error.

When I run what appears to be the offending command

c++ -L/sw/lib -bundle -flat_namespace -undefined suppress 
build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/KDTree.o 
build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/KDTree.swig.o 
-lstdc++ -o 
build/lib.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/_CKDTree.so

at the prompt it returns the same "multiple definitions" flags, but 
exits without error. I have searched online without success. Does 
anybody have any ideas?

I am using python2.3 on a Mac G4 running OS 10.3.7. I have the numpy 
and numeric modules installed, as well as pygsl. I installed the egenix 
and reportlab modules with no problems.

Thanks,

R

—————————————
Ramy Arnaout, MD, DPhil
Department of Pathology
Brigham and Women's Hospital
(Continue reading)

Picon

Re: [BioPython] Installation problem---c++ os x

Several people have run into C++ compilation errors when installing 
Biopython. The good news is that there are currently only two 
C++-dependent packages in Biopython (Bio.KDTree and Bio.Affy), and 
neither of them are essential to the rest of biopython. So if you don't 
plan on using Bio.KDTree or Bio.Affy, the simplest way may be to edit 
setup.py and remove those two packages.

In future versions of Biopython, compilation of Bio.KDTree will be 
switched off by default. For Bio.Affy, I am working with Harry Zuzan to 
replace the C++-dependent parts of Bio.Affy by pure python code. 
Hopefully, that will be done by the time Biopython 1.31 will come out 
later this month.

--Michiel.

Arnaout, Ramy wrote:
> I'm having a problem installing biopython (see excerpt below). I am 
> definitely no expert, but I have troubleshot installation problems with 
> other packages; however, here, I can't figure out what's resulting in 
> the error.
> 
> When I run what appears to be the offending command
> 
> c++ -L/sw/lib -bundle -flat_namespace -undefined suppress 
> build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/KDTree.o 
> build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/KDTree.swig.o 
> -lstdc++ -o 
> build/lib.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/_CKDTree.so
> 
> at the prompt it returns the same "multiple definitions" flags, but 
(Continue reading)

Sameet | 7 Feb 2005 10:29
Picon

[BioPython] Help about CodonUsageIndex

Hi all,
I came across the module in SeqUtils about the codon Usage Index, but the help 
is not easity understandable to me.  Can some guide through the usage of the 
module, something like a small tutorial?

thanks in advance
Sameet
--

-- 
__________________________________________________
Sameet Mehta,
Senior Research Fellow (CSIR)
Lab 3,
National Centre for Cell Science,
Pune 411007

Phone: +91 20 25690922 ext 210, 209
Fax: +91 20 25692259
_______________________________________________
BioPython mailing list  -  BioPython <at> biopython.org
http://biopython.org/mailman/listinfo/biopython

Yu Huang | 5 Feb 2005 20:19
Picon
Favicon

[BioPython] missing databases in Config.py of EUtils

Hi

File location: Bio/EUtils/Config.py. It misses some databases offered by 
NCBI.
I used two databases, unigene and gene. So I added them to the file.
 > '''
 > Added by yh
 > '''
 > databases.UNIGENE = _add_db(DatabaseInfo("unigene", 1))
 > databases.GENE = _add_db(DatabaseInfo("gene", 1))

It's great that biopython now has the debian package!
Yu
Attachment (Config.py): text/x-python, 2453 bytes
_______________________________________________
BioPython mailing list  -  BioPython <at> biopython.org
http://biopython.org/mailman/listinfo/biopython
Edoardo Saccenti | 9 Feb 2005 16:48
Picon

[BioPython] writing down a string in fasta format

Dear all,
I'hava a string of length L>>60 and I want write it down in Fasta format
I try to use FASTA.FastaWriter from BioSeq.IO but it does accept accept a 
string as input.

Any Idea??

thanks
Edoardo
--  
"Raffiniert ist der Herr Gott,
 aber boshaft ist Er nicht."

---
Dr. Edoardo Saccenti
FiorGen Pharmacogenomics Foundation
CERM Nuclear Magnetic Resonace Research Center
Scientific Pole - University of Florence
Via Luigi Sacconi n° 6
50019 Sesto Fiorentino (FI)
tel: +39 055 4574193
fax: +39 055 4574253
saccenti <at> cerm.unifi.it
www.cerm.unifi.it

_______________________________________________
BioPython mailing list  -  BioPython <at> biopython.org
http://biopython.org/mailman/listinfo/biopython

(Continue reading)

Jonathan Taylor | 10 Feb 2005 17:04
Picon
Picon
Favicon

Re: [BioPython] writing down a string in fasta format

I believe you need to use Bio.SeqRecord as the input.  There really 
should be some docstrings in Bio.SeqIO.FASTA.FastaWriter though.

Cheers.
Jon.

Edoardo Saccenti wrote:
> Dear all,
> I'hava a string of length L>>60 and I want write it down in Fasta format
> I try to use FASTA.FastaWriter from BioSeq.IO but it does accept accept a 
> string as input.
> 
> Any Idea??
> 
> thanks
> Edoardo
> --  
> "Raffiniert ist der Herr Gott,
>  aber boshaft ist Er nicht."
> 
> ---
> Dr. Edoardo Saccenti
> FiorGen Pharmacogenomics Foundation
> CERM Nuclear Magnetic Resonace Research Center
> Scientific Pole - University of Florence
> Via Luigi Sacconi n° 6
> 50019 Sesto Fiorentino (FI)
> tel: +39 055 4574193
> fax: +39 055 4574253
> saccenti <at> cerm.unifi.it
(Continue reading)

Edoardo Saccenti | 10 Feb 2005 17:42
Picon

Re: [BioPython] writing down a string in fasta format

On Thursday 10 February 2005 17:04, Jonathan Taylor wrote:

I just fixed the problem:

seq ='ADQQRRRTTWREVBBJFODLOSKSSN.........'
width = 60
for p in xrange(0, len(seq), width):
    file.writelines("%s" % seq[p:p+width]+'\n')
file.close

just a look on the web..... :-)

> I believe you need to use Bio.SeqRecord as the input.  There really
> should be some docstrings in Bio.SeqIO.FASTA.FastaWriter though.
>
> Cheers.
> Jon.
>
> Edoardo Saccenti wrote:
> > Dear all,
> > I'hava a string of length L>>60 and I want write it down in Fasta format
> > I try to use FASTA.FastaWriter from BioSeq.IO but it does accept accept a
> > string as input.
> >
> > Any Idea??
> >
> > thanks
> > Edoardo
> > --
> > "Raffiniert ist der Herr Gott,
(Continue reading)


Gmane