Class: LibraryCreationRequest
- Inherits:
-
CustomerRequest
- Object
- ActiveRecord::Base
- ApplicationRecord
- Request
- CustomerRequest
- LibraryCreationRequest
- Defined in:
- app/models/library_creation_request.rb
Overview
Used in the old-style (Workflow driven) tube based library creation pipelines
Direct Known Subclasses
Defined Under Namespace
Classes: Metadata
Constant Summary
Constants included from Metadata
Constants included from StandardNamedScopes
StandardNamedScopes::SORT_FIELDS, StandardNamedScopes::SORT_ORDERS
Instance Method Summary collapse
-
#aliquot_attributes ⇒ Hash
Passed into cloned aliquots at the beginning of a pipeline to set appropriate options.
-
#on_started ⇒ Object
When a library creation request passes it does the default behaviour of a request but also adds the insert size to the aliquots in the target asset and sets the library.
Methods included from Request::LibraryManufacture
Methods included from Request::CustomerResponsibility
Methods inherited from CustomerRequest
#customer_accepts_responsibility!, #generate_create_request_event, #generate_destroy_request_event, #generate_request_event, #update_responsibilities!
Methods inherited from Request
#add_comment, #associated_studies, #cancelable?, #copy, #current_request_event, #customer_accepts_responsibility!, delegate_validator, #detect_descriptor, #eventful_studies, for_study, #format_qc_information, get_all_comments, #has_passed, #lab_events_for_batch, #manifest_processed!, #most_recent_event_named, #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_pool_information, #update_priority, #update_responsibilities!
Methods included from EventfulRecord
#has_many_events, #has_many_lab_events, #has_one_event_with_family
Methods included from Metadata
Methods included from Batch::RequestBehaviour
included, #recycle_from_batch!, #return_for_inbox!, #with_batch_id
Methods included from StandardNamedScopes
Methods included from Commentable
Methods included from AASM::Extensions
Methods included from Uuid::Uuidable
included, #unsaved_uuid!, #uuid
Methods included from Api::RequestIo::Extensions
Methods included from Aliquot::DeprecatedBehaviours::Request
Methods inherited from ApplicationRecord
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
Instance Method Details
#aliquot_attributes ⇒ Hash
Passed into cloned aliquots at the beginning of a pipeline to set appropriate options
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'app/models/library_creation_request.rb', line 45 do # NOTE: The following attribute is not required for Microarray Genotyping. # I think this might be broken and suggests that there should be separate classes for project: one for # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping # that doesn't. include ProjectManager::Associations include BudgetDivision::Associations custom_attribute(:project_cost_code, required: true) custom_attribute(:funding_comments) custom_attribute(:collaborators) custom_attribute(:external_funding_source) custom_attribute(:sequencing_budget_cost_centre) custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS) custom_attribute(:gt_committee_tracking_id) before_validation do |record| record.project_cost_code = nil if record.project_cost_code.blank? record.project_funding_model = nil if record.project_funding_model.blank? end end |
#on_started ⇒ Object
When a library creation request passes it does the default behaviour of a request but also adds the insert size to the aliquots in the target asset and sets the library. There's a minor complication in that an MX library is also a type of library that might have libraries coming into it, therefore we only update the information that is missing.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'app/models/library_creation_request.rb', line 25 do # NOTE: The following attribute is not required for Microarray Genotyping. # I think this might be broken and suggests that there should be separate classes for project: one for # next-gen sequencing that includes this attribute in it's metadata, and one for microarray genotyping # that doesn't. include ProjectManager::Associations include BudgetDivision::Associations custom_attribute(:project_cost_code, required: true) custom_attribute(:funding_comments) custom_attribute(:collaborators) custom_attribute(:external_funding_source) custom_attribute(:sequencing_budget_cost_centre) custom_attribute(:project_funding_model, in: PROJECT_FUNDING_MODELS) custom_attribute(:gt_committee_tracking_id) before_validation do |record| record.project_cost_code = nil if record.project_cost_code.blank? record.project_funding_model = nil if record.project_funding_model.blank? end end |