2 Feb 2005 17:30
[BioPython] using NeighborSearch
Minami Mo <minami.mo <at> gmail.com>
2005-02-02 16:30:00 GMT
2005-02-02 16:30:00 GMT
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)
> 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,
RSS Feed