From minami.mo at gmail.com Wed Feb 2 11:30:00 2005 From: minami.mo at gmail.com (Minami Mo) Date: Wed Feb 2 11:25:50 2005 Subject: [BioPython] using NeighborSearch Message-ID: 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 Does anyone have any idea about this? Thanks! Minami From thamelry at binf.ku.dk Wed Feb 2 12:02:35 2005 From: thamelry at binf.ku.dk (Thomas Hamelryck) Date: Thu Feb 3 08:20:55 2005 Subject: [BioPython] using NeighborSearch In-Reply-To: References: Message-ID: <200502021802.35318.thamelry@binf.ku.dk> 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, -Thomas From mdehoon at ims.u-tokyo.ac.jp Thu Feb 3 10:04:46 2005 From: mdehoon at ims.u-tokyo.ac.jp (Michiel Jan Laurens de Hoon) Date: Thu Feb 3 10:00:29 2005 Subject: [BioPython] Patch to fix testing failures in biopython-1.30 In-Reply-To: <1106768301.32684.52.camel@tioga.barnard-engineering.com> References: <1106768301.32684.52.camel@tioga.barnard-engineering.com> Message-ID: <42023D8E.8060104@ims.u-tokyo.ac.jp> 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. > > The stubbed implementation is in Bio/EUtils/parse.py - a new > GROUP element has appeared in the retrieved output that breaks > the test. I did not attempt to fix this, but added code as per > http://portal.open-bio.org/pipermail/biopython/2004-November/002473.html > to "cover it up" leaving a placeholder comment. > > Finally, the Tests/test_SVDSuperimposer.py test does not appear to run > correctly. The function itself appears to be broken, as it runs for > upwards of two hours on my machine (1.8 GHz Athlon XP 2500+) with no > output. I moved the test to a new Tests/broken directory. > > The patch is meant to be applied to a complete untarred biopython > directory. If you've untarred it to /usr/local/src/biopython-1.30 you > can run the patch from /usr/local/src by: > > patch -p0 < biopython-1.30-test_Registry-fix.patch > > I've attached the patch to this email. Use as you see fit. I'll be happy > to upload it to Bugzilla if this would be the appropriate way for me to > help out. It would also be simple to break the patch into pieces if that > is more appropriate. > From ramy_arnaout at student.hms.harvard.edu Sat Feb 5 13:13:29 2005 From: ramy_arnaout at student.hms.harvard.edu (Arnaout, Ramy ) Date: Sat Feb 5 13:10:20 2005 Subject: [BioPython] Installation problem---c++ os x Message-ID: <93E99C90875E8847B0B810932FE46C705DEDD9@MAILSERVER02.MED.HARVARD.EDU> 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 Harvard Medical School ramy$ python2.3 setup.py install running install running build running build_py running build_ext building 'Bio.KDTree._CKDTree' extension creating build/temp.darwin-7.7.0-PowerMacintosh-2.3 creating build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio creating build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree c++ -I/sw/include/python2.3 -c Bio/KDTree/KDTree.cpp -o build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/KDTree.o c++ -I/sw/include/python2.3 -c Bio/KDTree/KDTree.swig.cpp -o build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/KDTree.swig.o In file included from /sw/include/python2.3/Python.h:70, from Bio/KDTree/KDTree.swig.cpp:26: /sw/include/python2.3/objimpl.h:255: warning: use of `long double' type; its size may change in a future release /sw/include/python2.3/objimpl.h:255: warning: (Long double usage is reported only once for each file. /sw/include/python2.3/objimpl.h:255: warning: To disable this warning, use -Wno-long-double.) 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 ld: multiple definitions of symbol __Unwind_SetIP /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_SetIP in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_SetIP ld: multiple definitions of symbol ___frame_state_for /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of ___frame_state_for in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of ___frame_state_for ld: multiple definitions of symbol __Unwind_RaiseException /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_RaiseException in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_RaiseException ld: multiple definitions of symbol __Unwind_DeleteException /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_DeleteException in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_DeleteException ld: multiple definitions of symbol __Unwind_FindEnclosingFunction /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_FindEnclosingFunction in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_FindEnclosingFunction ld: multiple definitions of symbol __Unwind_ForcedUnwind /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_ForcedUnwind in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_ForcedUnwind ld: multiple definitions of symbol __Unwind_GetDataRelBase /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_GetDataRelBase in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_GetDataRelBase ld: multiple definitions of symbol __Unwind_GetGR /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_GetGR in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_GetGR ld: multiple definitions of symbol __Unwind_GetIP /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_GetIP in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_GetIP ld: multiple definitions of symbol __Unwind_GetLanguageSpecificData /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_GetLanguageSpecificData in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_GetLanguageSpecificData ld: multiple definitions of symbol __Unwind_GetRegionStart /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_GetRegionStart in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_GetRegionStart ld: multiple definitions of symbol __Unwind_GetTextRelBase /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_GetTextRelBase in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_GetTextRelBase ld: multiple definitions of symbol __Unwind_Resume /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_Resume in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_Resume ld: multiple definitions of symbol __Unwind_SetGR /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external definition of __Unwind_SetGR in section (__TEXT,__text) /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of __Unwind_SetGR error: command 'c++' failed with exit status 1 ramy$ From mdehoon at ims.u-tokyo.ac.jp Sun Feb 6 02:04:01 2005 From: mdehoon at ims.u-tokyo.ac.jp (Michiel Jan Laurens de Hoon) Date: Sun Feb 6 01:59:47 2005 Subject: [BioPython] Installation problem---c++ os x In-Reply-To: <93E99C90875E8847B0B810932FE46C705DEDD9@MAILSERVER02.MED.HARVARD.EDU> References: <93E99C90875E8847B0B810932FE46C705DEDD9@MAILSERVER02.MED.HARVARD.EDU> Message-ID: <4205C161.5030704@ims.u-tokyo.ac.jp> 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 > 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 > Harvard Medical School > > ramy$ python2.3 setup.py install > running install > running build > running build_py > running build_ext > building 'Bio.KDTree._CKDTree' extension > creating build/temp.darwin-7.7.0-PowerMacintosh-2.3 > creating build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio > creating build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree > c++ -I/sw/include/python2.3 -c Bio/KDTree/KDTree.cpp -o > build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/KDTree.o > c++ -I/sw/include/python2.3 -c Bio/KDTree/KDTree.swig.cpp -o > build/temp.darwin-7.7.0-PowerMacintosh-2.3/Bio/KDTree/KDTree.swig.o > In file included from /sw/include/python2.3/Python.h:70, > from Bio/KDTree/KDTree.swig.cpp:26: > /sw/include/python2.3/objimpl.h:255: warning: use of `long double' > type; its > size may change in a future release > /sw/include/python2.3/objimpl.h:255: warning: (Long double usage is > reported > only once for each file. > /sw/include/python2.3/objimpl.h:255: warning: To disable this warning, > use > -Wno-long-double.) > 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 > ld: multiple definitions of symbol __Unwind_SetIP > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_SetIP in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_SetIP > ld: multiple definitions of symbol ___frame_state_for > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of ___frame_state_for in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > ___frame_state_for > ld: multiple definitions of symbol __Unwind_RaiseException > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_RaiseException in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_RaiseException > ld: multiple definitions of symbol __Unwind_DeleteException > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_DeleteException in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_DeleteException > ld: multiple definitions of symbol __Unwind_FindEnclosingFunction > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_FindEnclosingFunction in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_FindEnclosingFunction > ld: multiple definitions of symbol __Unwind_ForcedUnwind > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_ForcedUnwind in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_ForcedUnwind > ld: multiple definitions of symbol __Unwind_GetDataRelBase > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_GetDataRelBase in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_GetDataRelBase > ld: multiple definitions of symbol __Unwind_GetGR > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_GetGR in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_GetGR > ld: multiple definitions of symbol __Unwind_GetIP > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_GetIP in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_GetIP > ld: multiple definitions of symbol __Unwind_GetLanguageSpecificData > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_GetLanguageSpecificData in section > (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_GetLanguageSpecificData > ld: multiple definitions of symbol __Unwind_GetRegionStart > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_GetRegionStart in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_GetRegionStart > ld: multiple definitions of symbol __Unwind_GetTextRelBase > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_GetTextRelBase in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_GetTextRelBase > ld: multiple definitions of symbol __Unwind_Resume > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_Resume in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_Resume > ld: multiple definitions of symbol __Unwind_SetGR > /usr/lib/gcc/darwin/3.3/libgcc.a(unwind-dw2.o) private external > definition of __Unwind_SetGR in section (__TEXT,__text) > /usr/local/lib/libgcc_s.1.0.dylib(unwind-dw2.o) definition of > __Unwind_SetGR > error: command 'c++' failed with exit status 1 > ramy$ > > > _______________________________________________ > BioPython mailing list - BioPython@biopython.org > http://biopython.org/mailman/listinfo/biopython > > From msameet at gmail.com Mon Feb 7 04:29:25 2005 From: msameet at gmail.com (Sameet) Date: Mon Feb 7 04:11:31 2005 Subject: [BioPython] Help about CodonUsageIndex Message-ID: <200502071459.25129.sameet@nccs.res.in> 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 From yuhuang at usc.edu Sat Feb 5 14:19:53 2005 From: yuhuang at usc.edu (Yu Huang) Date: Mon Feb 7 21:43:06 2005 Subject: [BioPython] missing databases in Config.py of EUtils In-Reply-To: <200502051812.j15ICqKr031404@portal.open-bio.org> References: <200502051812.j15ICqKr031404@portal.open-bio.org> Message-ID: <42051C59.8020703@usc.edu> 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: Config.py Type: text/x-python Size: 2453 bytes Desc: not available Url : http://portal.open-bio.org/pipermail/biopython/attachments/20050205/3bafb408/Config.py From saccenti at cerm.unifi.it Wed Feb 9 10:48:43 2005 From: saccenti at cerm.unifi.it (Edoardo Saccenti) Date: Wed Feb 9 10:44:13 2005 Subject: [BioPython] writing down a string in fasta format Message-ID: <200502091648.43264.saccenti@cerm.unifi.it> 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@cerm.unifi.it www.cerm.unifi.it From jonathan.taylor at utoronto.ca Thu Feb 10 11:04:21 2005 From: jonathan.taylor at utoronto.ca (Jonathan Taylor) Date: Thu Feb 10 11:08:28 2005 Subject: [BioPython] writing down a string in fasta format In-Reply-To: <200502091648.43264.saccenti@cerm.unifi.it> References: <200502091648.43264.saccenti@cerm.unifi.it> Message-ID: <420B8605.7040802@utoronto.ca> 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@cerm.unifi.it > www.cerm.unifi.it > > _______________________________________________ > BioPython mailing list - BioPython@biopython.org > http://biopython.org/mailman/listinfo/biopython > From saccenti at cerm.unifi.it Thu Feb 10 11:42:04 2005 From: saccenti at cerm.unifi.it (Edoardo Saccenti) Date: Thu Feb 10 11:37:30 2005 Subject: [BioPython] writing down a string in fasta format In-Reply-To: <420B8605.7040802@utoronto.ca> References: <200502091648.43264.saccenti@cerm.unifi.it> <420B8605.7040802@utoronto.ca> Message-ID: <200502101742.04510.saccenti@cerm.unifi.it> 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, > > 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@cerm.unifi.it > > www.cerm.unifi.it > > > > _______________________________________________ > > BioPython mailing list - BioPython@biopython.org > > http://biopython.org/mailman/listinfo/biopython > > _______________________________________________ > BioPython mailing list - BioPython@biopython.org > http://biopython.org/mailman/listinfo/biopython -- "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@cerm.unifi.it www.cerm.unifi.it From ps_python at yahoo.com Fri Feb 11 13:36:04 2005 From: ps_python at yahoo.com (kumar s) Date: Fri Feb 11 13:31:29 2005 Subject: [BioPython] BLAST Parser hsp.end Message-ID: <20050211183604.19286.qmail@web53710.mail.yahoo.com> Hello all: I am new to BioPython. I want to parse a gene to human genome sequence and after a quick surfing of documentation, I have some basic questions. 1. I took a BLAST output from a local blast. I blaster a cDNA sequence to Human genome - ref_hs_chr11.fa ( Human genome chromosome 11). I parsed the blast output and wanted to print the sbjct Start and Sbjct end. >From the class diagram in the docs. I do not see the hsp.sbjct_end. How can i Print the end of an alignment. 2. Can I BLAST human genome at NCBI by running BLAST over the internet. In the link provided in the documentation, http://www.ncbi.nlm.nih.gov/BLAST/blast_databases.shtml only some databases are there, how do I choose Human genome blast. Eg. from Bio.Blast import NCBIWWW b_results = NCBIWWW.blast('blastn', 'nr', f_record) what should I feed in in the place of nr - for human genome. Any ideas. Thanks K __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail From talla at ibsm.cnrs-mrs.fr Mon Feb 14 08:37:01 2005 From: talla at ibsm.cnrs-mrs.fr (Emmanuel Talla) Date: Mon Feb 14 08:26:56 2005 Subject: [BioPython] Installing Biopython Message-ID: <5.0.2.1.2.20050214143610.00a98a50@ibsm.cnrs-mrs.fr> Dear all, I have tryed to install biopython and dependencies (Numeric and mxText modules), following the installation instructions: ================== 3.1.1 UNIX and Mac OS X systems For UNIX and UNIX-like systems you should download the tar.gz file from the page listed above. At the current time, this is egenix-mx-base-2.0.4.tar.gz. Once you download this, unpack it and change into the created directory: $ gunzip egenix-mx-base-2.0.4.tar.gz $ tar -xvpf egenix-mx-base-2.0.4.tar $ cd egenix-mx-base-2.0.4 To build it, use the standard python build procedure: $ python setup.py build Then become root, and install it, again using the standard python mechanism: # python setup.py install ==================== In the "python setup.py build" step, il have this message: error: Invalid Python installation: Unable to open /usr/lib/python2.3/config/Makefile (no such file or directory) That right, I checked myself and there is no such file related to python on my disk. OS is Mandrake 10.1. Python 2.3 version (obtained from the Mandrake package) Any help would be appreciated Manu From e.teber at mmb.usyd.edu.au Mon Feb 14 03:52:06 2005 From: e.teber at mmb.usyd.edu.au (Erdahl Teber) Date: Mon Feb 14 08:35:43 2005 Subject: [BioPython] PSI-BLAST parsing problem Message-ID: <6.0.3.0.2.20050214191508.00ba37c0@pop.usyd.edu.au> Skipped content of type multipart/alternative-------------- next part -------------- BLASTP 2.0.11 [Jan-20-2000] Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), "Gapped BLAST and PSI-BLAST: a new generation of protein database search programs", Nucleic Acids Res. 25:3389-3402. Query= myTest (5 letters) Database: C:\formatdb\db 3,241,261 sequences; 16,206,305 total letters Score E Sequences producing significant alignments: (bits) Value 1VXG |19 18 380 1VXF |19 18 380 1VXE |19 18 380 1VXD |19 18 380 1UFJA |19 18 380 2MBW |19 18 380 1YOG |19 18 380 1YOI |19 18 380 1YOH |19 18 380 1VXH |19 18 380 1VXC |19 18 380 1UFPA |19 18 380 1TES |20 18 380 1OBM |19 18 380 1N9XA |19 18 380 1N9HA |19 18 380 1N9FA |19 18 380 1MWCA |19 18 380 1LUEA |19 18 380 1JPBA |19 18 380 1F65A |19 18 380 1DXDA |19 18 380 1DO7A |19 18 380 1CO8A |19 18 380 1CH9A |19 18 380 107M |19 18 380 105M |19 18 380 104M |19 18 380 1OFJ |19 18 380 1OFK |19 18 380 1MWDB |19 18 380 1MWDA |19 18 380 1M6MB |19 18 380 1M6MA |19 18 380 1JP8A |19 18 380 1J52A |19 18 380 1O16A |19 18 380 1NAZA |19 18 380 1N9IA |19 18 380 1JW8A |20 18 380 1LTW |19 18 380 1JP6A |19 18 380 1DXCA |19 18 380 1CO9A |19 18 380 1CIOA |19 18 380 1CH1A |19 18 380 103M |19 18 380 101M |19 18 380 1IOP |19 18 380 1HJT |19 18 380 1JDO |19 18 380 1H1XA |19 18 380 1F63A |19 18 380 1CP5A |19 18 380 112M |19 18 380 111M |19 18 380 110M |19 18 380 109M |19 18 380 108M |19 18 380 106M |19 18 380 1DO4A |19 18 380 1DO3A |19 18 380 1DO1A |19 18 380 1CPWA |19 18 380 1CP0A |19 18 380 1CIKA |19 18 380 1CH3A |19 18 380 1CH2A |19 18 380 1ABS |19 18 380 102M |19 18 380 >1VXG |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1VXF |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1VXE |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1VXD |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1UFJA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >2MBW |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1YOG |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1YOI |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1YOH |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1VXH |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1VXC |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1UFPA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1TES |20 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1OBM |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1N9XA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1N9HA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1N9FA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1MWCA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1LUEA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1JPBA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1F65A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1DXDA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1DO7A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CO8A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CH9A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >107M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >105M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >104M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1OFJ |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1OFK |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1MWDB |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1MWDA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1M6MB |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1M6MA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1JP8A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1J52A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1O16A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1NAZA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1N9IA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1JW8A |20 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1LTW |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1JP6A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1DXCA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CO9A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CIOA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CH1A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >103M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >101M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1IOP |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1HJT |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1JDO |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1H1XA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1F63A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CP5A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >112M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >111M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >110M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >109M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >108M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >106M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1DO4A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1DO3A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1DO1A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CPWA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CP0A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CIKA |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CH3A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1CH2A |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >1ABS |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 >102M |19 Length = 5 Score = 18.4 bits (36), Expect = 380 Identities = 5/5 (100%), Positives = 5/5 (100%) Query: 1 VEADV 5 VEADV Sbjct: 1 VEADV 5 Database: C:\formatdb\db Posted date: Feb 14, 2005 2:42 PM Number of letters in database: 16,206,305 Number of sequences in database: 3,241,261 Lambda K H 0.325 0.286 1.44 Lambda K H 0.295 0.120 0.850 Matrix: PAM30 Gap Penalties: Existence: 9, Extension: 1 Number of Hits to DB: 247004 Number of Sequences: 3241261 Number of extensions: 444 Number of successful extensions: 70 Number of sequences better than 1000.0: 70 Number of HSP's better than 1000.0 without gapping: 70 Number of HSP's successfully gapped in prelim test: 0 Number of HSP's that attempted gapping in prelim test: 0 Number of HSP's gapped (non-prelim): 70 length of query: 5 length of database: 16,206,305 effective HSP length: 0 effective length of query: 8 effective length of database: 16,206,305 effective search space: 129650440 effective search space used: 129650440 T: 11 A: 40 X1: 15 ( 7.0 bits) X2: 35 (14.9 bits) X3: 58 (24.7 bits) S1: 33 (17.3 bits) S2: 33 (17.1 bits) -------------- next part -------------- >>> parsed step 1 Traceback (most recent call last): File "C:/BiopythonPrograms/PSIBLAST.py", line 25, in -toplevel- b_record = b_parser.parse(blast_data) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIStandalone.py", line 581, in parse self._scanner.feed(handle, self._consumer) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIStandalone.py", line 96, in feed self._scan_rounds(uhandle, consumer) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIStandalone.py", line 155, in _scan_rounds self._scan_alignments(uhandle, consumer) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIStandalone.py", line 294, in _scan_alignments self._scan_pairwise_alignments(uhandle, consumer) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIStandalone.py", line 304, in _scan_pairwise_alignments self._scan_one_pairwise_alignment(uhandle, consumer) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIStandalone.py", line 309, in _scan_one_pairwise_alignment self._scan_alignment_header(uhandle, consumer) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIStandalone.py", line 339, in _scan_alignment_header read_and_call(uhandle, consumer.noevent, blank=1) File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 300, in read_and_call raise SyntaxError, errmsg SyntaxError: Expected blank line, but got: >>> From talla at ibsm.cnrs-mrs.fr Mon Feb 14 11:44:59 2005 From: talla at ibsm.cnrs-mrs.fr (Emmanuel Talla) Date: Mon Feb 14 11:35:06 2005 Subject: [BioPython] Installing Biopython In-Reply-To: <200502141444.52975.Frederic.Sohm@iaf.cnrs-gif.fr> References: <5.0.2.1.2.20050214143610.00a98a50@ibsm.cnrs-mrs.fr> <5.0.2.1.2.20050214143610.00a98a50@ibsm.cnrs-mrs.fr> Message-ID: <5.0.2.1.2.20050214162630.00a9c790@ibsm.cnrs-mrs.fr> Thanks !!!!! Python-devel was installed and egenix-mx-base as well as Numeric tools 23.4 were installed correctly. Thanks again for your help!!!! Manu A 14:44 14/02/2005 +0100, Frederic Sohm a ?crit : >Hi, > >You certainly do not have installed the python-devel package. >Mandrake keep the python header files in this package. > >Try this before installing : > >$ urpmi python-devel > >This will install the header files needed for the compilation. >Then you can start again the installation has you did before. > >Fred >On Monday 14 February 2005 14:37, Emmanuel Talla wrote: > > Dear all, > > > > I have tryed to install biopython and dependencies (Numeric and mxText > > modules), following the installation instructions: > > > > ================== > > 3.1.1 UNIX and Mac OS X systems > > For UNIX and UNIX-like systems you should download the tar.gz file from the > > page listed above. At the current time, this is > > egenix-mx-base-2.0.4.tar.gz. > > > > Once you download this, unpack it and change into the created directory: > > $ gunzip egenix-mx-base-2.0.4.tar.gz > > $ tar -xvpf egenix-mx-base-2.0.4.tar > > $ cd egenix-mx-base-2.0.4 > > To build it, use the standard python build procedure: > > $ python setup.py build > > Then become root, and install it, again using the standard python > > mechanism: # python setup.py install > > ==================== > > > > In the "python setup.py build" step, il have this message: > > > > error: Invalid Python installation: Unable to open > > /usr/lib/python2.3/config/Makefile (no such file or directory) > > > > > > > > That right, I checked myself and there is no such file related to python on > > my disk. > > OS is Mandrake 10.1. > > Python 2.3 version (obtained from the Mandrake package) > > > > > > Any help would be appreciated > > > > Manu > > _______________________________________________ > > BioPython mailing list - BioPython@biopython.org > > http://biopython.org/mailman/listinfo/biopython > >-- >Fr?d?ric Sohm >Equipe INRA U1126 "Morphogen?se du syst?me nerveux des Chord?s" >UPR 2197 DEPSN, CNRS >Institut de Neurosciences A. Fessard >1 Avenue de la Terrasse >91 198 GIF-SUR-YVETTE >FRANCE >Phone: +33 (0) 1 69 82 34 12 >Fax:+33 (0) 1 69 82 34 47 From ps_python at yahoo.com Mon Feb 14 15:28:01 2005 From: ps_python at yahoo.com (kumar s) Date: Mon Feb 14 15:23:19 2005 Subject: [BioPython] BLAST Parser query In-Reply-To: <5.0.2.1.2.20050214162630.00a9c790@ibsm.cnrs-mrs.fr> Message-ID: <20050214202801.10354.qmail@web53702.mail.yahoo.com> Hi group, I used standalone BLAST to align my sequences to RefSeq database. I followed the sample code given in the cookbook. Here is my code: from string import split from Bio.Blast import NCBIStandalone b_out = open('xxx_blast.out','r') b_parser = NCBIStandalone.BlastParser() b_iterator = NCBIStandalone.Iterator(b_out,b_parser) b_record = b_iterator.next() while 1: b_record = b_iterator.next() if b_record is None: break E_VALUE_THRESH = 0.4 for alignment in b_record.alignments: for que in b_record.query: for hsp in alignment.hsps: if hsp.expect < E_VALUE_THRESH: print '****Alignment****' print 'sequence:', alignment.title print 'length:', alignment.length print 'e value:', hsp.expectprint print alignment.query I want to print my query along with my alignment.title, because I am blasting 1000 sequences against RefSeq and I want to know what the query. After gawking the class diagram for 40 min. I tried this: while 1: b_record = b_iterator.next() if b_record is None: break E_VALUE_THRESH = 0.4 for alignment in b_record.alignments: for que in b_record.query: for hsp in alignment.hsps: if hsp.expect < E_VALUE_THRESH: print '****Alignment****' print 'sequence:', alignment.title print 'length:', alignment.length print 'e value:', hsp.expectprint print b_record.query Considering b_record object will have the query attribute, I incorported in here. It fails. Can any one please help printing the query for each alignment. Thank you K __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail From biopython at maubp.freeserve.co.uk Mon Feb 14 16:22:26 2005 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon Feb 14 16:14:40 2005 Subject: [BioPython] BLAST Parser query In-Reply-To: <20050214202801.10354.qmail@web53702.mail.yahoo.com> References: <20050214202801.10354.qmail@web53702.mail.yahoo.com> Message-ID: <42111692.1060505@maubp.freeserve.co.uk> kumar s wrote: > Hi group, Hello! > I used standalone BLAST to align my sequences to > RefSeq database. > > I followed the sample code given in the cookbook. > > Here is my code: (code removed) I would suggest "while True" rather than "while 1" to take advantage of the definition of these booleans in Python 2.3, but that is a style point. You also call b_iterator.next() twice at the start of the program (once outside the loop, once on the first time through the loop) so you will waste/ignore the first result. i.e. You should comment out the line "b_record = b_iterator.next()" before the while loop. > I want to print my query along with my > alignment.title, because I am blasting 1000 sequences > against RefSeq and I want to know what the query. I assume you are blasting with an input FASTA file with 1000 sequences it it. When you say "query" what do you mean? I can think of three answers: (a) The name of the original query: b_record.query (b) The ENTIRE original query (i.e. a complete sequence of nucleotides or amino acids) is not included in the blast output (look inside your file 'xxx_blast.out'). You will have to use the query name (i.e. b_record.query) to work this out, for example by searching your FASTA input file. (c) The FRAGMENT of the original query (i.e. a sequence of nucleotides or amino acids) that was matched to the Blast database is available, as: hsp.query.replace('-','') Here hsp.query gives the string including gap characters '-' to show how this fragment of the query string aligns with the database match (see also the hsp.match and hsp.sbjct properties). Doing hsp.query.replace('-','') gives the fragment of the query string without the gap characters. e.g. from Bio.Blast import NCBIStandalone b_out = open('xxx_blast.out','r') b_parser = NCBIStandalone.BlastParser() b_iterator = NCBIStandalone.Iterator(b_out,b_parser) #Do use the following line, as you end up calling #next twice and never look at the first result! #b_record = b_iterator.next() #You only need to define the threshold once E_VALUE_THRESH = 0.4 while True: b_record = b_iterator.next() if b_record is None: break print "The following results are for query " + b_record.query for alignment in b_record.alignments: for que in b_record.query: for hsp in alignment.hsps: if hsp.expect < E_VALUE_THRESH: print '****Alignment****' print 'title:', alignment.title print 'length:', alignment.length print 'e value:', hsp.expect print 'fragment of query matched:' print hsp.query.replace('-','') I hope the indentation survives being emailed! Peter From eirik.sonneland at student.umb.no Tue Feb 15 04:47:38 2005 From: eirik.sonneland at student.umb.no (=?ISO-8859-1?Q?Eirik_S=F8nneland?=) Date: Tue Feb 15 04:42:57 2005 Subject: [BioPython] WWW Blast Message-ID: <4211C53A.9030903@student.umb.no> I am new to biopython and trying to implement the BLAST example in the Cookbook(WWW Blast and parsing results). Can't figure out the error message(my code and error message attached). Is there anyone who knows how to solve this/what is wrong in the cookbook? Code: from Bio import Fasta file_for_blast = open('Fastaformat.txt', 'r') f_iterator = Fasta.Iterator(file_for_blast) f_record = f_iterator.next() from Bio.Blast import NCBIWWW b_results = NCBIWWW.blast('blastn', 'nr', f_record) ## save the results for later save_file = open('my_blast.txt', 'w') blast_results =b_results.read() save_file.write(blast_results) save_file.close() import cStringIO string_result_handle = cStringIO.StringIO(blast_results) blast_results = open('my_blast.txt', 'r') b_parser = NCBIWWW.BlastParser() b_record = b_parser.parse(string_result_handle) this gives the error message: Traceback (most recent call last): File "C:\Python24\MyWorkspace.py", line 51, in -toplevel- b_record = b_parser.parse(string_result_handle) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 47, in parse self._scanner.feed(handle, self._consumer) File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 96, in feed has_re=re.compile(r'.?BLAST')) File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 335, in read_and_call_until line = safe_readline(uhandle) File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 411, in safe_readline raise SyntaxError, "Unexpected end of stream." SyntaxError: Unexpected end of stream. Advice will be higly appreciated! Cheers, Eirik From fkauff at duke.edu Wed Feb 16 17:23:32 2005 From: fkauff at duke.edu (Frank Kauff) Date: Wed Feb 16 17:21:34 2005 Subject: [BioPython] Re: [Biopython-dev] [Fwd: Question to code] In-Reply-To: <4213C2E3.8030609@burnham.org> References: <4213C2E3.8030609@burnham.org> Message-ID: <1108592612.5091.32.camel@osiris.biology.duke.edu> Eirik, Try if the code works with b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read() instead of > b_results = NCBIWWW.blast('blastn', 'nr', f_record).read() > I think that issue appeared a couple of months ago on the biopython list, essentially saying that qblast is the blast NCBI wants people to use for blast scripts? After that, qblast method was added to NCBIWWW, and it's what I'm using in my blast scripts. Hope this helps, Frank On Wed, 2005-02-16 at 14:02 -0800, Iddo Friedberg wrote: > OK, this is a real bug. NCBIWWW seems to be broken. > > I'm having a looksee, but I'd like someone more versed in this than me > to do so. > > Thanks, > > Iddo > > > > -------- Original Message -------- > Subject: Question to code > Date: Wed, 16 Feb 2005 15:19:57 +0100 > From: Eirik S?nneland > To: idoerg > > > > Dear Freidberg, > > I've been having problems parsing my output from NCBI using the example > code given in Biopython Cookbook. Therefore I tried to follow your code > described in "Genome Informatics 14(2003). Still I get an error message > connected to the parsing. Could you please give a hint on what is wrong? > Is this a bug?? Code and output as follows: > > Code: > > from Bio.Blast import NCBIWWW > from Bio import Fasta > > file_for_blast = open('Fastaformat.txt', 'r') > f_iterator = Fasta.Iterator(file_for_blast) > f_record = f_iterator.next() > > b_results = NCBIWWW.blast('blastn', 'nr', f_record).read() > > b_record = NCBIWWW.BlastParser().parse_str(b_results) > > Output(Have cut out the beginning, only pasted the last part of output): > > > Score = 40.1 bits (20), Expect = 6.3 > Identities = 20/20 (100%) > Strand = Plus / Minus > > > Query: 29 ctgcagctcgggctcctgcc 48 > |||||||||||||||||||| > Sbjct: 150928 ctgcagctcgggctcctgcc 150909 > > > >
> >
> Lambda     K      H
>     1.37    0.711     1.31
> 
> Gapped
> Lambda     K      H
>     1.37    0.711     1.31
> 
> Matrix: blastn matrix:1 -3
> Gap Penalties: Existence: 5, Extension: 2
> Number of Sequences: 2894376
> Number of Hits to DB: 6,089,259
> Number of extensions: 328661
> Number of successful extensions: 6259
> Number of sequences better than 10.0: 2
> Number of HSP's better than 10.0 without gapping: 2
> Number of HSP's gapped: 6259
> Number of HSP's successfully gapped: 2
> Number of extra gapped extensions for HSPs above 10.0: 6255
> Length of query: 600
> Length of database: 13,294,103,689
> Length adjustment: 22
> Effective length of query: 578
> Effective length of database: 13,230,427,417
> Effective search space: 7647187047026
> Effective search space used: 7647187047026
> A: 0
> X1: 11 (21.8 bits)
> X2: 15 (30.0 bits)
> X3: 25 (50.0 bits)
> S1: 14 (25.0 bits)
> S2: 20 (40.1 bits)
> 
> 
> 
> 
> Traceback (most recent call last):
>   File "C:\Python24\MyWorkspace.py", line 50, in -toplevel-
>     b_record = NCBIWWW.BlastParser().parse_str(b_results)
>   File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 52, in 
> parse_str
>     return self.parse(File.StringHandle(string))
>   File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 47, in 
> parse
>     self._scanner.feed(handle, self._consumer)
>   File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 99, in 
> feed
>     self._scan_rounds(uhandle, consumer)
>   File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 242, 
> in _scan_rounds
>     self._scan_alignments(uhandle, consumer)
>   File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 322, 
> in _scan_alignments
>     raise SyntaxError, "Cannot resolve location at line:\n%s" % line1
> SyntaxError: Cannot resolve location at line:
> 
> 
>  >>>
> 
> Thanks!
> 
> Regards,
> Eirik
> 
> 
-- 
Frank Kauff
Dept. of Biology
Duke University
Box 90338
Durham, NC 27708
USA

