[Biojava-dev] Biojava3 and BioSQL
Simon Foote
simon.foote at nrc-cnrc.gc.ca
Thu May 31 13:19:01 UTC 2012
Thought I'd throw in my 2cents also, even though I haven't worked
extensively with the BioSQL in biojava for awhile.
I have web-based genome browser that was written way back in the biojava
1 days with it's original BioSQL support.
The is still running happily along.
I also dabbled into the newer BioSQL support that Richard Holland
introduced into biojavax which was a prelude to Biojava3.
This code is currently in biojava-legacy. This one uses Hibernate
sessions to bind to the various db backends, and creates db model using
hibernate mappings which are database specific (including Mysql, Oracle,
Postgresql, HsqlDB).
This code works quite well, and you can load Genbank files into the
database in 20 lines of code.
This maybe a good starting point for redesigning the interface to BioSQL
within biojava3.
Switching from hibernate based sessions to JPA sessions would allow
seamless plugin of whichever Session manager one wanted (as mentioned by
Bruno).
The problem with that current design (biojavax), is that the database
mappings are encoded within the hibernate configuration.
One possible solution would be to build a BioSQL java class model using
Java annotations. This way automatic database schema generation via
one's chosen Session manager/Database backend could be used.
Just a few thoughts,
Simon
--
Bioinformatics Programmer
National Research Council of Canada | Conseil national de recherches Canada
Government of Canada | Gouvernement du Canada
100 Sussex Dr, Ottawa, Canada K1A 0R6
Telephone | Téléphone 613-990-3600 / Facsimile | Télécopieur 613-952-9092
On 05/30/2012 11:16 PM, Thiago Satake wrote:
> Hi Scooter,
>
> I have worked with bioperl-db before and I have a good understanding about
> that, but now I need to work with Java, it is my first time I am working on
> biojava3 and I could not find any support to BioSQL.
>
> Basically, I am going to create a web interface using JEE. My first task I
> need to read GenBank, GFF and Fasta file and store the data into the BioSQL.
>
> In order to maintain my JEE application easy to support/robust I am using
> Spring and Hibernate. However, I could not find Hibernate or Spring support
> in BioJava3 and I thought that it would not sound good for everyone,
> because we need to have a good knowledge of external API.
>
> If hibernate will help the application to be robust I believe that I need
> to use Spring too. Easy to maintain, but the architecture will be more
> complex.
>
> I can change my decision and use hibernate if everyone likes :-)
>
>
>
> Thanks
>
> Thiago Seito Satake
>
>
> On 30 May 2012 23:43, Scooter Willis<HWillis at scripps.edu> wrote:
>
>> Thiago
>>
>> The Biojava3-BioSQL module will be standalone so you should pick database
>> tools like hibernate or others that make your implementation easy to
>> support/robust. Did you check how other Bio languages support BioSQL? I
>> would follow their API to allow for familiarity with already established
>> packages.
>>
>> Do you have a specific requirement for BioSQL support for code you are
>> working on?
>>
>> Scooter
>>
>> From: Thiago Satake<maruco at gmail.com>
>> To: Scooter Willis<hwillis at scripps.edu>
>> Cc: Andreas Prlic<andreas at sdsc.edu>, "biojava-dev at lists.open-bio.org"<
>> biojava-dev at lists.open-bio.org>
>> Subject: Re: [Biojava-dev] Biojava3 and BioSQL
>>
>> Hi,
>>
>> I was wandering if I should use hibernate or not in my BioSQL module. In
>> my point of the view we should avoid a lot of dependency to make things
>> easy to set up. But I am not sure it would be good for everyone...
>>
>> In this module I am thinking to create a data access object strategy
>> typically exchange data with clients using Transfer Objects, and also, I
>> believe we need to create DAOFactory to encapsulate multiple types of data
>> source ( Oracle, Mysql and Postgres).
>>
>> I will expose read() and write() functions using an session façade which
>> will encapsulate reused biojava3 component an data access object.
>>
>> Is everything making sense ? ;-)
>>
>>
>>
>> Thanks
>>
>>
>> Thiago Seito Satake
>>
>>
>>
>>
>>
>> On 29 May 2012 12:00, Scooter Willis<HWillis at scripps.edu> wrote:
>>
>>> Thiago
>>>
>>> If you get a chance can you look at the UniprotProxySequenceReader as a
>>> potential model for BioSQL integration. The underlying sequence objects in
>>> Biojava3-core don't care about the storage container for sequence data,
>>> annotations etc. You should be able to do a BioSQLProxySequenceReader
>>> which has knowledge of the BioSQL schema and connection parameters that
>>> you pass into the appropriate Sequence object.
>>>
>>> I think this makes the most sense to integrate BioSQL into Biojava3.
>>>
>>> Let me know what I can do to help.
>>>
>>> Scooter
>>>
>>> On 5/28/12 9:34 AM, "Thiago Satake"<maruco at gmail.com> wrote:
>>>
>>>> Thanks Andreas,
>>>>
>>>>
>>>> In my current project I will work with Java and BioSQL. I think that an
>>>> biojava3-biosql API would be very useful. Now I am getting a good
>>>> understanding of biojava3 and deciding what is the best solution for
>>>> that.
>>>> Any suggestions would be good!!
>>>>
>>>>
>>>> For now, I have created a simple project in my local environment called
>>>> biojava3-biosql, after I've finished, I would like to share with all of
>>>> you. Is possible include in BioJava project ?
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>> Thiago Seito Satake
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 26 May 2012 20:34, Andreas Prlic<andreas at sdsc.edu> wrote:
>>>>
>>>>> No, biojava 3 does not have biosql bindings currently. Any patches are
>>>>> welcome...
>>>>>
>>>>> Andreas
>>>>>
>>>>> On Sat, May 26, 2012 at 12:13 PM, Thiago Satake<maruco at gmail.com>
>>>>> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I have noticed that there is a componet called biosql 1.8.1 which
>>>>> works
>>>>>> with biojava 1.8.
>>>>>>
>>>>>> Quick question, I would like to work with biojava3 and BioSQL. Is
>>>>> there a
>>>>>> componete for that ?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thiago Seito Satake
>>>>>> _______________________________________________
>>>>>> biojava-dev mailing list
>>>>>> biojava-dev at lists.open-bio.org
>>>>>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>>>>
>>>>
>>>> --
>>>> Thiago Seito Satake
>>>> Tel: (041) 88428444
>>>> _______________________________________________
>>>> biojava-dev mailing list
>>>> biojava-dev at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>>>
>>
>> --
>> Thiago Seito Satake
>> Tel: (041) 88428444
>>
>
>
More information about the biojava-dev
mailing list