Class: IlluminaC::MxTubePurpose

Inherits:
IlluminaHtp::MxTubePurpose
  • Object
show all
Defined in:
app/models/illumina_c/mx_tube_purpose.rb

Instance Method Summary collapse

Instance Method Details

#library_request(tube) ⇒ Object


9
10
11
12
13
# File 'app/models/illumina_c/mx_tube_purpose.rb', line 9

def library_request(tube)
  tube.requests_as_target.where_is_a(IlluminaC::Requests::LibraryRequest).first ||
    tube.requests_as_target.where_is_a(Request::Multiplexing).first.asset
        .requests_as_target.where_is_a(IlluminaC::Requests::LibraryRequest).first
end

#stock_plate(tube) ⇒ Object


2
3
4
5
6
7
# File 'app/models/illumina_c/mx_tube_purpose.rb', line 2

def stock_plate(tube)
  lt = library_request(tube)
  return lt.asset.plate if lt.present?

  nil
end