Phone 919-660-7382
Fax 919-660-7293
Web http://www.lutzonilab.net/member/frankkauff.shtml




From idoerg at burnham.org  Wed Feb 16 17:34:17 2005
From: idoerg at burnham.org (Iddo Friedberg)
Date: Wed Feb 16 17:29:32 2005
Subject: [BioPython] Re: [Biopython-dev] [Fwd: Question to code]
In-Reply-To: <1108592612.5091.32.camel@osiris.biology.duke.edu>
References: <4213C2E3.8030609@burnham.org>
	<1108592612.5091.32.camel@osiris.biology.duke.edu>
Message-ID: <4213CA69.5020105@burnham.org>

I tried qblast with blastp, didn't work.

Didn't try with blastn, though, but that's moot.

Cheers,

./I


Frank Kauff wrote:

>Eirik,
>
>Try if the code works with
>
>b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>
>instead of 
>
>  
>
>>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
>>
>>    
>>
>
>I think that issue appeared a couple of months ago on the biopython list, essentially saying that
>qblast is the blast NCBI wants people to use for blast scripts? After that, qblast method was added
>to NCBIWWW, and it's what I'm using in my blast scripts.
>
>Hope this helps,
>Frank
>
>On Wed, 2005-02-16 at 14:02 -0800, Iddo Friedberg wrote:
>  
>
>>OK, this is a real bug. NCBIWWW seems to be broken.
>>
>>I'm having a looksee, but I'd like someone more versed in this than me 
>>to do so.
>>
>>Thanks,
>>
>>Iddo
>>
>>
>>
>>-------- Original Message --------
>>Subject: 	Question to code
>>Date: 	Wed, 16 Feb 2005 15:19:57 +0100
>>From: 	Eirik S?nneland 
>>To: 	idoerg
>>
>>
>>
>>Dear Freidberg,
>>
>>I've been having problems parsing my output from NCBI using the example 
>>code given in Biopython Cookbook. Therefore I tried to follow your code 
>>described in "Genome Informatics 14(2003). Still I get an error message 
>>connected to the parsing. Could you please give a hint on what is wrong? 
>>Is this a bug?? Code and output as follows:
>>
>>Code:
>>
>>from Bio.Blast import NCBIWWW
>>from Bio import Fasta
>>
>>file_for_blast = open('Fastaformat.txt', 'r')
>>f_iterator = Fasta.Iterator(file_for_blast)
>>f_record = f_iterator.next()
>>
>>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
>>
>>b_record = NCBIWWW.BlastParser().parse_str(b_results)
>>
>>Output(Have cut out the beginning, only pasted the last part of output):
>>
>>
>> Score = 40.1 bits (20), Expect = 6.3
>> Identities = 20/20 (100%)
>> Strand = Plus / Minus
>>
>>                                 
>>Query: 29     ctgcagctcgggctcctgcc 48
>>              ||||||||||||||||||||
>>Sbjct: 150928 ctgcagctcgggctcctgcc 150909
>>
>> >> >>
>> >>
>>Lambda     K      H
>>    1.37    0.711     1.31
>>
>>Gapped
>>Lambda     K      H
>>    1.37    0.711     1.31
>>
>>Matrix: blastn matrix:1 -3
>>Gap Penalties: Existence: 5, Extension: 2
>>Number of Sequences: 2894376
>>Number of Hits to DB: 6,089,259
>>Number of extensions: 328661
>>Number of successful extensions: 6259
>>Number of sequences better than 10.0: 2
>>Number of HSP's better than 10.0 without gapping: 2
>>Number of HSP's gapped: 6259
>>Number of HSP's successfully gapped: 2
>>Number of extra gapped extensions for HSPs above 10.0: 6255
>>Length of query: 600
>>Length of database: 13,294,103,689
>>Length adjustment: 22
>>Effective length of query: 578
>>Effective length of database: 13,230,427,417
>>Effective search space: 7647187047026
>>Effective search space used: 7647187047026
>>A: 0
>>X1: 11 (21.8 bits)
>>X2: 15 (30.0 bits)
>>X3: 25 (50.0 bits)
>>S1: 14 (25.0 bits)
>>S2: 20 (40.1 bits)
>>
>>
>>
>>
>>Traceback (most recent call last):
>>  File "C:\Python24\MyWorkspace.py", line 50, in -toplevel-
>>    b_record = NCBIWWW.BlastParser().parse_str(b_results)
>>  File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 52, in 
>>parse_str
>>    return self.parse(File.StringHandle(string))
>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 47, in 
>>parse
>>    self._scanner.feed(handle, self._consumer)
>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 99, in 
>>feed
>>    self._scan_rounds(uhandle, consumer)
>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 242, 
>>in _scan_rounds
>>    self._scan_alignments(uhandle, consumer)
>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 322, 
>>in _scan_alignments
>>    raise SyntaxError, "Cannot resolve location at line:\n%s" % line1
>>SyntaxError: Cannot resolve location at line:
>>
>>
>> >>>
>>
>>Thanks!
>>
>>Regards,
>>Eirik
>>
>>
>>    
>>


