Sha256: 85c857e2fc1d36e5902213cc90014525f8ce894a69bda3041f0de77278728918

Contents?: true

Size: 1.6 KB

Versions: 9

Compression:

Stored size: 1.6 KB

Contents

module Bio
    class SQL
			class Bioentry < DummyBase
				belongs_to :biodatabase, :class_name => "Biodatabase"
				belongs_to :taxon, :class_name => "Taxon"
				has_one :biosequence
				#, :class_name => "Biosequence", :foreign_key => "bioentry_id"
				has_many :comments, :class_name =>"Comment", :order =>'rank'
				has_many :seqfeatures, :class_name => "Seqfeature", :order=>'rank'
				has_many :bioentry_references, :class_name=>"BioentryReference" #, :foreign_key => "bioentry_id"
				has_many :bioentry_dbxrefs, :class_name => "BioentryDbxref"
				has_many :object_bioentry_relationships, :class_name=>"BioentryRelationship", :foreign_key=>"object_bioentry_id" #non mi convince molto credo non funzioni nel modo corretto
				has_many :subject_bioentry_relationships, :class_name=>"BioentryRelationship", :foreign_key=>"subject_bioentry_id" #non mi convince molto credo non funzioni nel modo corretto

				has_many :cdsfeatures, :class_name=>"Seqfeature", :foreign_key =>"bioentry_id", :conditions=>["term.name='CDS'"], :include=>"type_term"
        
        has_many :terms, :through=>:bioentry_qualifier_values, :class_name => "Term"
        #NOTE: added order_by for multiple hit and manage ranks correctly
        has_many :bioentry_qualifier_values, :order=>"bioentry_id,term_id,rank", :class_name => "BioentryQualifierValue"
        
				#per la creazione richiesti:
				#name, accession, version
#				validates_uniqueness_of :accession, :scope=>[:biodatabase_id]
#				validates_uniqueness_of :name, :scope=>[:biodatabase_id] 
			#	validates_uniqueness_of :identifier, :scope=>[:biodatabase_id]
				
			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/bioentry.rb
bioruby-bio-1.2.9.9501 lib/bio/io/biosql/bioentry.rb
bioruby-bio-1.3.0 lib/bio/io/biosql/bioentry.rb
ngoto-bio-1.2.9.9001 lib/bio/io/biosql/bioentry.rb
ngoto-bio-1.2.9.9501 lib/bio/io/biosql/bioentry.rb
ngoto-bio-1.3.0.5000 lib/bio/io/biosql/bioentry.rb
ngoto-bio-1.3.0 lib/bio/io/biosql/bioentry.rb
wwood-bioruby-1.2.11 lib/bio/io/biosql/bioentry.rb
bio-1.3.0 lib/bio/io/biosql/bioentry.rb