[Biopython-dev] [Bug 2833] Features insertion on previous bioentry_id

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Thu May 21 10:34:46 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2833





------- Comment #6 from andrea at biodec.com  2009-05-21 06:34 EST -------
Hi Peter,
i did 4 tests: [python2.4,python2.5]*[psycopg,psycopg2]
with 
 - biopython from "this morning" cvs.
 - psycopg.__version__  '1.1.21'
 - psycopg2.__version__ '2.0.7 (dec mx dt ext pq3)'

in any case i've the same results:

Make sure all records are correctly loaded. ... ok
Make sure can't import records twice. ... FAIL
Indepth check that SeqFeatures are transmitted through the db. ... ok
Load SeqRecord objects into a BioSQL database. ... ok
Get a list of all items in the database. ... ok
Test retrieval of items using various ids. ... ok
Check can add DBSeq objects together. ... ok
Check can turn a DBSeq object into a Seq or MutableSeq. ... ok
Make sure Seqs from BioSQL implement the right interface. ... ok
Check SeqFeatures of a sequence. ... ok
Make sure SeqRecords from BioSQL implement the right interface. ... ok
Check that slices of sequences are retrieved properly. ... ok

======================================================================
FAIL: Make sure can't import records twice.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_BioSQL.py", line 374, in test_reload
    self.assert_("duplicate" in str(err).lower())
AssertionError

----------------------------------------------------------------------
Ran 12 tests in 23.815s

FAILED (failures=1)

i've 1 failure in "Make sure can't import records twice. ..." it seems
interesting
for the problem...




Then i tried with python2.4, python2.5, psycopg, psycopg2

i attached the pickles of the 3 seqrecords so you can try by yourself...

###########################################################
from BioSQL import BioSeqDatabase
import cPickle

server = BioSeqDatabase.open_database(driver = "psycopg2", user = 'postgres',
passwd = "hidden", host = "dbservertest", db = 'test_biosql' )

## LOAD SeqRecords from pickle
s1=cPickle.load(open('s1.cpk'))
s2=cPickle.load(open('s2.cpk'))
s3=cPickle.load(open('s3.cpk'))

## LOAD INTO DB 
db=server.new_database('test')
server.commit()
db.load([s1])
db.load([s2])
db.load([s3])
db.adaptor.commit()
###########################################################


I had always the same problem.

So i prepare a buildout environment with the last Biopython
and with a new psycopg2 library (for psycopg i had the latest).

psycopg2.__version__ '2.0.11 (dt dec ext pq3)'

The result from the test was the same
The result from the upload (based on pickled seqrecords) was the same

Thanks
Andrea


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list