Sha256: ba9c18d2ea1def2d2b7982c64a7d65188df0b62ae932d1f4b975929d9b6e227d

Contents?: true

Size: 1.7 KB

Versions: 10

Compression:

Stored size: 1.7 KB

Contents

#
# = bio/db/biosql/biosql_to_biosequence.rb - Bio::SQL::Sequence to Bio::Sequence adapter module
#
# Copyright::   Copyright (C) 2008
#               Naohisa Goto <ng@bioruby.org>,
#               Raoul Jean Pierre Bonnal
# License::     The Ruby License
#
# $Id:$
#

require 'bio/sequence'
require 'bio/sequence/adapter'

# Internal use only. Normal users should not use this module.
#
# Bio::SQL::Sequence to Bio::Sequence adapter module.
# It is internally used in Bio::SQL::Sequence#to_biosequence.
#
module Bio::Sequence::Adapter::BioSQL

  extend Bio::Sequence::Adapter

  private

  def_biosequence_adapter :seq 
  
  def_biosequence_adapter :entry_id

  def_biosequence_adapter :primary_accession

  def_biosequence_adapter :secondary_accessions

  def_biosequence_adapter :molecule_type

  #--
  #TODO: identify where is stored data_class in biosql      
  #++

  def_biosequence_adapter :data_class

  def_biosequence_adapter :definition, :description

  def_biosequence_adapter :topology

  def_biosequence_adapter :date_created

  def_biosequence_adapter :date_modified
  #do |bs|
   #   Date.parse(bs.date_modified.to_s).strftime("%d-%b-%Y").upcase
    # end

  def_biosequence_adapter :division

  def_biosequence_adapter :sequence_version

  def_biosequence_adapter :keywords

  def_biosequence_adapter :species

  def_biosequence_adapter :classification, :taxonomy

  def_biosequence_adapter :references

  def_biosequence_adapter :features
  
  def_biosequence_adapter :comments

  def_biosequence_adapter :other_seqids do |orig|
    orig.identifier.split(',').collect do |dblink|
      database, id = dblink.split(':')
      Bio::Sequence::DBLink.new(database,id)
    end
  end

end #module Bio::Sequence::Adapter::BioSQL

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
bioruby-bio-1.3.0.5000 lib/bio/db/biosql/biosql_to_biosequence.rb
bioruby-bio-1.3.0.9901 lib/bio/db/biosql/biosql_to_biosequence.rb
bioruby-bio-1.3.1.5000 lib/bio/db/biosql/biosql_to_biosequence.rb
ngoto-bio-1.3.1.5000 lib/bio/db/biosql/biosql_to_biosequence.rb
bio-1.4.3.0001 lib/bio/db/biosql/biosql_to_biosequence.rb
bio-1.4.3 lib/bio/db/biosql/biosql_to_biosequence.rb
bio-1.4.2 lib/bio/db/biosql/biosql_to_biosequence.rb
bio-1.4.1 lib/bio/db/biosql/biosql_to_biosequence.rb
bio-1.4.0 lib/bio/db/biosql/biosql_to_biosequence.rb
bio-1.3.1 lib/bio/db/biosql/biosql_to_biosequence.rb