-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP

From idoerg at burnham.org  Wed Feb 16 18:49:49 2005
From: idoerg at burnham.org (Iddo Friedberg)
Date: Wed Feb 16 18:45:08 2005
Subject: [BioPython] Re: [Biopython-dev] [Fwd: Question to code]
In-Reply-To: <1108592612.5091.32.camel@osiris.biology.duke.edu>
References: <4213C2E3.8030609@burnham.org>
	<1108592612.5091.32.camel@osiris.biology.duke.edu>
Message-ID: <4213DC1D.9070306@burnham.org>


OK, I fixed that.

Eirik, you can check out a copy fom CVS, or wait for the Friday release.



./I


Frank Kauff wrote:

>Eirik,
>
>Try if the code works with
>
>b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>
>instead of 
>
>  
>
>>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
>>
>>    
>>
>
>I think that issue appeared a couple of months ago on the biopython list, essentially saying that
>qblast is the blast NCBI wants people to use for blast scripts? After that, qblast method was added
>to NCBIWWW, and it's what I'm using in my blast scripts.
>
>Hope this helps,
>Frank
>
>On Wed, 2005-02-16 at 14:02 -0800, Iddo Friedberg wrote:
>  
>
>>OK, this is a real bug. NCBIWWW seems to be broken.
>>
>>I'm having a looksee, but I'd like someone more versed in this than me 
>>to do so.
>>
>>Thanks,
>>
>>Iddo
>>
>>
>>
>>-------- Original Message --------
>>Subject: 	Question to code
>>Date: 	Wed, 16 Feb 2005 15:19:57 +0100
>>From: 	Eirik S?nneland 
>>To: 	idoerg
>>
>>
>>
>>Dear Freidberg,
>>
>>I've been having problems parsing my output from NCBI using the example 
>>code given in Biopython Cookbook. Therefore I tried to follow your code 
>>described in "Genome Informatics 14(2003). Still I get an error message 
>>connected to the parsing. Could you please give a hint on what is wrong? 
>>Is this a bug?? Code and output as follows:
>>
>>Code:
>>
>>from Bio.Blast import NCBIWWW
>>from Bio import Fasta
>>
>>file_for_blast = open('Fastaformat.txt', 'r')
>>f_iterator = Fasta.Iterator(file_for_blast)
>>f_record = f_iterator.next()
>>
>>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
>>
>>b_record = NCBIWWW.BlastParser().parse_str(b_results)
>>
>>Output(Have cut out the beginning, only pasted the last part of output):
>>
>>
>> Score = 40.1 bits (20), Expect = 6.3
>> Identities = 20/20 (100%)
>> Strand = Plus / Minus
>>
>>                                 
>>Query: 29     ctgcagctcgggctcctgcc 48
>>              ||||||||||||||||||||
>>Sbjct: 150928 ctgcagctcgggctcctgcc 150909
>>
>> >> >>
>> >>
>>Lambda     K      H
>>    1.37    0.711     1.31
>>
>>Gapped
>>Lambda     K      H
>>    1.37    0.711     1.31
>>
>>Matrix: blastn matrix:1 -3
>>Gap Penalties: Existence: 5, Extension: 2
>>Number of Sequences: 2894376
>>Number of Hits to DB: 6,089,259
>>Number of extensions: 328661
>>Number of successful extensions: 6259
>>Number of sequences better than 10.0: 2
>>Number of HSP's better than 10.0 without gapping: 2
>>Number of HSP's gapped: 6259
>>Number of HSP's successfully gapped: 2
>>Number of extra gapped extensions for HSPs above 10.0: 6255
>>Length of query: 600
>>Length of database: 13,294,103,689
>>Length adjustment: 22
>>Effective length of query: 578
>>Effective length of database: 13,230,427,417
>>Effective search space: 7647187047026
>>Effective search space used: 7647187047026
>>A: 0
>>X1: 11 (21.8 bits)
>>X2: 15 (30.0 bits)
>>X3: 25 (50.0 bits)
>>S1: 14 (25.0 bits)
>>S2: 20 (40.1 bits)
>>
>>
>>
>>
>>Traceback (most recent call last):
>>  File "C:\Python24\MyWorkspace.py", line 50, in -toplevel-
>>    b_record = NCBIWWW.BlastParser().parse_str(b_results)
>>  File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 52, in 
>>parse_str
>>    return self.parse(File.StringHandle(string))
>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 47, in 
>>parse
>>    self._scanner.feed(handle, self._consumer)
>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 99, in 
>>feed
>>    self._scan_rounds(uhandle, consumer)
>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 242, 
>>in _scan_rounds
>>    self._scan_alignments(uhandle, consumer)
>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 322, 
>>in _scan_alignments
>>    raise SyntaxError, "Cannot resolve location at line:\n%s" % line1
>>SyntaxError: Cannot resolve location at line:
>>
>>
>> >>>
>>
>>Thanks!
>>
>>Regards,
>>Eirik
>>
>>
>>    
>>


