[BioSQL-l] problem loading NCBI_taxonomy database into BioSQL bioseqdb
Nick Matzke
matzke at berkeley.edu
Wed Sep 3 22:44:54 UTC 2008
Well, I'm not sure what I did, but some combination of these things
seems to have worked. Your guess is as good as mine...
1. moved the site/lib directory (which contains DBI.pm) to the front of
my PERL5LIB (which goes into @INC)
export
PERL5LIB=$PERL5LIB:/usr/local/ActivePerl-5.10/site/lib:/usr/local/ActivePerl-5.10/man/man3:/usr/local/ActivePerl-5.10/site/lib/Bundle
2. Checked to make sure DBI & DBD::mysql were installed
==========================================
mws2:/usr/local/ActivePerl-5.10/bin nick$ sudo perl -MCPAN -e 'install DBI'
CPAN: Storable loaded ok (v2.18)
Going to read /usr/local/Metadata
Database was generated on Mon, 01 Sep 2008 10:02:51 GMT
DBI is up to date (1.607).
mws2:/usr/local/ActivePerl-5.10/bin nick$ sudo perl -MCPAN -e 'install
DBD::mysql'
CPAN: Storable loaded ok (v2.18)
Going to read /usr/local/Metadata
Database was generated on Mon, 01 Sep 2008 10:02:51 GMT
DBD::mysql is up to date (4.008).
==========================================
3. (Make sure you have an empty version of the db, at least for me I got
errors if I had already loaded sequences etc. into it...I got errors
like this:
==========================================
note: node (28;331111;27;species;;) is retired; failed to delete: Cannot
delete or update a parent row: a foreign key constraint fails
(`bioseqdb/bioentry`, CONSTRAINT `FKtaxon_bioentry` FOREIGN KEY
(`taxon_id`) REFERENCES `taxon` (`taxon_id`))
note: node (70;300268;69;species;;) is retired; failed to delete: Cannot
delete or update a parent row: a foreign key constraint fails
(`bioseqdb/bioentry`, CONSTRAINT `FKtaxon_bioentry` FOREIGN KEY
(`taxon_id`) REFERENCES `taxon` (`taxon_id`))
note: node (77;3002
==========================================
4. Ran it again: (I also added '--host localhost')
mws2:/usr/local/ActivePerl-5.10/bin nick$ sudo perl
/bioinformatics/pythonstuff/biosql-1.0.0/scripts/load_ncbi_taxonomy.pl
--dbname bioseqdb --driver mysql --dbuser root --download true --host
localhost
Loading NCBI taxon database in taxdata:
... retrieving all taxon nodes in the database
... reading in taxon nodes from nodes.dmp
... insert / update / delete taxon nodes
... (committing nodes)
... rebuilding nested set left/right values
... reading in taxon names from names.dmp
... deleting old taxon names
... inserting new taxon names
... cleaning up
Done.
So thanks for the help, something or other worked!
Cheers,
Nick
More information about the BioSQL-l
mailing list