Class: TagLayout
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- TagLayout
- Includes:
- Asset::Ownership::ChangesOwner, Uuid::Uuidable
- Defined in:
- app/models/tag_layout.rb
Overview
Lays out the tags in the specified tag group in a particular pattern.
In pulldown they use only one set of tags and put them into wells in a particular pattern: by columns, or by rows. Depending on the size of the tag group that is used by the layout template it either repeats (for example, 8 tags in the group laid out in columns would repeat the tags across the plate), or it doesn't (for example, a 96 tag group would occupy an entire 96 well plate).
Defined Under Namespace
Modules: CombByRows, InColumns, InColumnsThenColumns, InColumnsThenRows, InInverseColumns, InInverseRows, InRows Classes: AsFixedGroupByPlate, AsGroupByPlate, CombinatorialSequential, DualIndexWalker, Quadrants, TemplateSubmission, WalkManualWellsByPools, WalkManualWellsOfPlate, WalkWellsByPools, WalkWellsOfPlate, Walker
Constant Summary collapse
- DIRECTION_ALGORITHMS =
{ 'column' => 'TagLayout::InColumns', 'row' => 'TagLayout::InRows', 'inverse column' => 'TagLayout::InInverseColumns', 'inverse row' => 'TagLayout::InInverseRows', 'column then row' => 'TagLayout::InColumnsThenRows', 'column then column' => 'TagLayout::InColumnsThenColumns', 'combinatorial by row' => 'TagLayout::CombByRows' }.freeze
- WALKING_ALGORITHMS =
{ 'wells in pools' => 'TagLayout::WalkWellsByPools', 'wells of plate' => 'TagLayout::WalkWellsOfPlate', 'manual by pool' => 'TagLayout::WalkManualWellsByPools', 'as group by plate' => 'TagLayout::AsGroupByPlate', 'manual by plate' => 'TagLayout::WalkManualWellsOfPlate', 'quadrants' => 'TagLayout::Quadrants', 'as fixed group by plate' => 'TagLayout::AsFixedGroupByPlate', 'combinatorial sequential' => 'TagLayout::CombinatorialSequential' }.freeze
Instance Attribute Summary collapse
-
#replace_tags ⇒ Object
When true, the layout replaces the existing tags of the aliquots.
-
#tags_per_well ⇒ Object
Returns the value of attribute tags_per_well.
Instance Method Summary collapse
- #direction=(new_direction) ⇒ Object
- #direction_algorithm_module ⇒ Object
- #walking_by=(walk) ⇒ Object
- #wells_in_walking_order ⇒ Object
Methods included from Asset::Ownership::ChangesOwner
Methods included from Uuid::Uuidable
included, #unsaved_uuid!, #uuid
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
Methods included from Warren::Callback::ExceptExternallyManaged
#broadcast_except_externally_managed, included
Instance Attribute Details
#replace_tags ⇒ Object
When true, the layout replaces the existing tags of the aliquots. Without a tag2 group, it removes their existing tag2 instead of keeping it. Used when tags are added to aliquots that are already tagged, e.g. Ultima tags on Illumina libraries.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'app/models/tag_layout.rb', line 66 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 |
#tags_per_well ⇒ Object
Returns the value of attribute tags_per_well.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/models/tag_layout.rb', line 12 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 |
Instance Method Details
#direction=(new_direction) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'app/models/tag_layout.rb', line 79 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 |
#direction_algorithm_module ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'app/models/tag_layout.rb', line 91 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 |
#walking_by=(walk) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'app/models/tag_layout.rb', line 83 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 |
#wells_in_walking_order ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'app/models/tag_layout.rb', line 87 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 |