-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP

From idoerg at burnham.org  Wed Feb 16 19:01:30 2005
From: idoerg at burnham.org (Iddo Friedberg)
Date: Wed Feb 16 18:56:45 2005
Subject: [BioPython] Change to NCBIWWW BLast Parser
Message-ID: <4213DEDA.8020109@burnham.org>

Hi all,

I made a change to the NCBIWWW parser which seems to fix the error Eirik 
reported. However, if you can check out the new copy from CVS (revision 
1.36) and import it into your existing modules which use NCBIWWW  just 
as a sanity check, I'd be grateful.

Best,

Iddo

-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP

From sameet at nccs.res.in  Thu Feb 17 03:01:02 2005
From: sameet at nccs.res.in (Sameet Mehta)
Date: Thu Feb 17 03:02:02 2005
Subject: [BioPython] Re: BioPython Digest, Vol 26, Issue 3
In-Reply-To: <200502162346.j1GNkXKu024752@portal.open-bio.org>
References: <200502162346.j1GNkXKu024752@portal.open-bio.org>
Message-ID: <62a4311018eab2faeaf2420b0aa9604a42145207@nccs.res.in>

Dear all,

I wanted to ask if there are MAST and MEME Output?parser(s) avilable in python, and where can those be found.

regards

sameet

--
National Centre for Cell Science, Pune

---------- Original Message -----------
From: biopython-request@portal.open-bio.org
To: biopython@biopython.org
Sent: Wed, 16 Feb 2005 18:46:52 -0500
Subject: BioPython Digest, Vol 26, Issue 3

