[BioSQL-l] Problem With the Bio::Seq::RichSeq object.

Frederic Pecqueur FredericP at DEVGEN.com
Fri Oct 17 06:42:18 EDT 2003


Hi all,

Here is my problem :

I wish insert a Bio::Seq::RichSeq object in my BioSQL database, but it doesn't work.

I use this code source :

my $db = Bio::DB::BioDB->new(-database => "biosql",
                             -host     => $host,
                             -dbname   => $dbname,
                             -driver   => $driver,
                             -user     => $dbuser,
                             -pass     => $dbpass,
                             );

my $pseq = $db->create_persistent($richSeq);
$pseq->namespace($namespace);
$pseq->store();

When I execute my script I find these errors :

DBD::Oracle::st execute failed: ORA-01400: cannot insert NULL into ("BIOSQL"."SG_SEQFEATURE"."SOURCE_TRM_OID") (DBD ERROR: OCIStmtExecute) [for statement ``INSERT INTO seqfeature (display_name, rank, ent_oid, type_trm_oid, source_trm_oid) VALUES (?, ?, ?, ?, ?)'' with params: :p4=11, :p5=undef, :p1=undef, :p2=1, :p3='1909725']) at /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/BaseDriver.pm line 1001.
Use of uninitialized value in join or string at /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/BaseDriver.pm line 1835.

-------------------- WARNING ---------------------
MSG: insert in Bio::DB::BioSQL::SeqFeatureAdaptor (driver) failed, values were ("","1") FKs (1909725,11,<NULL>)
ORA-01400: cannot insert NULL into ("BIOSQL"."SG_SEQFEATURE"."SOURCE_TRM_OID") (DBD ERROR: OCIStmtExecute)
---------------------------------------------------

------------- EXCEPTION  -------------
MSG: create: object (Bio::SeqFeature::Generic) failed to insert or to be found by unique key
STACK Bio::DB::BioSQL::BasePersistenceAdaptor::create /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:207
STACK Bio::DB::BioSQL::BasePersistenceAdaptor::store /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:253
STACK Bio::DB::Persistent::PersistentObject::store /usr/lib/perl5/site_perl/5.6.1/Bio/DB/Persistent/PersistentObject.pm:270
STACK Bio::DB::BioSQL::SeqAdaptor::store_children /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/SeqAdaptor.pm:246
STACK Bio::DB::BioSQL::BasePersistenceAdaptor::create /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:215
STACK Bio::DB::BioSQL::BasePersistenceAdaptor::store /usr/lib/perl5/site_perl/5.6.1/Bio/DB/BioSQL/BasePersistenceAdaptor.pm:253
STACK Bio::DB::Persistent::PersistentObject::store /usr/lib/perl5/site_perl/5.6.1/Bio/DB/Persistent/PersistentObject.pm:270
STACK toplevel ./test.pl:60

When I tranform my RichSeq object to a Bio::SeqIO object with the genbank format, I can use the load_seqdatabase.pl script to load my Information with none errors.

But I would wish to insert my RichSeq object directly in the BioSQL database. (I don't need of Genbank file)

Thanks for your help.
Frédéric.









More information about the BioSQL-l mailing list