Sha256: cd06d5cb7aa0fbb0e146533ae9f00cde7bca91cc2e8ef1207b72da9064acfaa3

Contents?: true

Size: 1.57 KB

Versions: 9

Compression:

Stored size: 1.57 KB

Contents

module Bio
  class SQL 
    class Seqfeature <DummyBase  
      set_sequence_name "seqfeature_pk_seq"
      belongs_to :bioentry
      #, :class_name => "Bioentry"
      belongs_to :type_term, :class_name => "Term", :foreign_key => "type_term_id"
      belongs_to :source_term, :class_name => "Term", :foreign_key =>"source_term_id"
      has_many :seqfeature_dbxrefs, :class_name => "SeqfeatureDbxref", :foreign_key => "seqfeature_id"
      has_many :seqfeature_qualifier_values, :order=>'rank', :foreign_key => "seqfeature_id"
      #, :class_name => "SeqfeatureQualifierValue"
      has_many :locations, :class_name => "Location", :order=>'rank'
      has_many :object_seqfeature_paths, :class_name => "SeqfeaturePath", :foreign_key => "object_seqfeature_id"
      has_many :subject_seqfeature_paths, :class_name => "SeqfeaturePath", :foreign_key => "subject_seqfeature_id"
      has_many :object_seqfeature_relationships, :class_name => "SeqfeatureRelationship", :foreign_key => "object_seqfeature_id"
      has_many :subject_seqfeature_relationships, :class_name => "SeqfeatureRelationship", :foreign_key => "subject_seqfeature_id"

      #get the subsequence described by the locations objects
      def sequence
        return self.locations.inject(Bio::Sequence::NA.new("")){|seq, location| seq<<location.sequence}
    end
    
      #translate the subsequences represented by the feature and its locations
      #not considering the qualifiers 
      #Return a Bio::Sequence::AA object
      def translate(*args)
        self.sequence.translate(*args)
      end
      end		
    end #SQL
  end #Bio

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
bioruby-bio-1.2.9.9001 lib/bio/io/biosql/seqfeature.rb
bioruby-bio-1.2.9.9501 lib/bio/io/biosql/seqfeature.rb
bioruby-bio-1.3.0 lib/bio/io/biosql/seqfeature.rb
ngoto-bio-1.2.9.9001 lib/bio/io/biosql/seqfeature.rb
ngoto-bio-1.2.9.9501 lib/bio/io/biosql/seqfeature.rb
ngoto-bio-1.3.0.5000 lib/bio/io/biosql/seqfeature.rb
ngoto-bio-1.3.0 lib/bio/io/biosql/seqfeature.rb
wwood-bioruby-1.2.11 lib/bio/io/biosql/seqfeature.rb
bio-1.3.0 lib/bio/io/biosql/seqfeature.rb