> Send BioPython mailing list submissions to
> ????biopython@biopython.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> ????http://biopython.org/mailman/listinfo/biopython
> or, via email, send a message with subject or body 'help' to
> ????biopython-request@biopython.org
>
> You can reach the person managing the list at
> ????biopython-owner@biopython.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of BioPython digest..."
>
> Today's Topics:
>
> ? 1. Re: Installing Biopython (Emmanuel Talla)
> ? 2. BLAST Parser query ?(kumar s)
> ? 3. Re: BLAST Parser query (Peter)
> ? 4. WWW Blast (Eirik S?nneland)
> ? 5. Re: [Biopython-dev] [Fwd: Question to code] (Frank Kauff)
> ? 6. Re: [Biopython-dev] [Fwd: Question to code] (Iddo Friedberg)
> ? 7. Re: [Biopython-dev] [Fwd: Question to code] (Iddo Friedberg)
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 14 Feb 2005 17:44:59 +0100
> From: Emmanuel Talla 
> Subject: Re: [BioPython] Installing Biopython
> To: biopython@biopython.org
> Message-ID: <5.0.2.1.2.20050214162630.00a9c790@ibsm.cnrs-mrs.fr>
> Content-Type: text/plain; charset="iso-8859-1"; format=flowed
>
> Thanks !!!!!
>
> Python-devel was installed and egenix-mx-base ?as well as Numeric tools
> 23.4 were installed ?correctly.
>
> Thanks again for your help!!!!
>
> Manu
>
> A 14:44 14/02/2005 +0100, Frederic Sohm a ?crit :
> >Hi,
> >
> >You certainly do not have installed the python-devel package.
> >Mandrake keep the python header files in this package.
> >
> >Try this before installing :
> >
> >$ urpmi python-devel
> >
> >This will install the header files needed for the compilation.
> >Then you can start again the installation has you did before.
> >
> >Fred
>
> >On Monday 14 February 2005 14:37, Emmanuel Talla wrote:
> > > Dear all,
> > >
> > > I have tryed to install biopython and dependencies (Numeric and mxText
> > > modules), following the installation instructions:
> > >
> > > ==================
> > > 3.1.1 UNIX and Mac OS X systems
> > > For UNIX and UNIX-like systems you should download the tar.gz file from the
> > > page listed above. At the current time, this is
> > > egenix-mx-base-2.0.4.tar.gz.
> > >
> > > Once you download this, unpack it and change into the created directory:
> > > $ gunzip egenix-mx-base-2.0.4.tar.gz
> > > $ tar -xvpf egenix-mx-base-2.0.4.tar
> > > $ cd egenix-mx-base-2.0.4
> > > To build it, use the standard python build procedure:
> > > $ python setup.py build
> > > Then become root, and install it, again using the standard python
> > > mechanism: # python setup.py install
> > > ====================
> > >
> > > In the "python setup.py build" step, il have this message:
> > >
> > > error: Invalid Python installation: Unable to open
> > > /usr/lib/python2.3/config/Makefile (no such file or directory)
> > >
> > >
> > >
> > > That right, I checked myself and there is no such file related to python on
> > > my disk.
> > > OS is Mandrake 10.1.
> > > Python 2.3 version (obtained from the Mandrake package)
> > >
> > >
> > > Any help would be appreciated
> > >
> > > Manu
> > > _______________________________________________
> > > BioPython mailing list ?- ?BioPython@biopython.org
> > > http://biopython.org/mailman/listinfo/biopython
> >
> >--
> >Fr?d?ric Sohm
> >Equipe INRA U1126 "Morphogen?se du syst?me nerveux des Chord?s"
> >UPR 2197 DEPSN, CNRS
> >Institut de Neurosciences A. Fessard
> >1 Avenue de la Terrasse
> >91 198 GIF-SUR-YVETTE
> >FRANCE
> >Phone: +33 (0) 1 69 82 34 12
> >Fax:+33 (0) 1 69 82 34 47
>
> ------------------------------
>
> Message: 2
> Date: Mon, 14 Feb 2005 12:28:01 -0800 (PST)
> From: kumar s 
> Subject: [BioPython] BLAST Parser query
> To: biopython@biopython.org
> Message-ID: <20050214202801.10354.qmail@web53702.mail.yahoo.com>
> Content-Type: text/plain; charset=us-ascii
>
> Hi group,
>
> I used standalone BLAST to align my sequences to
> RefSeq database.
>
> I followed the sample code given in the cookbook.
>
> Here is my code:
>
> from string import split
> from Bio.Blast import NCBIStandalone
> b_out = open('xxx_blast.out','r')
> b_parser = NCBIStandalone.BlastParser()
> b_iterator = NCBIStandalone.Iterator(b_out,b_parser)
> b_record = b_iterator.next()
> while 1:
> ? ?b_record = b_iterator.next()
>
> ? ?if b_record is None:
> ? ? ? ?break
>
> ? ?E_VALUE_THRESH = 0.4
> ? ?for alignment in b_record.alignments:
> ???? ? ?for que in b_record.query:
> ???? ? ? ?for hsp in alignment.hsps:
> ???? ????if hsp.expect < E_VALUE_THRESH:
> ? ? ? ? ? ? ? ? ? print '****Alignment****'
> ???? ????print 'sequence:', alignment.title
> ????print 'length:', alignment.length
> ????print 'e value:', hsp.expectprint
> ????print alignment.query
>
> I want to print my query along with my
> alignment.title, because I am blasting 1000 sequences
> against RefSeq and I want to know what the query.
>
> After gawking the class diagram for 40 min.
> I tried this:
>
> while 1:
> ? ?b_record = b_iterator.next()
>
> ? ?if b_record is None:
> ? ? ? ?break
>
> ? ?E_VALUE_THRESH = 0.4
> ? ?for alignment in b_record.alignments:
> ????for que in b_record.query:
> ???? ? for hsp in alignment.hsps:
> ???? ? ? ? if hsp.expect < E_VALUE_THRESH:
> ???? ????print '****Alignment****'
> ???? ????print 'sequence:', alignment.title
> ???? ????print 'length:', alignment.length
> ???? ????print 'e value:', hsp.expectprint
> ???? ????print b_record.query
>
> Considering b_record object will have the query
> attribute, I incorported in here. It fails.
> Can any one please help printing the query for each
> alignment.
>
> Thank you
>
> K
>
> ???? ????
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
>
> ------------------------------
>
> Message: 3
> Date: Mon, 14 Feb 2005 21:22:26 +0000
> From: Peter 
> Subject: Re: [BioPython] BLAST Parser query
> To: biopython@biopython.org
> Message-ID: <42111692.1060505@maubp.freeserve.co.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> kumar s wrote:
> > Hi group,
>
> Hello!
>
> > I used standalone BLAST to align my sequences to
> > RefSeq database.
> >
> > I followed the sample code given in the cookbook.
> >
> > Here is my code:
>
> (code removed)
>
> I would suggest "while True" rather than "while 1" to take advantage
> of the definition of these booleans in Python 2.3, but that is a
> style point.
>
> You also call b_iterator.next() twice at the start of the program
> (once outside the loop, once on the first time through the loop) so
> you will waste/ignore the first result.
>
> i.e. You should comment out the line "b_record = b_iterator.next()"
> before the while loop.
>
> > I want to print my query along with my
> > alignment.title, because I am blasting 1000 sequences
> > against RefSeq and I want to know what the query.
>
> I assume you are blasting with an input FASTA file with 1000
> sequences it it.
>
> When you say "query" what do you mean? ?I can think of three answers:
>
> (a) The name of the original query:
>
> b_record.query
>
> (b) The ENTIRE original query (i.e. a complete sequence of
> nucleotides or amino acids) is not included in the blast output
> (look inside your file 'xxx_blast.out').
>
> You will have to use the query name (i.e. b_record.query) to work
> this out, for example by searching your FASTA input file.
>
> (c) The FRAGMENT of the original query (i.e. a sequence of
> nucleotides or amino acids) that was matched to the Blast database
> is available, as:
>
> hsp.query.replace('-','')
>
> Here hsp.query gives the string including gap characters '-' to show
> how this fragment of the query string aligns with the database match
> (see also the hsp.match and hsp.sbjct properties).
>
> Doing hsp.query.replace('-','') gives the fragment of the query
> string without the gap characters.
>
> e.g.
>
> from Bio.Blast import NCBIStandalone
> b_out = open('xxx_blast.out','r')
> b_parser = NCBIStandalone.BlastParser()
> b_iterator = NCBIStandalone.Iterator(b_out,b_parser)
>
> #Do use the following line, as you end up calling
> #next twice and never look at the first result!
> #b_record = b_iterator.next()
>
> #You only need to define the threshold once
> E_VALUE_THRESH = 0.4
>
> while True:
> ? ? b_record = b_iterator.next()
>
> ? ? if b_record is None:
> ? ? ? ? break
>
> ? ? print "The following results are for query " + b_record.query
>
> ? ? for alignment in b_record.alignments:
> ? ? ? ? for que in b_record.query:
> ? ? ? ? ? ? for hsp in alignment.hsps:
> ? ? ? ? ? ? ? ? if hsp.expect < E_VALUE_THRESH:
> ? ? ? ? ? ? ? ? ? ? print '****Alignment****'
> ? ? ? ? ? ? ? ? ? ? print 'title:', alignment.title
> ? ? ? ? ? ? ? ? ? ? print 'length:', alignment.length
> ? ? ? ? ? ? ? ? ? ? print 'e value:', hsp.expect
> ? ? ? ? ? ? ? ? ? ? print 'fragment of query matched:'
> ? ? ? ? ? ? ? ? ? ? print hsp.query.replace('-','')
>
> I hope the indentation survives being emailed!
>
> Peter
>
> ------------------------------
>
> Message: 4
> Date: Tue, 15 Feb 2005 10:47:38 +0100
> From: Eirik S?nneland 
> Subject: [BioPython] WWW Blast
> To: biopython@portal.open-bio.org
> Message-ID: <4211C53A.9030903@student.umb.no>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I am new to biopython and trying to implement the BLAST example in the
> Cookbook(WWW Blast and parsing results). Can't figure out the error
> message(my code and error message attached). Is there anyone who knows
> how to solve this/what is wrong in the cookbook?
>
> Code:
>
> from Bio import Fasta
>
> file_for_blast = open('Fastaformat.txt', 'r')
> f_iterator = Fasta.Iterator(file_for_blast)
>
> f_record = f_iterator.next()
>
> from Bio.Blast import NCBIWWW
> b_results = NCBIWWW.blast('blastn', 'nr', f_record)
>
> ## save the results for later
>
> save_file = open('my_blast.txt', 'w')
> blast_results =b_results.read()
> save_file.write(blast_results)
> save_file.close()
>
> import cStringIO
> string_result_handle = cStringIO.StringIO(blast_results)
>
> blast_results = open('my_blast.txt', 'r')
>
> b_parser = NCBIWWW.BlastParser()
>
> b_record = b_parser.parse(string_result_handle)
>
> this gives the error message:
>
> Traceback (most recent call last):
> ?File "C:\Python24\MyWorkspace.py", line 51, in -toplevel-
> ? ?b_record = b_parser.parse(string_result_handle)
> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 47, in
> parse
> ? ?self._scanner.feed(handle, self._consumer)
> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 96, in
> feed
> ? ?has_re=re.compile(r'.?BLAST'))
> ?File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 335,
> in read_and_call_until
> ? ?line = safe_readline(uhandle)
> ?File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 411,
> in safe_readline
> ? ?raise SyntaxError, "Unexpected end of stream."
> SyntaxError: Unexpected end of stream.
>
> Advice will be higly appreciated!
> Cheers,
> Eirik
>
> ------------------------------
>
> Message: 5
> Date: Wed, 16 Feb 2005 17:23:32 -0500
> From: Frank Kauff 
> Subject: [BioPython] Re: [Biopython-dev] [Fwd: Question to code]
> To: biopython-dev@biopython.org, biopython@biopython.org
> Message-ID: <1108592612.5091.32.camel@osiris.biology.duke.edu>
> Content-Type: text/plain; charset=UTF-8
>
> Eirik,
>
> Try if the code works with
>
> b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>
> instead of
>
> > b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
> >
>
> I think that issue appeared a couple of months ago on the biopython list, essentially saying that
> qblast is the blast NCBI wants people to use for blast scripts? After that, qblast method was added
> to NCBIWWW, and it's what I'm using in my blast scripts.
>
> Hope this helps,
> Frank
>
> On Wed, 2005-02-16 at 14:02 -0800, Iddo Friedberg wrote:
> > OK, this is a real bug. NCBIWWW seems to be broken.
> >
> > I'm having a looksee, but I'd like someone more versed in this than me
> > to do so.
> >
> > Thanks,
> >
> > Iddo
> >
> >
> >
> > -------- Original Message --------
> > Subject: ????Question to code
> > Date: ????Wed, 16 Feb 2005 15:19:57 +0100
> > From: ????Eirik S??nneland 
> > To: ????idoerg
> >
> >
> >
> > Dear Freidberg,
> >
> > I've been having problems parsing my output from NCBI using the example
> > code given in Biopython Cookbook. Therefore I tried to follow your code
> > described in "Genome Informatics 14(2003). Still I get an error message
> > connected to the parsing. Could you please give a hint on what is wrong?
> > Is this a bug?? Code and output as follows:
> >
> > Code:
> >
> > from Bio.Blast import NCBIWWW
> > from Bio import Fasta
> >
> > file_for_blast = open('Fastaformat.txt', 'r')
> > f_iterator = Fasta.Iterator(file_for_blast)
> > f_record = f_iterator.next()
> >
> > b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
> >
> > b_record = NCBIWWW.BlastParser().parse_str(b_results)
> >
> > Output(Have cut out the beginning, only pasted the last part of output):
> >
> >
> > ?Score = 40.1 bits (20), Expect = 6.3
> > ?Identities = 20/20 (100%)
> > ?Strand = Plus / Minus
> >
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
> > Query: 29 ? ? ctgcagctcgggctcctgcc 48
> > ? ? ? ? ? ? ? ||||||||||||||||||||
> > Sbjct: 150928 ctgcagctcgggctcctgcc 150909
> > 
> > > > > >
> > > >
> > Lambda ? ? K ? ? ?H
> > ? ? 1.37 ? ?0.711 ? ? 1.31
> >
> > Gapped
> > Lambda ? ? K ? ? ?H
> > ? ? 1.37 ? ?0.711 ? ? 1.31
> >
> > Matrix: blastn matrix:1 -3
> > Gap Penalties: Existence: 5, Extension: 2
> > Number of Sequences: 2894376
> > Number of Hits to DB: 6,089,259
> > Number of extensions: 328661
> > Number of successful extensions: 6259
> > Number of sequences better than 10.0: 2
> > Number of HSP's better than 10.0 without gapping: 2
> > Number of HSP's gapped: 6259
> > Number of HSP's successfully gapped: 2
> > Number of extra gapped extensions for HSPs above 10.0: 6255
> > Length of query: 600
> > Length of database: 13,294,103,689
> > Length adjustment: 22
> > Effective length of query: 578
> > Effective length of database: 13,230,427,417
> > Effective search space: 7647187047026
> > Effective search space used: 7647187047026
> > A: 0
> > X1: 11 (21.8 bits)
> > X2: 15 (30.0 bits)
> > X3: 25 (50.0 bits)
> > S1: 14 (25.0 bits)
> > S2: 20 (40.1 bits)
> >
> >
> > 
> >
> > Traceback (most recent call last):
> > ? File "C:\Python24\MyWorkspace.py", line 50, in -toplevel-
> > ? ? b_record = NCBIWWW.BlastParser().parse_str(b_results)
> > ? File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 52, in
> > parse_str
> > ? ? return self.parse(File.StringHandle(string))
> > ? File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 47, in
> > parse
> > ? ? self._scanner.feed(handle, self._consumer)
> > ? File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 99, in
> > feed
> > ? ? self._scan_rounds(uhandle, consumer)
> > ? File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 242,
> > in _scan_rounds
> > ? ? self._scan_alignments(uhandle, consumer)
> > ? File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 322,
> > in _scan_alignments
> > ? ? raise SyntaxError, "Cannot resolve location at line:\n%s" % line1
> > SyntaxError: Cannot resolve location at line:
> > 
> >
> > ?>>>
> >
> > Thanks!
> >
> > Regards,
> > Eirik
> >
> >
> --
> Frank Kauff
> Dept. of Biology
> Duke University
> Box 90338
> Durham, NC 27708
> USA
>
> Phone 919-660-7382
> Fax 919-660-7293
> Web http://www.lutzonilab.net/member/frankkauff.shtml
>
> ------------------------------
>
> Message: 6
> Date: Wed, 16 Feb 2005 14:34:17 -0800
> From: Iddo Friedberg 
> Subject: [BioPython] Re: [Biopython-dev] [Fwd: Question to code]
> To: Frank Kauff 
> Cc: biopython-dev@biopython.org, biopython@biopython.org
> Message-ID: <4213CA69.5020105@burnham.org>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> I tried qblast with blastp, didn't work.
>
> Didn't try with blastn, though, but that's moot.
>
> Cheers,
>
> ./I
>
> Frank Kauff wrote:
>
> >Eirik,
> >
> >Try if the code works with
> >
> >b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
> >
> >instead of
> >
> > ?
> >
> >>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
> >>
> >> ? ?
> >>
> >
> >I think that issue appeared a couple of months ago on the biopython list, essentially saying that
> >qblast is the blast NCBI wants people to use for blast scripts? After that, qblast method was added
> >to NCBIWWW, and it's what I'm using in my blast scripts.
> >
> >Hope this helps,
> >Frank
> >
> >On Wed, 2005-02-16 at 14:02 -0800, Iddo Friedberg wrote:
> > ?
> >
> >>OK, this is a real bug. NCBIWWW seems to be broken.
> >>
> >>I'm having a looksee, but I'd like someone more versed in this than me
> >>to do so.
> >>
> >>Thanks,
> >>
> >>Iddo
> >>
> >>
> >>
> >>-------- Original Message --------
> >>Subject: ????Question to code
> >>Date: ????Wed, 16 Feb 2005 15:19:57 +0100
> >>From: ????Eirik S??nneland 
> >>To: ????idoerg
> >>
> >>
> >>
> >>Dear Freidberg,
> >>
> >>I've been having problems parsing my output from NCBI using the example
> >>code given in Biopython Cookbook. Therefore I tried to follow your code
> >>described in "Genome Informatics 14(2003). Still I get an error message
> >>connected to the parsing. Could you please give a hint on what is wrong?
> >>Is this a bug?? Code and output as follows:
> >>
> >>Code:
> >>
> >>from Bio.Blast import NCBIWWW
> >>from Bio import Fasta
> >>
> >>file_for_blast = open('Fastaformat.txt', 'r')
> >>f_iterator = Fasta.Iterator(file_for_blast)
> >>f_record = f_iterator.next()
> >>
> >>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
> >>
> >>b_record = NCBIWWW.BlastParser().parse_str(b_results)
> >>
> >>Output(Have cut out the beginning, only pasted the last part of output):
> >>
> >>
> >> Score = 40.1 bits (20), Expect = 6.3
> >> Identities = 20/20 (100%)
> >> Strand = Plus / Minus
> >>
> >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
> >>Query: 29 ? ? ctgcagctcgggctcctgcc 48
> >> ? ? ? ? ? ? ?||||||||||||||||||||
> >>Sbjct: 150928 ctgcagctcgggctcctgcc 150909
> >>
> >> > >> > >>
> >> > >>
> >>Lambda ? ? K ? ? ?H
> >> ? ?1.37 ? ?0.711 ? ? 1.31
> >>
> >>Gapped
> >>Lambda ? ? K ? ? ?H
> >> ? ?1.37 ? ?0.711 ? ? 1.31
> >>
> >>Matrix: blastn matrix:1 -3
> >>Gap Penalties: Existence: 5, Extension: 2
> >>Number of Sequences: 2894376
> >>Number of Hits to DB: 6,089,259
> >>Number of extensions: 328661
> >>Number of successful extensions: 6259
> >>Number of sequences better than 10.0: 2
> >>Number of HSP's better than 10.0 without gapping: 2
> >>Number of HSP's gapped: 6259
> >>Number of HSP's successfully gapped: 2
> >>Number of extra gapped extensions for HSPs above 10.0: 6255
> >>Length of query: 600
> >>Length of database: 13,294,103,689
> >>Length adjustment: 22
> >>Effective length of query: 578
> >>Effective length of database: 13,230,427,417
> >>Effective search space: 7647187047026
> >>Effective search space used: 7647187047026
> >>A: 0
> >>X1: 11 (21.8 bits)
> >>X2: 15 (30.0 bits)
> >>X3: 25 (50.0 bits)
> >>S1: 14 (25.0 bits)
> >>S2: 20 (40.1 bits)
> >>
> >>
> >>
> >>
> >>Traceback (most recent call last):
> >> ?File "C:\Python24\MyWorkspace.py", line 50, in -toplevel-
> >> ? ?b_record = NCBIWWW.BlastParser().parse_str(b_results)
> >> ?File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 52, in
> >>parse_str
> >> ? ?return self.parse(File.StringHandle(string))
> >> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 47, in
> >>parse
> >> ? ?self._scanner.feed(handle, self._consumer)
> >> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 99, in
> >>feed
> >> ? ?self._scan_rounds(uhandle, consumer)
> >> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 242,
> >>in _scan_rounds
> >> ? ?self._scan_alignments(uhandle, consumer)
> >> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 322,
> >>in _scan_alignments
> >> ? ?raise SyntaxError, "Cannot resolve location at line:\n%s" % line1
> >>SyntaxError: Cannot resolve location at line:
> >>
> >>
> >> >>>
> >>
> >>Thanks!
> >>
> >>Regards,
> >>Eirik
> >>
> >>
> >> ? ?
> >>
>
> --
> Iddo Friedberg, Ph.D.
> The Burnham Institute
> 10901 N. Torrey Pines Rd.
> La Jolla, CA 92037 USA
> Tel: +1 (858) 646 3100 x3516
> Fax: +1 (858) 713 9930
> http://ffas.ljcrf.edu/~iddo
> ==========================
> The First Automated Protein Function Prediction SIG
> Detroit, MI June 24, 2005
> http://ffas.burnham.org/AFP
>
> ------------------------------
>
> Message: 7
> Date: Wed, 16 Feb 2005 15:49:49 -0800
> From: Iddo Friedberg 
> Subject: [BioPython] Re: [Biopython-dev] [Fwd: Question to code]
> Cc: biopython-dev@biopython.org, biopython@biopython.org
> Message-ID: <4213DC1D.9070306@burnham.org>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> OK, I fixed that.
>
> Eirik, you can check out a copy fom CVS, or wait for the Friday release.
>
> ./I
>
> Frank Kauff wrote:
>
> >Eirik,
> >
> >Try if the code works with
> >
> >b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
> >
> >instead of
> >
> > ?
> >
> >>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
> >>
> >> ? ?
> >>
> >
> >I think that issue appeared a couple of months ago on the biopython list, essentially saying that
> >qblast is the blast NCBI wants people to use for blast scripts? After that, qblast method was added
> >to NCBIWWW, and it's what I'm using in my blast scripts.
> >
> >Hope this helps,
> >Frank
> >
> >On Wed, 2005-02-16 at 14:02 -0800, Iddo Friedberg wrote:
> > ?
> >
> >>OK, this is a real bug. NCBIWWW seems to be broken.
> >>
> >>I'm having a looksee, but I'd like someone more versed in this than me
> >>to do so.
> >>
> >>Thanks,
> >>
> >>Iddo
> >>
> >>
> >>
> >>-------- Original Message --------
> >>Subject: ????Question to code
> >>Date: ????Wed, 16 Feb 2005 15:19:57 +0100
> >>From: ????Eirik S??nneland 
> >>To: ????idoerg
> >>
> >>
> >>
> >>Dear Freidberg,
> >>
> >>I've been having problems parsing my output from NCBI using the example
> >>code given in Biopython Cookbook. Therefore I tried to follow your code
> >>described in "Genome Informatics 14(2003). Still I get an error message
> >>connected to the parsing. Could you please give a hint on what is wrong?
> >>Is this a bug?? Code and output as follows:
> >>
> >>Code:
> >>
> >>from Bio.Blast import NCBIWWW
> >>from Bio import Fasta
> >>
> >>file_for_blast = open('Fastaformat.txt', 'r')
> >>f_iterator = Fasta.Iterator(file_for_blast)
> >>f_record = f_iterator.next()
> >>
> >>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
> >>
> >>b_record = NCBIWWW.BlastParser().parse_str(b_results)
> >>
> >>Output(Have cut out the beginning, only pasted the last part of output):
> >>
> >>
> >> Score = 40.1 bits (20), Expect = 6.3
> >> Identities = 20/20 (100%)
> >> Strand = Plus / Minus
> >>
> >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
> >>Query: 29 ? ? ctgcagctcgggctcctgcc 48
> >> ? ? ? ? ? ? ?||||||||||||||||||||
> >>Sbjct: 150928 ctgcagctcgggctcctgcc 150909
> >>
> >> > >> > >>
> >> > >>
> >>Lambda ? ? K ? ? ?H
> >> ? ?1.37 ? ?0.711 ? ? 1.31
> >>
> >>Gapped
> >>Lambda ? ? K ? ? ?H
> >> ? ?1.37 ? ?0.711 ? ? 1.31
> >>
> >>Matrix: blastn matrix:1 -3
> >>Gap Penalties: Existence: 5, Extension: 2
> >>Number of Sequences: 2894376
> >>Number of Hits to DB: 6,089,259
> >>Number of extensions: 328661
> >>Number of successful extensions: 6259
> >>Number of sequences better than 10.0: 2
> >>Number of HSP's better than 10.0 without gapping: 2
> >>Number of HSP's gapped: 6259
> >>Number of HSP's successfully gapped: 2
> >>Number of extra gapped extensions for HSPs above 10.0: 6255
> >>Length of query: 600
> >>Length of database: 13,294,103,689
> >>Length adjustment: 22
> >>Effective length of query: 578
> >>Effective length of database: 13,230,427,417
> >>Effective search space: 7647187047026
> >>Effective search space used: 7647187047026
> >>A: 0
> >>X1: 11 (21.8 bits)
> >>X2: 15 (30.0 bits)
> >>X3: 25 (50.0 bits)
> >>S1: 14 (25.0 bits)
> >>S2: 20 (40.1 bits)
> >>
> >>
> >>
> >>
> >>Traceback (most recent call last):
> >> ?File "C:\Python24\MyWorkspace.py", line 50, in -toplevel-
> >> ? ?b_record = NCBIWWW.BlastParser().parse_str(b_results)
> >> ?File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 52, in
> >>parse_str
> >> ? ?return self.parse(File.StringHandle(string))
> >> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 47, in
> >>parse
> >> ? ?self._scanner.feed(handle, self._consumer)
> >> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 99, in
> >>feed
> >> ? ?self._scan_rounds(uhandle, consumer)
> >> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 242,
> >>in _scan_rounds
> >> ? ?self._scan_alignments(uhandle, consumer)
> >> ?File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 322,
> >>in _scan_alignments
> >> ? ?raise SyntaxError, "Cannot resolve location at line:\n%s" % line1
> >>SyntaxError: Cannot resolve location at line:
> >>
> >>
> >> >>>
> >>
> >>Thanks!
> >>
> >>Regards,
> >>Eirik
> >>
> >>
> >> ? ?
> >>
>
> --
> Iddo Friedberg, Ph.D.
> The Burnham Institute
> 10901 N. Torrey Pines Rd.
> La Jolla, CA 92037 USA
> Tel: +1 (858) 646 3100 x3516
> Fax: +1 (858) 713 9930
> http://ffas.ljcrf.edu/~iddo
> ==========================
> The First Automated Protein Function Prediction SIG
> Detroit, MI June 24, 2005
> http://ffas.burnham.org/AFP
>
> ------------------------------
>
> _______________________________________________
> BioPython mailing list ?- ?BioPython@biopython.org
> http://biopython.org/mailman/listinfo/biopython
>
> End of BioPython Digest, Vol 26, Issue 3
> ****************************************
------- End of Original Message -------


