[BioSQL-l] update DBSeqRecords

Hilmar Lapp hlapp at gmx.net
Wed Feb 13 13:09:11 UTC 2008


As Peter says this is easily possible, simply delete the sequence  
(protein) first that you want to update and then reload it.

This is also called the 'refresh' mode of updating.

	-hilmar

On Feb 13, 2008, at 6:39 PM, Andreas De Stefani wrote:

> 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
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biosql-l

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================






More information about the BioSQL-l mailing list