Brad Chapman | 3 Feb 04:54 2004
Picon

Re: hmmpfam parser

Hi Wagied;

> I have some code which is able to parse hmmer output,
> as well as code donated by Joanne Adamkewicz from Exilexis.
> 
> If you guys/gals find it useful, updates and modification will be done!

Thanks for sending this -- hmmpfam parsing code in Biopython is
definitely something we need. A few notes on what you sent:

1. I'm guessing that PfamParser.py and ExPFam.py are completely
separate pieces of code (except for both dealing with parsing Pfam).
For Biopython, the PfamParser.py is the more generally useful piece
of code since it provides an interface to parse a hmmpfam result
into a record-like object. So I'll probably restrict my comments to
that code.

2. Is there an methodology that you use to iterate over a file full
of hmmpfam results? Normally most parsers in Biopython include a
parser for individual records and then an iterator so that you can
apply the parser to a file full of results.

3. Some of the code does not follow the naming conventions that we
normally use in Biopython. Specifically:

a. Functions should be lowercase_separated_by_underscores style.

b. Variables should be lowercase_underscores style or alltogether
style. One of the things which was confusing to me in your code is
that you alternate between the lowercase_underscores style and
(Continue reading)

Brad Chapman | 3 Feb 05:01 2004
Picon

Explanation for late responses to development list mails

Hey all;
I just realized (with the help of good Jeff as always) that my mails
to the development list have been getting discarded for the past month or 
so. Apparently I write a lot like automated spammers -- man, am I
feelin' some self-confidence now :-).

But the point is that I'm going to try and dig through my sent box
and forward on some mails which never saw the light of day. So, if
some responses I send now seem especially non-timely, I blame it
entirely on the e-mail system and not my slacking.

Sorry about this -- if anything you may have wrote to the
development list got no attention make sure to send me a mail so
that I know about it. Thanks!

Brad
Brad Chapman | 3 Feb 05:02 2004
Picon

Re: Bio.Wise checked in

Hi Michael;

> I have checked in Bio.Wise, which contains modules for running and
> processing the output of some of the models in the Wise package
> available from
> <ftp://ftp.ebi.ac.uk/pub/software/unix/wise2/wise2.2.0.tar.gz>:
> 
> Bio.Wise.psw for protein Smith-Waterman alignments
> Bio.Wise.dnal for Smith-Waterman DNA alignments

Great! Thanks for doing this!

> There are also appropriate unit tests which will not be checked if
> dnal is not in your path.

Right now I don't have wise installed and I am getting the test
failing instead of skipping it:

7:38pm Tests> python run_tests.py test_Wise.py
test_Wise ... dnal: not found
FAIL

======================================================================
FAIL: test_Wise
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 148, in runTest
    self.runSafeTest()
  File "run_tests.py", line 185, in runSafeTest
    expected_handle)
(Continue reading)

Brad Chapman | 3 Feb 05:04 2004
Picon

Re: Contribution -- NMR xpk files

Hi Bob and all;

> I have contributed some code to biopython for working with NMR data to be 
> included in the CVS, probably in the NMR package.  Along with the two 
> modules (xpktools.py and NOEtools.py) is an example script 
> (simplepredict.py) and an input file (noed.xpk).  I think you will find 
> the example script to be well documented and readable.

Great! Thanks for sending this my way. I've checked the modules into
Bio.NMR and the example code and input file now live in
Doc/examples/nmr. Everything seems to work on my machine (well, at
least it runs without any errors -- without any NMR knowledge I'm
not so good at interpreting the output :-), but if you could check
and be sure I didn't mess anything that would be great. It looks
like everything has already migrated over to anonymous CVS.

> This new functionality will enable biopython users to perform analysis 
> and data extraction of NMR data whether in the form of data tables or 
> directly from .xpk peaklist files.

Again, we really appreciate this. As with everything in Biopython it
takes the specific knowledge about an area to have code that handles
the bioinformatics challenges well. Go NMR, go.

Well-at-least-I-know-what-NMR-stands-for-ly yr's,
Brad
Iddo Friedberg | 3 Feb 05:13 2004

Re: Explanation for late responses to development list mails


On Mon, 2 Feb 2004, Brad Chapman wrote:

> Hey all;
> I just realized (with the help of good Jeff as always) that my mails
> to the development list have been getting discarded for the past month or 
> so. Apparently I write a lot like automated spammers -- man, am I
> feelin' some self-confidence now :-).

I told you to change the name for the new V1agraPr0nStar class...

