Class: GeneAttribute

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Housekeeping, Shared::Identifiable, Shared::IsData, Shared::Notable, Shared::Taggable
Defined in:
app/models/gene_attribute.rb

Overview

A GeneAttribute defines an attribute that must be matched for a Sequence to be classified as a Descriptor::Gene. There are two key attributes, sequence, and sequence relationship. A GeneAttribute will return all sequences who are the object of a taxon name relationship whose subject is Sequence and whose Type is #sequence_relationship_type

Instance Attribute Summary (collapse)

Method Summary

Methods included from Housekeeping

#has_polymorphic_relationship?

Instance Attribute Details

- (Integer) controlled_vocabulary_termi_id

Returns not yet implemented, intent/idea is to define a subclass of CVT that represents GO terms.

Returns:

  • (Integer)

    not yet implemented, intent/idea is to define a subclass of CVT that represents GO terms.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'app/models/gene_attribute.rb', line 25

class GeneAttribute < ActiveRecord::Base
  include Housekeeping
  include Shared::Identifiable
  include Shared::IsData
  include Shared::Notable
  include Shared::Taggable

  belongs_to :descriptor, class_name: 'Descriptor::Gene', inverse_of: :gene_attributes
  belongs_to :sequence, inverse_of: :gene_attributes

  # Not yet implemented.
  # Deprecated: Use Tag/Keyword
  # belongs_to :controlled_vocabulary_term

  validates :descriptor, presence: true
  validates :sequence, presence: true
 
  validates_uniqueness_of :sequence, scope: [:descriptor, :sequence_relationship_type]

end

- (Integer) descriptor_id

Returns the descriptor id (Gene) that this attribute defines

Returns:

  • (Integer)

    the descriptor id (Gene) that this attribute defines



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'app/models/gene_attribute.rb', line 25

class GeneAttribute < ActiveRecord::Base
  include Housekeeping
  include Shared::Identifiable
  include Shared::IsData
  include Shared::Notable
  include Shared::Taggable

  belongs_to :descriptor, class_name: 'Descriptor::Gene', inverse_of: :gene_attributes
  belongs_to :sequence, inverse_of: :gene_attributes

  # Not yet implemented.
  # Deprecated: Use Tag/Keyword
  # belongs_to :controlled_vocabulary_term

  validates :descriptor, presence: true
  validates :sequence, presence: true
 
  validates_uniqueness_of :sequence, scope: [:descriptor, :sequence_relationship_type]

end

- (Integer) project_id

the project ID

Returns:

  • (Integer)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'app/models/gene_attribute.rb', line 25

class GeneAttribute < ActiveRecord::Base
  include Housekeeping
  include Shared::Identifiable
  include Shared::IsData
  include Shared::Notable
  include Shared::Taggable

  belongs_to :descriptor, class_name: 'Descriptor::Gene', inverse_of: :gene_attributes
  belongs_to :sequence, inverse_of: :gene_attributes

  # Not yet implemented.
  # Deprecated: Use Tag/Keyword
  # belongs_to :controlled_vocabulary_term

  validates :descriptor, presence: true
  validates :sequence, presence: true
 
  validates_uniqueness_of :sequence, scope: [:descriptor, :sequence_relationship_type]

end

- (Integer) sequence_id

Returns the sequence id (Gene), defines the nucleotides in the attribute

Returns:

  • (Integer)

    the sequence id (Gene), defines the nucleotides in the attribute



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'app/models/gene_attribute.rb', line 25

class GeneAttribute < ActiveRecord::Base
  include Housekeeping
  include Shared::Identifiable
  include Shared::IsData
  include Shared::Notable
  include Shared::Taggable

  belongs_to :descriptor, class_name: 'Descriptor::Gene', inverse_of: :gene_attributes
  belongs_to :sequence, inverse_of: :gene_attributes

  # Not yet implemented.
  # Deprecated: Use Tag/Keyword
  # belongs_to :controlled_vocabulary_term

  validates :descriptor, presence: true
  validates :sequence, presence: true
 
  validates_uniqueness_of :sequence, scope: [:descriptor, :sequence_relationship_type]

end

- (String) sequence_relationship_type

Returns a SequenceRelationship#type, defines how the sequence was used in this attribute

Returns:

  • (String)

    a SequenceRelationship#type, defines how the sequence was used in this attribute



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'app/models/gene_attribute.rb', line 25

class GeneAttribute < ActiveRecord::Base
  include Housekeeping
  include Shared::Identifiable
  include Shared::IsData
  include Shared::Notable
  include Shared::Taggable

  belongs_to :descriptor, class_name: 'Descriptor::Gene', inverse_of: :gene_attributes
  belongs_to :sequence, inverse_of: :gene_attributes

  # Not yet implemented.
  # Deprecated: Use Tag/Keyword
  # belongs_to :controlled_vocabulary_term

  validates :descriptor, presence: true
  validates :sequence, presence: true
 
  validates_uniqueness_of :sequence, scope: [:descriptor, :sequence_relationship_type]

end