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'
]
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'
]
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, required_tags

Methods included from AliquotIndexer::Indexable

#index_aliquots

Methods included from Api::LaneIO::Extensions

included

Methods inherited from Receptacle

#api_asset_type, #assign_tag2, #attach_tag, #been_through_qc?, #compatible_qc_state, #created_with_request_options, #latest_stock_metrics, #library_information, #library_types, #outer_request, #primary_aliquot_if_unique, #related_studies, #set_as_library, #set_qc_state, #tag_range, #update_aliquot_quality

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

Instance Method Details

#external_release_textObject


72
73
74
75
76
# File 'app/models/lane.rb', line 72

def external_release_text
  return 'Unknown' if external_release.nil?

  external_release? ? 'Yes' : 'No'
end

#friendly_nameObject


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

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

#legacy_asset_typeObject

Compatibility for v1 API maintains legacy 'type' for assets


79
80
81
# File 'app/models/lane.rb', line 79

def legacy_asset_type
  sti_type
end

#rebroadcastObject


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

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

#source_labwaresObject


64
65
66
# File 'app/models/lane.rb', line 64

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

#subject_typeObject


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

def subject_type
  'lane'
end