From: <jl...@vb...> - 2006-07-12 17:52:26
|
What I did to update taxonomy is to use SQL commnds. Assume you only have taxon_id on DoTS.Sequence table. 1. Backup your old taxon_id SQL>CREATE TABLE DoTS.NASequenceTaxonID AS select a.na_sequence_id, a.taxon_id, b.ncbi_tax_id from dots.nasequence a, sres.taxon b where a.taxon_id=b.taxon_id; 2. Delete taxon_id on DoTS.Sequence table SQL>update dots.nasequence set taxon_id = null; 3. Delete taxonomy data SQL>delete from sres.taxonname; SQL>delete from sres.taxon; 4.Run plugin to load new taxonomy data 5.Restore taxon_id on DoTS.Sequence table SQL>update dots.nasequence s set taxon_id=(select b.taxon_id from dots.nasequencetaxonid a, sres.taxon b where a.ncbi_tax_id=b.ncbi_tax_id and a.na_sequence_id=s.na_sequence_id); On Wed, July 12, 2006 1:31 pm, Josef Jurek wrote: > > "Kumar, Sanjeev" <San...@ng...> writes: > >> >> But I am getting a new type of error message, provided below. Can some >> one pl. help me in understanding/resolving the error message. >> >> >> GUS::Model::SRes::Taxon=3DHASH(0xa166cf8) merged with Taxon_id =3D >> GUS::Model::SRes::Taxon=3DHASH(0x9ee9e54) >> DBD::Oracle::db do failed: ORA-02292: integrity constraint >> (DOTS.NASEQUENCEIMP_FK02) violated - child record found (DBD >> ERROR:OCIStmtExecute) >> [for Statement "DELETE FROM >> SRes.Taxon WHERE taxon_id =3D 525455 >> "] at /home/oragus35/GUS/gus_home/lib/perl/GUS/ObjRelP/DbiDbHandle.pm >> line 119, <MERGED> line 5476. [...] >> > > I ran into this very same error as well. What is happening > is that LoadTaxon is attempting to delete obsolete taxonomy entries > _however_ some of these taxonomy > entries are still referenced by the TAXON_ID field of DoTS.NASequence. > > What LoadTaxon _should_ _do_ is update all places > in DoTS.NASequence/DoTS.AASequence (and possibly other tables) so that > obsolete taxonomy entries are replace in the tables that reference them > _before_ LoadTaxon tries to delete them > from SRes.Taxon. > > My jury-rig (and I do mean jury-rig) was > to run a perl script on merged.dmp to convert each data line to a SQL line > which might look like: > > update DoTS.ExternalAASequence set taxon_id = 255892 where taxon_id = > 256194; > > > thus, updating the taxon_id fields. > > When it comes to updating Taxonomy information > LoadTaxon does not appear to be very robust. > > > Josef > > > > > Josef Jurek, Ph.D. > > > Daphne Preuss Laboratory > Molecular Genetics and Cell Biology > The University of Chicago > ju...@cs... > > voice: (773) 702-9559 > fax: (773) 702-6648 > > > > > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? Get stuff done quickly with pre-integrated technology to make > your job easier Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > |