Module: StudyReport::WellDetails

Included in:
Well
Defined in:
app/models/study_report/well_details.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


2
3
4
5
6
7
8
9
10
11
12
13
# File 'app/models/study_report/well_details.rb', line 2

def self.included(base)
  base.class_eval do
    scope :for_study_report, -> {
      includes([
        :map,
        :well_attribute,
        :events,
        { plate: [:plate_purpose, :events, :barcodes], primary_aliquot: { sample: [:sample_metadata, { sample_manifest: :supplier }] } }
      ])
    }
  end
end

Instance Method Details

#qc_reportObject

def genotyping_status

primary_aliquot.present? ? primary_aliquot.sample.genotyping_done : ''

end


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'app/models/study_report/well_details.rb', line 19

def qc_report
  # well must be from a stock plate
  return {} unless plate.try(:stock_plate?)

  qc_data = super

  qc_data.merge!(well: map.description,
                 concentration: well_attribute.concentration,
                 sequenom_count: "#{get_sequenom_count.to_i}/30",
                 sequenom_gender: get_gender_markers,
                 pico: well_attribute.pico_pass,
                 is_in_fluidigm: fluidigm_stamp_date,
                 gel: well_attribute.gel_pass,
                 plate_barcode: plate.barcode_number,
                 measured_volume: well_attribute.measured_volume,
                 current_volume: well_attribute.current_volume,
                 gel_qc_date: gel_qc_date,
                 pico_date: pico_date,
                 qc_started_date: plate.qc_started_date,
                 sequenom_stamp_date: plate.sequenom_stamp_date,
                 quantity: well_attribute.quantity_in_micro_grams.try(:round, 3),
                 initial_volume: well_attribute.initial_volume)
  qc_data
end