From dag at sonsorol.org  Thu Feb 17 08:50:55 2005
From: dag at sonsorol.org (Chris Dagdigian)
Date: Thu Feb 17 08:46:20 2005
Subject: [BioPython] Important info for all Open-Bio affiliated developers
 (people with CVS write access...)
Message-ID: <4214A13F.6010006@sonsorol.org>


Hi folks, apologies for the large cross-posting.

Really short summary:

We are going to migrate to newer server hardware over the next few 
months. If you are an OBF developer (someone who has a login account on 
"pub" with CVS write permission to one or more repositories) then you'll 
need to make sure we have your most current email address so we can 
communicate the transition plan directly without spamming N number of 
mailing lists.

We need updated contact info in order to manage the transition.

Details below.

Long winded details:

Our existing servers (the developer CVS repository and the 2nd system 
that handles websites & mailing lists) are getting a bit old and more 
importantly are running older Linux distributions that are long past 
official support dates and are difficult to update, secure and maintain.

We have 2 brand new servers sitting online in a Boston area colocation 
facility and the various OBF sysadmins are starting to think about 
planning for transitioning services and user accounts.

First to move (I suspect) is going to be the pub.open-bio.org system 
which is the main CVS sourcecode repository for our various projects 
such as biojava, bioperl, moby, etc.

We think the transition will be pretty quick and transparent. It should 
not be all that hard to migrate the user accounts and copy over the CVS 
repository tree. We'll be writing scripts to automate the process and 
can run repeated migration tests before officially switching on the new 
system.

What CVS committers and developers need to do
=============================================
1. SSH login to pub.open-bio.org
2. Run the "chfn" command to edit your user info
3. Make sure a good email address is listed for the Office: or Phone: 
field. Info about your project and institution would be great as well 
but is not required.

In a week's time I'm going to capture all the email addresses listed and 
will insert them into a mailing list that we'll use to communicate our 
plans. This way we can speak to developers directly without cross 
posting to many mailing lists.

Any user account without a full name and working email address will 
still be migrated but we are going to lockout the password until we hear 
from the person in question.


What OBF Project Leaders need to do
====================================
1. Login to pub.open-bio.org

2. Check /etc/groups for your project name and examine the users who 
have write access to your repository -- Email root-l@open-bio.org with 
the usernames of any inactive members who can safely be deleted.



Regards,
Chris
one of the open-bio admins (root-l@open-bio.org)



-- 
Chris Dagdigian, 
BioTeam  - Independent life science IT & informatics consulting
Office: 617-665-6088, Mobile: 617-877-5498, Fax: 425-699-0193
PGP KeyID: 83D4310E iChat/AIM: bioteamdag  Web: http://bioteam.net
From idoerg at burnham.org  Thu Feb 17 12:36:14 2005
From: idoerg at burnham.org (Iddo Friedberg)
Date: Thu Feb 17 12:31:43 2005
Subject: [BioPython] Re: [Biopython-dev] [Fwd: Question to code]
In-Reply-To: <42146BAF.1010102@student.umb.no>
References: <4213C2E3.8030609@burnham.org>
	<1108592612.5091.32.camel@osiris.biology.duke.edu>
	<4213DC1D.9070306@burnham.org> <42146BAF.1010102@student.umb.no>
Message-ID: <4214D60E.40507@burnham.org>

Eirik,

Yes, you got that because you are probably using the 1.30 release 
version, which does not include qblast. Normally I would recommend 
checking out a new version form CVS. But these days the CVS is in 
constant flux because we're racing to make the release deadline. Best 
wait until Friday. (Saturday in Norway).

In most other cases, you can downlaod a tarball from:

http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/biopython.tar.gz?tarball=1&cvsroot=biopython

This you can open with winzip, but I am not sure about how to go about 
installation from source in Windows.

Thank you for your patience. And for drawing our attention to that bug.


Best,

Iddo






Eirik S?nneland wrote:

> Iddo!
>
> Not to familiar with use of CVS...is there an easy why to do this in 
> windows? I tried your new code and got:
>
> Traceback (most recent call last):
>   File "C:\Python24\MyWorkspace.py", line 23, in -toplevel-
>     b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
> AttributeError: 'module' object has no attribute 'qblast'
>
> Yes I can wait to Friday, but since I'm using biopython in my master 
> it might be good to use CVS to always have the latest version??
>
> Thanks,
> Eirik
>
> Iddo Friedberg wrote:
>
>>
>> OK, I fixed that.
>>
>> Eirik, you can check out a copy fom CVS, or wait for the Friday release.
>>
>>
>>
>> ./I
>>
>>
>> Frank Kauff wrote:
>>
>>> Eirik,
>>>
>>> Try if the code works with
>>>
>>> b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>>>
>>> instead of
>>>  
>>>
>>>> b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
>>>>
>>>>   
>>>
>>>
>>> I think that issue appeared a couple of months ago on the biopython 
>>> list, essentially saying that
>>> qblast is the blast NCBI wants people to use for blast scripts? 
>>> After that, qblast method was added
>>> to NCBIWWW, and it's what I'm using in my blast scripts.
>>>
>>> Hope this helps,
>>> Frank
>>>
>>> On Wed, 2005-02-16 at 14:02 -0800, Iddo Friedberg wrote:
>>>  
>>>
>>>> OK, this is a real bug. NCBIWWW seems to be broken.
>>>>
>>>> I'm having a looksee, but I'd like someone more versed in this than 
>>>> me to do so.
>>>>
>>>> Thanks,
>>>>
>>>> Iddo
>>>>
>>>>
>>>>
>>>> -------- Original Message --------
>>>> Subject:     Question to code
>>>> Date:     Wed, 16 Feb 2005 15:19:57 +0100
>>>> From:     Eirik S?nneland 
>>>> To:     idoerg
>>>>
>>>>
>>>>
>>>> Dear Freidberg,
>>>>
>>>> I've been having problems parsing my output from NCBI using the 
>>>> example code given in Biopython Cookbook. Therefore I tried to 
>>>> follow your code described in "Genome Informatics 14(2003). Still I 
>>>> get an error message connected to the parsing. Could you please 
>>>> give a hint on what is wrong? Is this a bug?? Code and output as 
>>>> follows:
>>>>
>>>> Code:
>>>>
>>>> from Bio.Blast import NCBIWWW
>>>> from Bio import Fasta
>>>>
>>>> file_for_blast = open('Fastaformat.txt', 'r')
>>>> f_iterator = Fasta.Iterator(file_for_blast)
>>>> f_record = f_iterator.next()
>>>>
>>>> b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
>>>>
>>>> b_record = NCBIWWW.BlastParser().parse_str(b_results)
>>>>
>>>> Output(Have cut out the beginning, only pasted the last part of 
>>>> output):
>>>>
>>>>
>>>> Score = 40.1 bits (20), Expect = 6.3
>>>> Identities = 20/20 (100%)
>>>> Strand = Plus / Minus
>>>>
>>>>                                 Query: 29     ctgcagctcgggctcctgcc 48
>>>>              ||||||||||||||||||||
>>>> Sbjct: 150928 ctgcagctcgggctcctgcc 150909
>>>> 
>>>> >>>> >>>>
>>>> >>>>
>>>> Lambda     K      H
>>>>    1.37    0.711     1.31
>>>>
>>>> Gapped
>>>> Lambda     K      H
>>>>    1.37    0.711     1.31
>>>>
>>>> Matrix: blastn matrix:1 -3
>>>> Gap Penalties: Existence: 5, Extension: 2
>>>> Number of Sequences: 2894376
>>>> Number of Hits to DB: 6,089,259
>>>> Number of extensions: 328661
>>>> Number of successful extensions: 6259
>>>> Number of sequences better than 10.0: 2
>>>> Number of HSP's better than 10.0 without gapping: 2
>>>> Number of HSP's gapped: 6259
>>>> Number of HSP's successfully gapped: 2
>>>> Number of extra gapped extensions for HSPs above 10.0: 6255
>>>> Length of query: 600
>>>> Length of database: 13,294,103,689
>>>> Length adjustment: 22
>>>> Effective length of query: 578
>>>> Effective length of database: 13,230,427,417
>>>> Effective search space: 7647187047026
>>>> Effective search space used: 7647187047026
>>>> A: 0
>>>> X1: 11 (21.8 bits)
>>>> X2: 15 (30.0 bits)
>>>> X3: 25 (50.0 bits)
>>>> S1: 14 (25.0 bits)
>>>> S2: 20 (40.1 bits)
>>>>
>>>>
>>>> 
>>>>
>>>> Traceback (most recent call last):
>>>>  File "C:\Python24\MyWorkspace.py", line 50, in -toplevel-
>>>>    b_record = NCBIWWW.BlastParser().parse_str(b_results)
>>>>  File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 
>>>> 52, in parse_str
>>>>    return self.parse(File.StringHandle(string))
>>>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 
>>>> 47, in parse
>>>>    self._scanner.feed(handle, self._consumer)
>>>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 
>>>> 99, in feed
>>>>    self._scan_rounds(uhandle, consumer)
>>>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 
>>>> 242, in _scan_rounds
>>>>    self._scan_alignments(uhandle, consumer)
>>>>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 
>>>> 322, in _scan_alignments
>>>>    raise SyntaxError, "Cannot resolve location at line:\n%s" % line1
>>>> SyntaxError: Cannot resolve location at line:
>>>> 
>>>>
>>>> >>>
>>>>
>>>> Thanks!
>>>>
>>>> Regards,
>>>> Eirik
>>>>
>>>>
>>>>   
>>>
>>
>>
>


-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP

From noah.hoffman at gmail.com  Thu Feb 17 13:34:54 2005
From: noah.hoffman at gmail.com (Noah Hoffman)
Date: Thu Feb 17 13:30:07 2005
Subject: [BioPython] Bio.Blast.NCBIWWW.blast returns before search is
	complete
Message-ID: <722a2f5e050217103475921a54@mail.gmail.com>

Hello biopython list -

This is my first attempt to use the biopython tools, so I thought I'd
check with the mailing list first before submitting it as a bug to see
if I'm missing something obvious (I wouldn't be surprised!). I'm
running Biopython version 1.30 on mac os 10.3.8, python version 2.3.

Just doing a simple blast search, following the example in the
cookbook. The job is dispatched properly, and often (but not always)
returns the "search pending" message rather than the search results
itself. I believe that I've found the code in Bio/Blast/NCBIWWW.py
responsible for the failure to wait for the results to be ready on the
NCBI end - it actually looks like the python code is correct, and that
the server is supplying misleading data (held in the "comment"
variable below).

Code snippets from the module with my debugging code (flagged by ####
NH) follows:

% cat -n /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/Bio/Blast/NCBIWWW.py
| grep -A3 -B3 "#### NH"

   769      while 1:
   770          # pause before trying to get the results
   771
   772          print '(line %s) pausing: refresh_delay = %s' %
(line_no(), refresh_delay)  #### NH
   773
   774          time.sleep(refresh_delay)
   775
--
   783          ready, results_cgi, results_params =
_parse_blast_results_page(handle)
   784
   785          print '(line %s) checking search status; ready = %s' \
   786          % (line_no(), ready) #### NH
   787
   788          results_params['FORMAT_TYPE']=format_type
   789          results_params['NCBI_GI']='yes'
--
   869              # //-->
   870              comment = string.lower(comment)
   871
   872              print '(line %s) comment:\n--->%s<---' %
(line_no(),comment.strip()) #### NH
   873
   874              if string.find(comment, 'status=ready') >= 0:
   875                  self.ready = 1
--
   982          outhandle.write(data)
   983      sock.close()
   984
   985  def line_no(): #### NH
   986          import inspect
   987          try: raise AttributeError
   988          except AttributeError: return inspect.stack()[1][2]

... and the output resulting from the dispatch of two sequence files,
445.fasta and 457.fasta:

searching 445.fasta against the nr database using tblastn
(line 772) pausing: refresh_delay = 56
(line 872) comment:
--->qblastinfobegin
        status=waiting
qblastinfoend<---
(line 872) comment:
--->settimeout('document.forms[0].submit();',11000);
//<---
(line 785) checking search status; ready = 0
(line 772) pausing: refresh_delay = 56
(line 872) comment:
--->qblastinfobegin
        status=waiting
