Class: Limber::Plate::PrimerPanel

Inherits:
Object
  • Object
show all
Defined in:
app/models/limber/plate/primer_panel.rb

Overview

A primer panel is a selection of pcr primers targeted at specific location on the DNA in order to amplify known SNP sites. (SNP = Single nucleotide polymorphism, a region of DNA know to vary between individuals) It is specified as a property on pool during submission, and also directs the use of specific PCR programs at particular point during the process. This class wraps the primer panel information in the pool providing a convenient interface

Constant Summary collapse

UNKNOWN =
'Unknown'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(panel_config_hash) ⇒ PrimerPanel

Create a new PrimerPanel from the pool information

Parameters:

  • panel_config_hash (Hash)

    As provided by the pools > primer_panel hash in the plate json



22
23
24
25
26
27
# File 'app/models/limber/plate/primer_panel.rb', line 22

def initialize(panel_config_hash)
  panel_config_hash ||= {}
  @exists = panel_config_hash.present?
  @name = panel_config_hash.fetch('name', UNKNOWN)
  @programs = panel_config_hash.fetch('programs', {})
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'app/models/limber/plate/primer_panel.rb', line 14

def name
  @name
end

Instance Method Details

#exists?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'app/models/limber/plate/primer_panel.rb', line 29

def exists?
  @exists
end