[BioPython] SwissProt

Jeffrey Chang jchang@SMI.Stanford.EDU
Sun, 19 Mar 2000 22:08:57 -0800 (PST)


On Sun, 19 Mar 2000, Cayte wrote:

>   So far, my tests have shown these mismatches.  I don't understand
> the third.  Is there a non-printing character in the text?  The file
> is o59832.sp. I've already posted it to
> ftp://bio.perl.org/pub/katel/SwissProt/
> 
> C:\BIOPYT~1\UnitTests\UnitTestCase.py assert_equals 72
> SwissProtTestCase.py test_organelle 111
> expected is ['Tight junction', 'Transmembrane.'] actual is ['Transmembrane.\012'
> ]

I'm not sure I understand this output.  It seems like this goes with
test_keywords, and the next error message goes with test_accessions.
However, the groupings of the lines seem to suggest otherwise.  Am I not
understanding things correctly?

Yep, this is definitely broken.  I've made the fixes and checked them into
CVS.


> C:\BIOPYT~1\UnitTests\UnitTestCase.py assert_equals 72
> SwissProtTestCase.py test_keywords 135
> expected is ['O59832'] actual is ['']

Yep, this fix too.


> C:\BIOPYT~1\UnitTests\UnitTestCase.py assert_equals 72
> SwissProtTestCase.py test_accessions 89
> expected is Homo sapiens (Human). actual is Homo sapiens (Human).

Yeah, I'm not sure what's going on here.  When reporting values of
variables, try using the repr function.  This will output strings without
any character interpretation.

>>> a = 'hello world!\n'
>>> print repr(a)
'hello world!\012'
>>> 

Another things I've noticed from 095832 is that it has unusually
problematic database cross reference lines!  I guess that's why you chose
this entry.  I made some changes so the parser will handle these better.

I've also made some fixes so that the parser now strips the trailing
newlines at the end of some strings.

So when are you going to get write access so you can integrate your
testing code into the CVS tree?  :)

Jeff