qblastinfoend<---
(line 872) comment:
--->settimeout('document.forms[0].submit();',12000);
//<---
(line 785) checking search status; ready = 0
(line 772) pausing: refresh_delay = 56
(line 872) comment:
--->qblastinfobegin
        status=ready
qblastinfoend<---
(line 785) checking search status; ready = 1
writing 445_tblastn.html

searching 457.fasta against the nr database using tblastn
(line 772) pausing: refresh_delay = 39
(line 872) comment:
--->qblastinfobegin
        status=waiting
qblastinfoend<---
(line 872) comment:
--->settimeout('document.forms[0].submit();',17000);
//<---
(line 785) checking search status; ready = 0
(line 772) pausing: refresh_delay = 39
(line 872) comment:
--->qblastinfobegin
        status=waiting
qblastinfoend<---
(line 872) comment:
--->settimeout('document.forms[0].submit();',17000);
//<---
(line 785) checking search status; ready = 0
(line 772) pausing: refresh_delay = 39
(line 872) comment:
--->qblastinfobegin
        status=ready
qblastinfoend<---
(line 785) checking search status; ready = 1
writing 457_tblastn.html

% du -h *tblastn.html
4.0k    445_tblastn.html
28k     457_tblastn.html

As you can see from the file sizes, only the search using 457.fasta
returned actual results, despite the fact that the while loop seemed
to end appropriately once status=ready appeared in the comment
variable.

Anyone have any ideas? Is this simply erratic behavior by the NCBI
server that we can not hope to have any control over? Is this a known
problem that has been addressed in the CVS repository?

Thanks a lot,
Noah
From idoerg at burnham.org  Thu Feb 17 13:53:26 2005
From: idoerg at burnham.org (Iddo Friedberg)
Date: Thu Feb 17 13:48:54 2005
Subject: [BioPython] Bio.Blast.NCBIWWW.blast returns before search is
	complete
In-Reply-To: <722a2f5e050217103475921a54@mail.gmail.com>
References: <722a2f5e050217103475921a54@mail.gmail.com>
Message-ID: <4214E826.8050109@burnham.org>

Noah,

Thanks for your interest in our project. We are aware of this bug, which 
has already been fixed in CVS, and we are rolling Biopython 1.40 
tomorrow, hopefully. The cookbook example is kinda out of date: the 
blast method is deprecated, NCBIWWW uses qblast now.

If you can wait for a couple of days, we would have Biopython 1.40 out. 
If you want to live on the bleeding edge, check out a copy fom CVS. Go 
to: http://biopython.org/CVS and read there on how to do it.

Not that the blast method is deprecated, and qblast is being used now. 
However, qblast is only in the CVS version, not in the 1.30 release.

HTH,

Iddo

Noah Hoffman wrote:

>Hello biopython list -
>
>This is my first attempt to use the biopython tools, so I thought I'd
>check with the mailing list first before submitting it as a bug to see
>if I'm missing something obvious (I wouldn't be surprised!). I'm
>running Biopython version 1.30 on mac os 10.3.8, python version 2.3.
>
>Just doing a simple blast search, following the example in the
>cookbook. The job is dispatched properly, and often (but not always)
>returns the "search pending" message rather than the search results
>itself. I believe that I've found the code in Bio/Blast/NCBIWWW.py
>responsible for the failure to wait for the results to be ready on the
>NCBI end - it actually looks like the python code is correct, and that
>the server is supplying misleading data (held in the "comment"
>variable below).
>
>Code snippets from the module with my debugging code (flagged by ####
>NH) follows:
>
>% cat -n /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/Bio/Blast/NCBIWWW.py
>| grep -A3 -B3 "#### NH"
>
>   769      while 1:
>   770          # pause before trying to get the results
>   771
>   772          print '(line %s) pausing: refresh_delay = %s' %
>(line_no(), refresh_delay)  #### NH
>   773
>   774          time.sleep(refresh_delay)
>   775
>--
>   783          ready, results_cgi, results_params =
>_parse_blast_results_page(handle)
>   784
>   785          print '(line %s) checking search status; ready = %s' \
>   786          % (line_no(), ready) #### NH
>   787
>   788          results_params['FORMAT_TYPE']=format_type
>   789          results_params['NCBI_GI']='yes'
>--
>   869              # //-->
>   870              comment = string.lower(comment)
>   871
>   872              print '(line %s) comment:\n--->%s<---' %
>(line_no(),comment.strip()) #### NH
>   873
>   874              if string.find(comment, 'status=ready') >= 0:
>   875                  self.ready = 1
>--
>   982          outhandle.write(data)
>   983      sock.close()
>   984
>   985  def line_no(): #### NH
>   986          import inspect
>   987          try: raise AttributeError
>   988          except AttributeError: return inspect.stack()[1][2]
>
>... and the output resulting from the dispatch of two sequence files,
>445.fasta and 457.fasta:
>
>searching 445.fasta against the nr database using tblastn
>(line 772) pausing: refresh_delay = 56
>(line 872) comment:
>--->qblastinfobegin
>        status=waiting
>qblastinfoend<---
>(line 872) comment:
>--->settimeout('document.forms[0].submit();',11000);
>//<---
>(line 785) checking search status; ready = 0
>(line 772) pausing: refresh_delay = 56
>(line 872) comment:
>--->qblastinfobegin
>        status=waiting
>qblastinfoend<---
>(line 872) comment:
>--->settimeout('document.forms[0].submit();',12000);
>//<---
>(line 785) checking search status; ready = 0
>(line 772) pausing: refresh_delay = 56
>(line 872) comment:
>--->qblastinfobegin
>        status=ready
>qblastinfoend<---
>(line 785) checking search status; ready = 1
>writing 445_tblastn.html
>
>searching 457.fasta against the nr database using tblastn
>(line 772) pausing: refresh_delay = 39
>(line 872) comment:
>--->qblastinfobegin
>        status=waiting
>qblastinfoend<---
>(line 872) comment:
>--->settimeout('document.forms[0].submit();',17000);
>//<---
>(line 785) checking search status; ready = 0
>(line 772) pausing: refresh_delay = 39
>(line 872) comment:
>--->qblastinfobegin
>        status=waiting
>qblastinfoend<---
>(line 872) comment:
>--->settimeout('document.forms[0].submit();',17000);
>//<---
>(line 785) checking search status; ready = 0
>(line 772) pausing: refresh_delay = 39
>(line 872) comment:
>--->qblastinfobegin
>        status=ready
>qblastinfoend<---
>(line 785) checking search status; ready = 1
>writing 457_tblastn.html
>
>% du -h *tblastn.html
>4.0k    445_tblastn.html
>28k     457_tblastn.html
>
>As you can see from the file sizes, only the search using 457.fasta
>returned actual results, despite the fact that the while loop seemed
>to end appropriately once status=ready appeared in the comment
>variable.
>
>Anyone have any ideas? Is this simply erratic behavior by the NCBI
>server that we can not hope to have any control over? Is this a known
>problem that has been addressed in the CVS repository?
>
>Thanks a lot,
>Noah
>_______________________________________________
>BioPython mailing list  -  BioPython@biopython.org
>http://biopython.org/mailman/listinfo/biopython
>
>
>  
>


-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP

From mlerner at umich.edu  Fri Feb 18 17:51:38 2005
From: mlerner at umich.edu (Michael George Lerner)
Date: Fri Feb 18 17:46:48 2005
Subject: [BioPython] biopython + python 2.4?
Message-ID: 


hi,

i just downloaded the source tarball from
http://biopython.org/download/
and noticed that it doesn't compile under python 2.4.  the only problem i 
saw was that i needed to change

     if(!(py_marshalled = PyMarshal_WriteObjectToString(py_value)))
 	goto _write_value_to_handle_cleanup;

to

#ifdef Py_MARSHAL_VERSION
     if(!(py_marshalled = PyMarshal_WriteObjectToString(py_value,Py_MARSHAL_VERSION)))
 	goto _write_value_to_handle_cleanup;
#else
     if(!(py_marshalled = PyMarshal_WriteObjectToString(py_value)))
 	goto _write_value_to_handle_cleanup;
#endif

in triemodule.c

i assume that's well known, because i saw an windows installer for 2.4 on 
the website.  i just have two quick questions:

  - is that *all* i need to change for 2.4?  most everything seemed to 
work, but i wanted to double-check.  i googled around a bit, but didn't 
find any answers .. i'm sorry if this is all written up somewhere that i 
should've seen. 
(one test was skipped because i don't have MySQLdb, two tests were skipped 
because some command named "dnal" wasn't found, and test_Registry failed 
saying 'Retrieval of PDB data from various locations. ... ERROR\n')

  - are there any plans to put a 2.4-ready source tarball on the download 
page?

thanks,

-michael

--
This isn't a democracy;|                        _  |Michael Lerner
  it's a cheer-ocracy.  | ASCII ribbon campaign ( ) |   Michigan
-Torrence,  Bring It On|  - against HTML email  X  |  Biophysics
                        |                       / \ | mlerner@umich
From eirik.sonneland at student.umb.no  Tue Feb 22 03:42:13 2005
From: eirik.sonneland at student.umb.no (=?ISO-8859-1?Q?Eirik_S=F8nneland?=)
Date: Tue Feb 22 03:37:30 2005
Subject: [BioPython] Is the bug still there??
Message-ID: <421AF065.5090209@student.umb.no>

Hi!

Thanks for new release of biopython. Still trying to do a "simpel" Blast 
search using qblast and the exampel code given in documentation at 
biopython.org:
*******************
import sys
from Bio.Blast import NCBIWWW
from Bio import Fasta

file_for_blast = open('Fastaformat.txt', 'r')
f_iterator = Fasta.Iterator(file_for_blast)
f_record = f_iterator.next()

b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()

b_record = NCBIWWW.BlastParser().parse_str(b_results)

E_VALUE_THRESH = 0.04

for alignment in b_record.alignments:
    for hsp in alignment.hsps:
        if hsp.expect < E_VALUE_THRESH:
            print '****Alignment****'
            print 'sequence:', alignment.title
            print 'length:', alignment.length
            print 'e value:', hsp.expect
            print hsp.query[0:75] + '...'
            print hsp.match[0:75] + '...'
            print hsp.sbjct[0:75] + '...'
****************
This gives following error message(what have I done wrong? Is the bug 
still there??):


Warning (from warnings module):
  File "C:\Python24\lib\site-packages\Bio\Blast\NCBIWWW.py", line 1062
    warnings.warn("qblast works only with blastn and blastp for now.")
UserWarning: qblast works only with blastn and blastp for now.

Traceback (most recent call last):
  File "C:\Python24\MyWorkspace.py", line 23, in -toplevel-
    b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 1081, 
in qblast
    rid, rtoe = _parse_qblast_ref_page(handle)
  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 1152, 
in _parse_qblast_ref_page
    return rid, int(rtoe)
ValueError: invalid literal for int(): 1.1 200 OK

Date: Tue, 22 Feb 2005 08:28:44 GMT

Server: Apache/1.3.27 (Unix) mod_fastcgi/2.4.0

Content-Type: text/html

Via: 1.1 www.ncbi.nih.gov

X-Cache: MISS from www.ncbi.nih.gov

Connection: cl
********************
Please advice!

Regards,
Eirik

From eirik.sonneland at student.umb.no  Tue Feb 22 06:59:09 2005
From: eirik.sonneland at student.umb.no (=?ISO-8859-1?Q?Eirik_S=F8nneland?=)
Date: Tue Feb 22 06:54:20 2005
Subject: [BioPython] Is the bug still there??
In-Reply-To: <421B14D8.8050302@mpiib-berlin.mpg.de>
References: <421AF065.5090209@student.umb.no>
	<421B14D8.8050302@mpiib-berlin.mpg.de>
Message-ID: <421B1E8D.4090504@student.umb.no>

Thanks, Martina.

You made me see an error and it seems like it runs ok for now...even the 
parsing:-)

regards,
Eirik

Martina wrote:

> Hallo Eric,
>
> I just tried the same. It takes a while and produces a warning, but 
> this (from the docu) worked:
>
> INFILE   = 'fastaTest.txt'
> from Bio import Fasta
> from Bio.Blast import NCBIWWW
>
> file_for_blast = open(INFILE, 'r')
> f_iterator = Fasta.Iterator(file_for_blast)
> f_record = f_iterator.next()
> b_results = NCBIWWW.qblast('blastn', 'month', f_record)
> save_file = open('my_blast.out', 'w')
> blast_results = b_results.read()
> save_file.write(blast_results)
> save_file.close()
>
> So the problem must be the parsing of the results, not the qblast.


From idoerg at burnham.org  Tue Feb 22 13:03:21 2005
From: idoerg at burnham.org (Iddo Friedberg)
Date: Tue Feb 22 12:58:32 2005
Subject: [BioPython] Re: Is the bug still there??
In-Reply-To: <421AF065.5090209@student.umb.no>
References: <421AF065.5090209@student.umb.no>
Message-ID: <421B73E9.4000005@burnham.org>

Eirik,

I can't seem to duplicate your bug. Can you email me (not the list) your 
FASTA file ?

I am very sorry for your frustration. Thanks for your patience and for 
testing this.


Best,

Iddo

Eirik S?nneland wrote:

