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

Hilmar Lapp hlapp at gnf.org
Fri Oct 17 13:55:42 EDT 2003


It looks like you have at least one seqfeature that doesn't have the source
tag set ($feature->source_tag()). The source tag is mandatory for biosql.

Let me know if that's not the problem.

BTW round-tripping through genbank format solves this because on re-import
the genbank parser sets a default source tag.

    -hilmar

On 10/17/03 3:42 AM, "Frederic Pecqueur" <FredericP at DEVGEN.com> wrote:

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

-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------






More information about the BioSQL-l mailing list