(Let's see if this makes it to the list)

false-negatively-y'rs,

Iddo
Michael Hoffman | 3 Feb 10:14 2004
Picon
Picon

Re: Bio.Wise checked in

On Mon, 2 Feb 2004, Brad Chapman wrote:

> >>> commands.getoutput("dnal")
> 'dnal: not found'
>
> I changed requires_wise.py a bit so it takes care of this case. So
> just a minor thing.

Thanks!
--

-- 
Michael Hoffman <hoffman <at> ebi.ac.uk>
European Bioinformatics Institute
Brad Chapman | 5 Feb 01:04 2004
Picon

Re: hmmpfam parser

Hi Wagied;

> ExPfam is code donated by Joanne Adamkewicz at Exelixis. I guess
> they use it at the "module" level rather than at the class level.

Okay. Thanks makes more sense now. This would need a bit of work to
be "Biopython-like." It does do a good job of solving a particular
problem, but normally we try to focus the code that gets in on being
as broadly applicable as possible (hence the emphasis on parsers and
iterators and the like).

> The record/entry structurs are ideally collected in a hash...let me
> check the code..will write than in!

I'm not sure what exactly you mean here. What does this refer to?

> I can write in an Iterator object to traverse the records, if that is
> necessary.

It would be really nice to have -- I think the most common usecase
(at least in my experience with hmmpfam) is to have a file full of
searches that need to be parsed out. It would really expand the
useability of the code.

> Mmhhh you noticed.-..the Java-like coding....I generally try to prevent 
> direct access of class instance variables, rubbed off from Java.

Yes, this really isn't necessary in Biopython. It isn't terrible to
have (in addition to direct attribute access), but does require extra 
work coding all those functions up. Generally, the Python viewpoint
(Continue reading)

Michael Hoffman | 5 Feb 10:20 2004
Picon
Picon

Re: hmmpfam parser

On Wed, 4 Feb 2004, Brad Chapman wrote:

> > Mmhhh you noticed.-..the Java-like coding....I generally try to prevent
> > direct access of class instance variables, rubbed off from Java.
>
> Yes, this really isn't necessary in Biopython. It isn't terrible to
> have (in addition to direct attribute access), but does require
> extra work coding all those functions up. Generally, the Python
> viewpoint on this is that you "trust" users of your code to access
> the variables correctly. Compared to Java coders we tend to be a bit
> more easygoing about that sort of thing.

It is also worth noting that, unlike in Java, if you need to add
accessor methods in later to do some processing you can always do so
by changing the attribute into a property.

http://www.python.org/2.2.1/descrintro.html#property

This should get you all of the benefits of encapsulation later if you
want it without having to deal with all of the cruft. Until then,
YAGNI (you aren't gonna need it).
--

-- 
Michael Hoffman <hoffman <at> ebi.ac.uk>
European Bioinformatics Institute
Brad Chapman | 6 Feb 17:29 2004
Picon

Re: biopython database connectivity error

Hello Chidambaram;

>       i have insattled pyhton biopython and all the necessary modules but i 
> cannot connect to the database iam getting errors i dont know why
[...]
> ython 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from BioSQL import BioSeqDatabase
> >>> server = BioSeqDatabase.open_database(driver ="MySQLdb", user = "chapmanb",
> ...             passwd = "biopython", host = "localhost", db= "bioseqdb")
> Traceback (most recent call last):
>   File "<stdin>", line 2, in ?
>   File "C:\PROGRA~1\Lib\site-packages\BioSQL\BioSeqDatabase.py", line 51, in 
> ope
> n_database
>     conn = connect(**kw)
>   File "C:\PROGRA~1\Lib\site-packages\MySQLdb\__init__.py", line 63, in Connect
>     return apply(Connection, args, kwargs)
>   File "C:\PROGRA~1\Lib\site-packages\MySQLdb\connections.py", line 58, in 
> __ini
> t__
>     self._db = apply(connect, args, kwargs2)
> _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server 
> on 'localhost' (10061)")

The problem is not a biopython one, but rather a MySQL one. The
relevant error is the last line:

"Can't connect to MySQL server on 'localhost' (10061)"

(Continue reading)

Antonio Cavallo | 11 Feb 14:02 2004
Picon
Picon

(no subject)


Hy,

there is my problem.
I would like to retrieve some accessions from embl data source, and I've 
read the tutorial so:

==================================================================================
>>> from Bio import db  
>>> sp = db["embl"]
>>> record_handle = sp['AA054823']
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File 
"/home/users/antonio/usr/encap/biopython-1.23/lib/python/Bio/config/DBRegistry.py", 
line 152, in __getitem__
    data = self._run_serial(key)
  File 
"/home/users/antonio/usr/encap/biopython-1.23/lib/python/Bio/config/DBRegistry.py", 
line 219, in _run_serial
    raise KeyError, "I could not get any results."
KeyError: 'I could not get any results.'
==================================================================================

This error seems strange because that entry does exist!
Using other sources:

==================================================================================
>>> sp = db['embl-dbfetch-cgi']
>>> record_handle = sp['AA054823']
(Continue reading)


Gmane