[Biojava-l] BioJavaX-Hibernate: Namespace problem

mark.schreiber at novartis.com mark.schreiber at novartis.com
Sun Feb 12 20:15:44 EST 2006


Hello -

When you make a Sequence with DNATools it is not Rich and therefore has no 
namespace. When you enrich it biojava will give it the default namespace 
'lcl' or local. Thus when you add it to the DB you get it added under the 
lcl namespace.

I would make a new SimpleRichSequence instead. Then you can specify it's 
namespace.

- Mark





Felix Dreher <dreher at mpiib-berlin.mpg.de>
Sent by: biojava-l-bounces at portal.open-bio.org
02/11/2006 01:55 AM

 
        To:     biojava-l at biojava.org
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [Biojava-l] BioJavaX-Hibernate: Namespace problem


Hello,
I tried to create different virtual BioSQL-databases for the storage of 
different types of sequences. For testing purposes, I created and saved 
a new Namespace called 'mRNA'. I didn't find out though, how to save a 
newly created sequence inside this namespace.
I tried the following code block:

    Namespace nsp = new SimpleNamespace("mRNA");
    session.saveOrUpdate("Namespace", nsp);
    RichSequenceDB db = new BioSQLRichSequenceDB("mRNA", session);
    RichSequence seq = 
RichSequence.Tools.enrich(DNATools.createDNASequence("gattacagattaca","test"));
    db.addRichSequence(seq);
    tx.commit();

The Namespace and the sequence are actually being saved in the database, 
but the sequence is saved in the default namespace 'lcl' and not in the 
new namespace 'mRNA'.
Can someone tell me what I'm missing here?

Thanks in advance,
Felix


 

-- 
Felix Dreher
Max-Planck-Institute for Infection Biology
Campus Charité Mitte
Department of Immunology
Mailing address: Schumannstraße 21/22
Visitors: Virchowweg 12
10117 Berlin
Germany
Tel.: +49 (0)30 28460-254 / -494
Mobile: +49 (0)163 7542426

_______________________________________________
Biojava-l mailing list  -  Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l






More information about the Biojava-l mailing list