Class: Lane

Inherits:
Receptacle show all
Extended by:
Metadata
Includes:
AliquotIndexer::Indexable, Api::LaneIO::Extensions
Defined in:
app/models/lane.rb

Overview

A Lane is a section of a Flowcell which is capable of containing one or more samples for sequencing. Samples are represented by aliquots which are distinguished by their distinct tags. Currently flowcells can be approximated in Sequencescape by the Batch created at the end of the SequencingPipeline

Defined Under Namespace

Classes: Labware

Constant Summary collapse

LIST_REASONS_NEGATIVE =
[
  'Failed on yield but sufficient data for experiment',
  'Failed on quality but sufficient data for experiment',
  'Failed on adapter contamination but data sufficient for experiment'
].freeze
LIST_REASONS_POSITIVE =
[
  "Data doesn't contain any of the expected organism",
  "Data doesn't reflect the experiment",
  'GC bias in data set',
  'Multiplex tag problems in data set',
  'Unsure data source'
].freeze
LIST_REASONS =
[''] + LIST_REASONS_NEGATIVE + LIST_REASONS_POSITIVE

Constants included from Metadata

Metadata::SECTION_FIELDS

Constants inherited from Receptacle

Receptacle::QC_STATE_ALIASES

Constants included from Transfer::State

Transfer::State::ALL_STATES

Instance Method Summary collapse

Methods included from Metadata

has_metadata

Methods included from AliquotIndexer::Indexable

#index_aliquots

Methods included from Api::LaneIO::Extensions

included

Methods inherited from Receptacle

#absolute_position_name, #any_barcode_matching?, #api_asset_type, #assign_tag2, #attach_tag, #been_through_qc?, #compatible_qc_state, #created_with_request_options, #details, #labware_comment_count, #latest_stock_metrics, #library_information, #library_name, #library_types, #name, #outer_request, #primary_aliquot_if_unique, #related_studies, #role, #set_as_library, #set_qc_state, #tag_range, #total_comment_count, #update_aliquot_quality, #update_from_qc

Methods included from StudyReport::AssetDetails

#qc_report

Methods included from Aliquot::Remover

#on_downstream_aliquots, #process_aliquots, #remove_downstream_aliquots, #remove_matching_aliquots

Methods included from Transfer::State

#default_state, #state, #state_from, state_helper

Methods included from Commentable

#after_comment_addition

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods inherited from Asset

#add_parent, #ancestor_of_purpose, #asset_type_for_request_types, #assign_relationships, #barcode_number, #compatible_purposes, #contained_samples, #details, #external_identifier, #generate_barcode, #get_qc_result_value_for, #has_stock_asset?, #label, #label=, #original_stock_plates, #prefix, #printable?, #printable_target, #register_stock!, #request_types, #spiked_in_buffer, #summary_hash, #type, #update_from_qc

Methods included from EventfulRecord

#has_many_events, #has_many_lab_events, #has_one_event_with_family

Methods included from Event::PlateEvents

#event_date, #fluidigm_stamp_date, #gel_qc_date, #pico_date, #qc_started_date, #sequenom_stamp_date

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

#external_release_textObject


60
61
62
63
64
# File 'app/models/lane.rb', line 60

def external_release_text
  return 'Unknown' if external_release.nil?

  external_release? ? 'Yes' : 'No'
end

#friendly_nameObject


44
45
46
# File 'app/models/lane.rb', line 44

def friendly_name
  name.presence || id # TODO: Maybe add location?
end

#labwareObject


40
41
42
# File 'app/models/lane.rb', line 40

def labware
  super || build_labware(sti_type: 'Lane::Labware', receptacle: self)
end

#legacy_asset_typeObject

Compatibility for v1 API maintains legacy 'type' for assets


67
68
69
# File 'app/models/lane.rb', line 67

def legacy_asset_type
  sti_type
end

#rebroadcastObject


56
57
58
# File 'app/models/lane.rb', line 56

def rebroadcast
  requests_as_target.each { |r| r.batch.try(:rebroadcast) }
end

#source_labwaresObject


52
53
54
# File 'app/models/lane.rb', line 52

def source_labwares
  requests_as_target.map(&:asset).map(&:labware).uniq
end

#subject_typeObject


48
49
50
# File 'app/models/lane.rb', line 48

def subject_type
  'lane'
end