Class: IlluminaHtp::Requests::StdLibraryRequest

Inherits:
Request::LibraryCreation show all
Defined in:
app/models/illumina_htp/requests/std_library_request.rb

Overview

The basic request for limber library requests Also used as the base class of some of the older WGS requests

Constant Summary

Constants included from Metadata

Metadata::SECTION_FIELDS

Constants included from Request::Statemachine

Request::Statemachine::ACTIVE, Request::Statemachine::COMPLETED_STATE, Request::Statemachine::INACTIVE, Request::Statemachine::OPENED_STATE, Request::Statemachine::SORT_ORDER

Constants included from StandardNamedScopes

StandardNamedScopes::SORT_FIELDS, StandardNamedScopes::SORT_ORDERS

Instance Method Summary collapse

Methods inherited from Request::LibraryCreation

#aliquot_attributes, fragment_size_details, #on_started

Methods included from Request::CustomerResponsibility

included

Methods inherited from CustomerRequest

#biffable?, #can_be_billed?, #create_billing_events, #customer_accepts_responsibility!, #generate_create_request_event, #generate_destroy_request_event, #generate_request_event, #update_responsibilities!

Methods inherited from Request

accessioning_required?, #add_comment, #aliquot_attributes, #associated_studies, #billing_product_identifier, #cancelable?, #copy, #current_request_event, #customer_accepts_responsibility!, delegate_validator, #event_value_for, #event_with_key_value, #eventful_studies, for_study, #format_qc_information, #get_value, #has_passed, #lab_events_for_batch, #manifest_processed!, #next_request_type_id, #next_requests, #next_requests_via_asset, #next_requests_via_submission, number_expected_for_submission_id_and_request_type_id, #previous_failed_requests?, #priority, #product_line, #project=, #project_id=, #ready?, #request_type_updatable?, #return_pending_to_inbox!, #run_events, #source_labware, #study=, #study_id=, #submission_plate_count, #submitted_at, #target_purpose, #target_tube, #update_priority, #update_responsibilities!, #value_for

Methods included from Metadata

#has_metadata

Methods included from EventfulRecord

#has_many_events, #has_many_lab_events, #has_one_event_with_family

Methods included from Request::Statistics

#asset_statistics, #progress_statistics, #sample_statistics_new

Methods included from Batch::RequestBehaviour

included, #recycle_from_batch!, #return_for_inbox!, #with_batch_id

Methods included from Request::Statemachine

#cancellable?, #change_decision!, #closed?, #failed_downstream!, #failed_upstream!, #finished?, #on_blocked, #on_cancelled, #on_hold, #on_passed, #on_started, #open?, #terminated?, #transfer_aliquots

Methods included from StandardNamedScopes

included

Methods included from Commentable

#after_comment_addition

Methods included from AASM::Extensions

#transition_to

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods included from Api::RequestIO::Extensions

included, #json_root

Methods included from Aliquot::DeprecatedBehaviours::Request

#sample_name, #tag, #tag_number

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#on_failedObject


32
33
34
# File 'app/models/illumina_htp/requests/std_library_request.rb', line 32

def on_failed
  next_requests.each(&:failed_upstream!)
end

#update_pool_information(pool_information) ⇒ Object

Ensure that the bait library information is also included in the pool information.


14
15
16
17
18
19
# File 'app/models/illumina_htp/requests/std_library_request.rb', line 14

def update_pool_information(pool_information)
  super
  pool_information[:pcr_cycles] = .pcr_cycles
  pool_information[:request_type] = request_type.key
  pool_information[:for_multiplexing] = request_type.for_multiplexing?
end

#valid_purpose?Boolean

Returns:

  • (Boolean)

24
25
26
27
28
29
30
# File 'app/models/illumina_htp/requests/std_library_request.rb', line 24

def valid_purpose?
  return true if acceptable_plate_purposes.empty? ||
                 acceptable_plate_purposes.include?(asset.plate.purpose)

  errors.add(:asset, "#{asset.plate.purpose.name} is not a suitable plate purpose.")
  false
end