> Hi!
>
> Thanks for new release of biopython. Still trying to do a "simpel" 
> Blast search using qblast and the exampel code given in documentation 
> at biopython.org:
> *******************
> import sys
> from Bio.Blast import NCBIWWW
> from Bio import Fasta
>
> file_for_blast = open('Fastaformat.txt', 'r')
> f_iterator = Fasta.Iterator(file_for_blast)
> f_record = f_iterator.next()
>
> b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>
> b_record = NCBIWWW.BlastParser().parse_str(b_results)
>
> E_VALUE_THRESH = 0.04
>
> for alignment in b_record.alignments:
>    for hsp in alignment.hsps:
>        if hsp.expect < E_VALUE_THRESH:
>            print '****Alignment****'
>            print 'sequence:', alignment.title
>            print 'length:', alignment.length
>            print 'e value:', hsp.expect
>            print hsp.query[0:75] + '...'
>            print hsp.match[0:75] + '...'
>            print hsp.sbjct[0:75] + '...'
> ****************
> This gives following error message(what have I done wrong? Is the bug 
> still there??):
>
>
> Warning (from warnings module):
>  File "C:\Python24\lib\site-packages\Bio\Blast\NCBIWWW.py", line 1062
>    warnings.warn("qblast works only with blastn and blastp for now.")
> UserWarning: qblast works only with blastn and blastp for now.
>
> Traceback (most recent call last):
>  File "C:\Python24\MyWorkspace.py", line 23, in -toplevel-
>    b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 1081, 
> in qblast
>    rid, rtoe = _parse_qblast_ref_page(handle)
>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 1152, 
> in _parse_qblast_ref_page
>    return rid, int(rtoe)
> ValueError: invalid literal for int(): 1.1 200 OK
>
> Date: Tue, 22 Feb 2005 08:28:44 GMT
>
> Server: Apache/1.3.27 (Unix) mod_fastcgi/2.4.0
>
> Content-Type: text/html
>
> Via: 1.1 www.ncbi.nih.gov
>
> X-Cache: MISS from www.ncbi.nih.gov
>
> Connection: cl
> ********************
> Please advice!
>
> Regards,
> Eirik
>
>


-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP

From sameet at nccs.res.in  Tue Feb 22 14:28:41 2005
From: sameet at nccs.res.in (Sameet Mehta)
Date: Tue Feb 22 14:22:08 2005
Subject: [BioPython] Regarding Blast and its output parsing
In-Reply-To: <200502221801.j1MI0mKu011202@portal.open-bio.org>
References: <200502221801.j1MI0mKu011202@portal.open-bio.org>
Message-ID: <421B87E9.6040609@nccs.res.in>

Dear all,
Can the entire qblast API be used with Biopython.  I just downloaded and 
installed the latest version, before that i had installed the latest 
CVS.  But there doesnt seem to be a way to blast a particular genome 
using biopython.  Is there a way out.

regards
Sameet
biopython-request@portal.open-bio.org wrote:

>Send BioPython mailing list submissions to
>	biopython@biopython.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>	http://biopython.org/mailman/listinfo/biopython
>or, via email, send a message with subject or body 'help' to
>	biopython-request@biopython.org
>
>You can reach the person managing the list at
>	biopython-owner@biopython.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of BioPython digest..."
>
>
>Today's Topics:
>
>   1. Re: [Biopython-dev] [Fwd: Question to code] (Iddo Friedberg)
>   2. Bio.Blast.NCBIWWW.blast returns before search is	complete
>      (Noah Hoffman)
>   3. Re: Bio.Blast.NCBIWWW.blast returns before search is	complete
>      (Iddo Friedberg)
>   4. biopython + python 2.4? (Michael George Lerner)
>   5. Is the bug still there?? (Eirik S?nneland)
>   6. Re: Is the bug still there?? (Eirik S?nneland)
>   7. Re: Is the bug still there?? (Iddo Friedberg)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Thu, 17 Feb 2005 09:36:14 -0800
>From: Iddo Friedberg 
>Subject: [BioPython] Re: [Biopython-dev] [Fwd: Question to code]
>To: Eirik S?nneland ,
>	biopython@biopython.org
>Message-ID: <4214D60E.40507@burnham.org>
>Content-Type: text/plain; charset=UTF-8; format=flowed
>
>Eirik,
>
>Yes, you got that because you are probably using the 1.30 release 
>version, which does not include qblast. Normally I would recommend 
>checking out a new version form CVS. But these days the CVS is in 
>constant flux because we're racing to make the release deadline. Best 
>wait until Friday. (Saturday in Norway).
>
>In most other cases, you can downlaod a tarball from:
>
>http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/biopython.tar.gz?tarball=1&cvsroot=biopython
>
>This you can open with winzip, but I am not sure about how to go about 
>installation from source in Windows.
>
>Thank you for your patience. And for drawing our attention to that bug.
>
>
>Best,
>
>Iddo
>
>
>
>
>
>
>Eirik S??nneland wrote:
>
>  
>
>>Iddo!
>>
>>Not to familiar with use of CVS...is there an easy why to do this in 
>>windows? I tried your new code and got:
>>
>>Traceback (most recent call last):
>>  File "C:\Python24\MyWorkspace.py", line 23, in -toplevel-
>>    b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>>AttributeError: 'module' object has no attribute 'qblast'
>>
>>Yes I can wait to Friday, but since I'm using biopython in my master 
>>it might be good to use CVS to always have the latest version??
>>
>>Thanks,
>>Eirik
>>
>>Iddo Friedberg wrote:
>>
>>    
>>
>>>OK, I fixed that.
>>>
>>>Eirik, you can check out a copy fom CVS, or wait for the Friday release.
>>>
>>>
>>>
>>>./I
>>>
>>>
>>>Frank Kauff wrote:
>>>
>>>      
>>>
>>>>Eirik,
>>>>
>>>>Try if the code works with
>>>>
>>>>b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>>>>
>>>>instead of
>>>> 
>>>>
>>>>        
>>>>
>>>>>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
>>>>>
>>>>>  
>>>>>          
>>>>>
>>>>I think that issue appeared a couple of months ago on the biopython 
>>>>list, essentially saying that
>>>>qblast is the blast NCBI wants people to use for blast scripts? 
>>>>After that, qblast method was added
>>>>to NCBIWWW, and it's what I'm using in my blast scripts.
>>>>
>>>>Hope this helps,
>>>>Frank
>>>>
>>>>On Wed, 2005-02-16 at 14:02 -0800, Iddo Friedberg wrote:
>>>> 
>>>>
>>>>        
>>>>
>>>>>OK, this is a real bug. NCBIWWW seems to be broken.
>>>>>
>>>>>I'm having a looksee, but I'd like someone more versed in this than 
>>>>>me to do so.
>>>>>
>>>>>Thanks,
>>>>>
>>>>>Iddo
>>>>>
>>>>>
>>>>>
>>>>>-------- Original Message --------
>>>>>Subject:     Question to code
>>>>>Date:     Wed, 16 Feb 2005 15:19:57 +0100
>>>>>From:     Eirik S??nneland 
>>>>>To:     idoerg
>>>>>
>>>>>
>>>>>
>>>>>Dear Freidberg,
>>>>>
>>>>>I've been having problems parsing my output from NCBI using the 
>>>>>example code given in Biopython Cookbook. Therefore I tried to 
>>>>>follow your code described in "Genome Informatics 14(2003). Still I 
>>>>>get an error message connected to the parsing. Could you please 
>>>>>give a hint on what is wrong? Is this a bug?? Code and output as 
>>>>>follows:
>>>>>
>>>>>Code:
>>>>>
>>>>>from Bio.Blast import NCBIWWW
>>>>>from Bio import Fasta
>>>>>
>>>>>file_for_blast = open('Fastaformat.txt', 'r')
>>>>>f_iterator = Fasta.Iterator(file_for_blast)
>>>>>f_record = f_iterator.next()
>>>>>
>>>>>b_results = NCBIWWW.blast('blastn', 'nr', f_record).read()
>>>>>
>>>>>b_record = NCBIWWW.BlastParser().parse_str(b_results)
>>>>>
>>>>>Output(Have cut out the beginning, only pasted the last part of 
>>>>>output):
>>>>>
>>>>>
>>>>>Score = 40.1 bits (20), Expect = 6.3
>>>>>Identities = 20/20 (100%)
>>>>>Strand = Plus / Minus
>>>>>
>>>>>                                Query: 29     ctgcagctcgggctcctgcc 48
>>>>>             ||||||||||||||||||||
>>>>>Sbjct: 150928 ctgcagctcgggctcctgcc 150909
>>>>>
>>>>> >>>>> >>>>>
>>>>> >>>>>
>>>>>Lambda     K      H
>>>>>   1.37    0.711     1.31
>>>>>
>>>>>Gapped
>>>>>Lambda     K      H
>>>>>   1.37    0.711     1.31
>>>>>
>>>>>Matrix: blastn matrix:1 -3
>>>>>Gap Penalties: Existence: 5, Extension: 2
>>>>>Number of Sequences: 2894376
>>>>>Number of Hits to DB: 6,089,259
>>>>>Number of extensions: 328661
>>>>>Number of successful extensions: 6259
>>>>>Number of sequences better than 10.0: 2
>>>>>Number of HSP's better than 10.0 without gapping: 2
>>>>>Number of HSP's gapped: 6259
>>>>>Number of HSP's successfully gapped: 2
>>>>>Number of extra gapped extensions for HSPs above 10.0: 6255
>>>>>Length of query: 600
>>>>>Length of database: 13,294,103,689
>>>>>Length adjustment: 22
>>>>>Effective length of query: 578
>>>>>Effective length of database: 13,230,427,417
>>>>>Effective search space: 7647187047026
>>>>>Effective search space used: 7647187047026
>>>>>A: 0
>>>>>X1: 11 (21.8 bits)
>>>>>X2: 15 (30.0 bits)
>>>>>X3: 25 (50.0 bits)
>>>>>S1: 14 (25.0 bits)
>>>>>S2: 20 (40.1 bits)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>Traceback (most recent call last):
>>>>> File "C:\Python24\MyWorkspace.py", line 50, in -toplevel-
>>>>>   b_record = NCBIWWW.BlastParser().parse_str(b_results)
>>>>> File "C:\Python24\Lib\site-packages\Bio\ParserSupport.py", line 
>>>>>52, in parse_str
>>>>>   return self.parse(File.StringHandle(string))
>>>>> File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 
>>>>>47, in parse
>>>>>   self._scanner.feed(handle, self._consumer)
>>>>> File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 
>>>>>99, in feed
>>>>>   self._scan_rounds(uhandle, consumer)
>>>>> File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 
>>>>>242, in _scan_rounds
>>>>>   self._scan_alignments(uhandle, consumer)
>>>>> File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 
>>>>>322, in _scan_alignments
>>>>>   raise SyntaxError, "Cannot resolve location at line:\n%s" % line1
>>>>>SyntaxError: Cannot resolve location at line:
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>Thanks!
>>>>>
>>>>>Regards,
>>>>>Eirik
>>>>>
>>>>>
>>>>>  
>>>>>          
>>>>>
>>>      
>>>
>
>
>  
>

From bartek at rezolwenta.eu.org  Tue Feb 22 17:55:10 2005
From: bartek at rezolwenta.eu.org (bartek wilczynski)
Date: Tue Feb 22 17:48:57 2005
Subject: [BioPython] CompareACE support in biopython
In-Reply-To: <421B77A2.60308@burnham.org>
References: <421650F8.9030204@burnham.org>
	<1109082274.421b40a2df6e8@imp.rezolwenta.eu.org>
	<421B77A2.60308@burnham.org>
Message-ID: <1109112910.421bb84e851a6@imp.rezolwenta.eu.org>

Hi all,

In order to get it into the 1.4 release, I've just uploaded a small extension of
mine Bio.AlignAce module. It's a very simple interface for CompareACE,  a
program for comparing different sequence motifs.

As the module is very simple it should not cause any problems with the release.

-- 
cheers
   Bartek

From idoerg at burnham.org  Tue Feb 22 17:53:49 2005
From: idoerg at burnham.org (Iddo Friedberg)
Date: Tue Feb 22 18:03:50 2005
Subject: [BioPython] Regarding Blast and its output parsing
In-Reply-To: <421B87E9.6040609@nccs.res.in>
References: <200502221801.j1MI0mKu011202@portal.open-bio.org>
	<421B87E9.6040609@nccs.res.in>
Message-ID: <421BB7FD.50804@burnham.org>

Sameet Mehta wrote:

> Dear all,
> Can the entire qblast API be used with Biopython.  I just downloaded 
> and installed the latest version, before that i had installed the 
> latest CVS.  But there doesnt seem to be a way to blast a particular 
> genome using biopython.  Is there a way out.
>
> regards
> Sameet


It's slightly unclear what you are trying to do, and the actual answer 
would vary by that:

1) Are you trying to blast a single sequence (or a collection of 
sequences) against a genome? Or vice -versa?

2) Do you want to do this with a standalone BLAST, or over the web?

Best,

Iddo


-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP

From idoerg at burnham.org  Wed Feb 23 21:51:19 2005
From: idoerg at burnham.org (Iddo Friedberg)
Date: Wed Feb 23 21:46:29 2005
Subject: [BioPython] Biopython 1.40 beta released
Message-ID: <421D4127.7010004@burnham.org>

We are pleased to announce the release of  Biopython 1.40 beta. It has 
been nine months since the last official release, and there are numerous 
changes, bugfixes, enhancements, goodies and new contributors. Most 
notable are the addition of the Nexus parser (Frank Kauff w/ Cymon Cox) 
, the CAPS module (Jonathan Taylor), the Restriction enzyme package 
(Frederic Sohm), hefty improvements to Bio.PDB (Thomas Hamelryck), 
MutableSeq (Michiel de Hoon), and more. The delay in the release was 
caused by day jobs creeping into the lives of most core developers. So 
we are very happy with this release finally out, and we hope to have the 
non-beta out soon.

Too many people to thank, so I'll mention only handful: Michiel and 
Thomas, thanks for keeping tabs on things during the release process; 
Jonathan and Frank, thanks for the new modules. Jeff Chang, thanks for 
all the help and pointers in getting the release out, and for the 
documentation you wrote for theat purpose. Thanks to all the developers 
for making this happen, and apologies for not mentioning you all by name 
and work. There are >170 members on the developers mailing list,  46 
people in the CONTRIB file, and if you feel you should be there and 
you're not, let me know. Finally, thanks to Jeff (again) Andrew and Brad 
for making this project so robust that even putting me in charge did not 
screw it up.


Peace,

Iddo

-- 

Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037
Tel: (858) 646 3100 x3516
Fax: (858) 713 9930
http://ffas.ljcrf.edu/~iddo

From thamelry at binf.ku.dk  Mon Feb 28 06:24:10 2005
From: thamelry at binf.ku.dk (Thomas Hamelryck)
Date: Mon Feb 28 06:50:54 2005
Subject: [BioPython] PSI-BLAST
Message-ID: <200502281224.10301.thamelry@binf.ku.dk>


Hi,

Does anybody have a small example available of how
to do an online PSI-BLAST search from a Seq object?
I'm having trouble getting it to work based on the cookbook
examples.

Cheers,

-Thomas