[BioSQL-l] update DBSeqRecords
Andreas De Stefani
andreas.destefani at ucd.ie
Wed Feb 13 09:39:35 UTC 2008
Hi Guys,
I was wondering if it is possible to update a single DBSeqRecord,
without having to delete the whole sub datbase first...
I am using BioPython and BioSQL and what I intend todo is to create a
local "cache" for protein informations which i get from the web, and
after a month or so i would like to re-fetch the info from the web and
update the local protein information "cache" (which uses BioSQL).
It basically will work like this:
if the user requests information for a certain protein the program
queries the local DB using the accession number and sees if there is
information about the protein, if not (or if the protein is expired, ie
older than a month) it gets the info from the web (expasy) and loads
(updates the protein information in) the local database. However, is a
update of a single protein entry possible? when inserting the same
protein i get the following error:
(<class '_mysql_exceptions.IntegrityError'>, IntegrityError(1062,
"Duplicate entry 'P08317-1-0' for key 2"), <traceback object at 0xd6b170>)
i am just using db.load(...) again, but maybe there is another way to
update entries?
Hope somebody can help me with this, thanks very much in advance!
Andy
More information about the BioSQL-l
mailing list