Class Ensembl::Core::Marker
In: lib/ensembl/core/activerecord.rb
Parent: DBConnection

DESCRIPTION

The Marker class provides an interface to the marker table. This table contains primer sequences and PCR product lengths.

This class uses ActiveRecord to access data in the Ensembl database. See the general documentation of the Ensembl module for more information on what this means and what methods are available.

USAGE

 marker = Marker.find(52194)
 puts marker.left_primer
 puts marker.right_primer
 puts marker.min_primer_dist.to_s

Methods

Public Class methods

DESCRIPTION

The Marker#find_all_by_name class method returns all markers with this name. If no marker is found, it returns an empty array.


Arguments:name
Returns:empty array or array of Marker objects

[Source]

     # File lib/ensembl/core/activerecord.rb, line 851
851:       def self.find_all_by_name(name)
852:         marker_synonyms = Ensembl::Core::MarkerSynonym.find_all_by_name(name)
853:         answers = Array.new
854:         marker_synonyms.each do |ms|
855:           answers.push(Ensembl::Core::Marker.find_all_by_marker_id(ms.marker_id))
856:         end
857:         answers.flatten!
858:         return answers
859:       end

DESCRIPTION

The Marker#find_by_name class method returns one marker with this name.


Arguments:name
Returns:Marker object or nil

[Source]

     # File lib/ensembl/core/activerecord.rb, line 836
836:       def self.find_by_name(name)
837:         all_names = self.find_all_by_name(name)
838:         if all_names.length == 0
839:           return nil
840:         else
841:           return all_names[0]
842:         end
843:       end

[Source]

     # File lib/ensembl/core/activerecord.rb, line 815
815:       def self.inheritance_column
816:         nil
817:       end

Public Instance methods

DESCRIPTION

The Marker#name method returns a comma-separated list of synonyms of this marker

USAGE

 marker = Marker.find(1)
 puts marker.name    --> 58017,D29149

[Source]

     # File lib/ensembl/core/activerecord.rb, line 826
826:       def name
827:         self.marker_synonyms.collect{|ms| ms.name}.join(',')
828:       end

[Validate]