Class: Limber::Plate

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

Overview

Class Limber::Plate provides a client side representation of Sequencescape plates

Author:

  • Genome Research Ltd.

Instance Method Summary collapse

Instance Method Details

#human_barcodeObject



55
56
57
# File 'app/models/limber/plate.rb', line 55

def human_barcode
  barcode.machine
end

#number_of_columnsInteger

The width of the plate. Assumes a 3:2 ratio

Returns:

  • (Integer)

    Plate width in wells



25
26
27
# File 'app/models/limber/plate.rb', line 25

def number_of_columns
  Math.sqrt(size / 6).to_i * 3
end

#number_of_rowsInteger

The height of the plate. Assumes a 4:3 ratio

Returns:

  • (Integer)

    Plate height in wells



34
35
36
# File 'app/models/limber/plate.rb', line 34

def number_of_rows
  Math.sqrt(size / 6).to_i * 2
end

#plate?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'app/models/limber/plate.rb', line 59

def plate?
  true
end

#pools_infoObject



38
39
40
# File 'app/models/limber/plate.rb', line 38

def pools_info
  @pools_info ||= Pools.new(pools)
end

#purposeObject



46
47
48
# File 'app/models/limber/plate.rb', line 46

def purpose
  plate_purpose
end

#roleObject



42
43
44
# File 'app/models/limber/plate.rb', line 42

def role
  label.prefix
end

#tagged?Boolean

Returns:

  • (Boolean)


50
51
52
53
# File 'app/models/limber/plate.rb', line 50

def tagged?
  first_filled_well = wells.detect { |w| w.aliquots.first }
  first_filled_well && first_filled_well.aliquots.first.tag.identifier.present?
end

#tube?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'app/models/limber/plate.rb', line 63

def tube?
  false
end