Class: Presenters::NormalisedBinnedPlatePresenter

Inherits:
PlatePresenter show all
Includes:
Statemachine::Standard
Defined in:
app/models/presenters/normalised_binned_plate_presenter.rb

Overview

The NormalisedBinnedPlatePresenter is used for plates that have had concentration binning and normalisation applied. It shows a view of the plate with colours and keys indicating the various bins.

Constant Summary collapse

PLATE_WITH_QC_RESULTS_INCLUDES =
'wells.aliquots,wells.qc_results'

Instance Method Summary collapse

Instance Method Details

#bin_detailsObject



36
37
38
# File 'app/models/presenters/normalised_binned_plate_presenter.rb', line 36

def bin_details
  @bin_details ||= compute_bin_details
end

#bins_keyObject



27
28
29
# File 'app/models/presenters/normalised_binned_plate_presenter.rb', line 27

def bins_key
  dilutions_calculator.bins_template
end

#dilutions_calculatorObject



23
24
25
# File 'app/models/presenters/normalised_binned_plate_presenter.rb', line 23

def dilutions_calculator
  @dilutions_calculator ||= Utility::NormalisedBinningCalculator.new(dilutions_config)
end

#dilutions_configObject



19
20
21
# File 'app/models/presenters/normalised_binned_plate_presenter.rb', line 19

def dilutions_config
  purpose_config.fetch(:dilutions)
end

#plate_with_qc_resultsObject



31
32
33
34
# File 'app/models/presenters/normalised_binned_plate_presenter.rb', line 31

def plate_with_qc_results
  @plate_with_qc_results ||=
    Sequencescape::Api::V2.plate_with_custom_includes(PLATE_WITH_QC_RESULTS_INCLUDES, uuid: labware.uuid)
end