[BioRuby] Fwd: Re: BioSQL development

Julian Nordt ju at ncoffee.de
Sun Aug 22 10:30:03 UTC 2010


Hi Rob,

I just wanted to point that there are for sure people that have a greater
experience in regard to the discussed db-schemas and might give you better
advice on this topic than I'm able to do. As pointed out I have just
recently started to work with bioruby. Hence it might be a good idea to
consider further opinions on this topic.

However I did wanted to reply to you request, as your scenario sounded
somewhat similar to one of the projects I have to work on.

-- Julian

On Sun, 22 Aug 2010 11:23:52 +0200, Rob Syme <rob.syme at gmail.com> wrote:

> Thanks Toshiaki and Julian,
>
> Mapping features from gff may well become an issue. Until Raoul gets  
> back, I
> might try and keep the data under the Chado schema as suggested by  
> Julian.
> *If* I can get it clean enough, I'll offer it up for incorporation into
> bioruby.
>
> -r
>
>
> On Sun, Aug 22, 2010 at 4:50 PM, Julian Nordt <ju at ncoffee.de> wrote:
>
>> Hi Rob,
>>
>> I tried to use the BioSQL part of Bioruby for a webapplication based on
>> rails. With the idea of giving users the capability to upload genomes  
>> to the
>> application. However the mapping between BioSQL <-> GFF3 is(?)/were not
>> figured out completly, which was one of the reasons why I changed my
>> implementation to CHADO scheme.
>>
>>
>> In regard to your question I did use BioSQL in the following way:
>>
>>
>>  def openBioConnection
>>    Bio::SQL.establish_connection(:adapter  => "mysql",
>>                                  :host     => "localhost",
>>                                  :username => "xxx",
>>                                  :password => "xxx",
>>                                  :database => "biosql_development")
>>  end
>>
>>
>>  def get_sequence(bio_entry_id)
>>    openBioConnection()
>>    if !bio_entry_id.blank?
>>      return Bio::SQL::Biosequence.find_by_bioentry_id(bio_entry_id)
>>    end
>>  end
>>
>>
>> def setSeqFeatName(id,name)
>>    seq_feat = Bio::SQL::Seqfeature.find_by_seqfeature_id(id)
>>    Bio::SQL::Seqfeature.update(seq_feat.id, :display_name => name)
>>  end
>>
>> (! This does not mean that it is the correct way or intended way of  
>> usage
>> as I'm new to ruby/bioruby !)
>>
>> I had to make some small modifications to
>> bio-1.4.0\lib\bio\io\biosql\ar-biosql.rb and biosql.rb, unfortunately I  
>> do
>> not remember where exactly. Mostlikely some changes in regard to the
>> connection adapter and some changes to tablenames or similiar stuff.
>>
>> As you can see in ar-biosql.rb all the "classes" for the biosql orm are
>> already defined, so one does not have to define the classes himself.
>>
>> Hope this helps,
>>
>> Julian Nordt
>>
>>
>>
>>
>>
>>
>> On Sun, 22 Aug 2010 08:22:18 +0200, Rob Syme <rob.syme at gmail.com> wrote:
>>
>>  Is there a particular person who has taken charge of the BioSQL part of
>>> Bioruby?
>>> I just want confirmation that I'm not using it in completely the wrong
>>> way.
>>>
>>> Are the classes designed so that you generate models for an app (a  
>>> rails
>>> app, for example) that inherit from the Bio::SQL::whatever? eg:
>>>
>>> $ rails g model Biodatabase name:string authority:string  
>>> description:text
>>>
>>> and then in app/model/biodatabase.rb you change:
>>> class Biodatabase < ActiveRecord::Base
>>> end
>>>
>>> into:
>>> class Biodatabase < Bio::SQL::Biodatabase # which inherits
>>> ActiveRecord::Base
>>> end
>>>
>>> If I get a handle on this, I'd be happy to write it up for
>>> http://bioruby.open-bio.org/wiki/Tutorial#BioSQL
>>>
>>> Thanks for all the work by the dev team. Much appreciated - I use  
>>> bioruby
>>> almost every day.
>>> -r
>>>
>>> Rob Syme
>>> _______________________________________________
>>> BioRuby Project - http://www.bioruby.org/
>>> BioRuby mailing list
>>> BioRuby at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioruby
>>>
>>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>>


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/



More information about the BioRuby mailing list