[BioPython] Re: [BioSQL-l] python
Hilmar Lapp
hlapp at gnf.org
Mon Dec 8 12:40:54 EST 2003
Christen, I'm afraid there aren't too many python-savvy people on the
biosql list. I forwarded your email to the biopython folks, hoping that
they can help you better.
-hilmar
On Monday, December 8, 2003, at 05:57 AM, christen wrote:
> Hi there
>
> I am a new comer to python and biosql
>
> I have tried to get working biosql under mysql and python as ewplained
> in
> Basic BioSQL with Biopoython
> I have donwloaded the latest version of both, and tried the example
> with
> cor6_6.gb
>
> then I got numerous problems
>
> I fixed the first one by changing line 104 in cursors from
> if args is None:
> to :
> if args is None or args=='':
>
> then in Loader, in def _load_reference(self, reference, rank,
> bioentry_id):,
> i made the following changes (in particular replaced JOIN by INNER
> JOIN)
> if reference.medline_id:
> sql="SELECT reference_id" \
> " FROM reference INNER JOIN dbxref ON reference
> .dbxref_id
> = dbxref.dbxref_id" \
> " WHERE ((dbname = 'MEDLINE') AND (accession = %s))"
> refs =
> self.adaptor.execute_and_fetch_col0(sql,reference.medline_id)
>
>
> Now, I have one more pb:
>
> Traceback (most recent call last):
> File "C:\Python23\RC_databases\rc_BioSQL_GenBank.py", line 21,
> in -toplevel-
> db.load(iterator)
> File "C:\Python23\lib\site-packages\BioSQL\BioSeqDatabase.py", line
> 343,
> in load
> db_loader.load_seqrecord(cur_record)
> File "C:\Python23\lib\site-packages\BioSQL\Loader.py", line 46, in
> load_seqrecord
> self._load_seqfeature(seq_feature, seq_feature_num, bioentry_id)
> File "C:\Python23\lib\site-packages\BioSQL\Loader.py", line 366, in
> _load_seqfeature
> self._load_seqfeature_locations(feature, seqfeature_id)
> File "C:\Python23\lib\site-packages\BioSQL\Loader.py", line 409, in
> _load_seqfeature_locations
> self._insert_seqfeature_location(feature, 1, seqfeature_id)
> File "C:\Python23\lib\site-packages\BioSQL\Loader.py", line 430, in
> _insert_seqfeature_location
> self.adaptor.execute(sql, (seqfeature_id, start, end, strand,
> rank))
> File "C:\Python23\lib\site-packages\BioSQL\BioSeqDatabase.py", line
> 223,
> in execute
> self.cursor.execute(sql, args)
> File "C:\Python23\lib\site-packages\MySQLdb\cursors.py", line 95, in
> execute
> return self._execute(query, args)
> File "C:\Python23\lib\site-packages\MySQLdb\cursors.py", line 119, in
> _execute
> self.errorhandler(self, exc, value)
> File "C:\Python23\Lib\site-packages\MySQLdb\connections.py", line
> 33, in
> defaulterrorhandler
> raise errorclass, errorvalue
> OperationalError: (1048, "Le champ 'strand' ne peut \xeatre vide
> (null)")
>
>
> I am for the time being only trying some quick and dirty (like
> modification
> of cursor instead of loader I guess...) changes to try to get it
> working
> My questions are :
> Is there somebody else having trouble, or do you I miss something ?
> If I did it right, Is there somebody else trying to fix these problems
> ?
> If things need some help, it would be very nice to have some clear
> description of biosql structure. I have not been able to find it.
> Somebody
> could help ?
>
> thanks in advance
>
>
>
>
>
> Richard CHRISTEN
> Champion de saut en largeur
> UMR6543 CNRS - Université de Nice Sophia Antipolis
>
> Centre de Biochimie
> Parc Valrose
> 06108 Nice cedex2
>
> tel 33 - 492 076 947
> fax 33 - 492 076 408
>
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l at open-bio.org
> http://open-bio.org/mailman/listinfo/biosql-l
>
--
-------------------------------------------------------------
Hilmar Lapp email: lapp at gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------
More information about the BioPython
mailing list