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, #most_recent_requests_as_target_group_by_same_source, #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 Receptacle::DownstreamAliquotsRemoval::Mixin

#allow_to_remove_downstream_aliquots?

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

#ancestor_of_purpose, #asset_type_for_request_types, #barcode_number, #compatible_purposes, #contained_samples, #details, #generate_barcode, #get_qc_result_value_for, #has_stock_asset?, #label, #label=, #original_stock_plates, #prefix, #printable?, #printable_target, #register_stock!, #request_types, #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

alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

Instance Method Details

#external_release_textObject



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

def external_release_text
  return 'Unknown' if external_release.nil?

  external_release? ? 'Yes' : 'No'
end

#friendly_nameObject



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

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

#labwareObject



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

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

#legacy_asset_typeObject

Compatibility for v1 API maintains legacy ‘type’ for assets



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

def legacy_asset_type
  sti_type
end

#rebroadcastObject



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

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

#source_labwaresObject



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

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

#subject_typeObject



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

def subject_type
  'lane'
end