Module: Ont
- Defined in:
- app/ont/ont.rb,
app/models/ont/run.rb,
app/models/ont/pool.rb,
app/models/ont/library.rb,
app/models/ont/request.rb,
app/models/ont/flowcell.rb,
app/models/ont/instrument.rb,
app/models/ont/min_know_version.rb
Overview
Information about ONT instruments, received by email:
Instrument Type: Strictly, the type names should be MinION, GridION or PromethION, if they are mixed-case (that’s what ONT call them).
Instrument Name: These are also the instrument host names for PromethION and GridION (they are essentially enhanced Linux boxes). MinIONs are just USB devices, so don’t have an instrument name as such.
Max Number of Flowcells: MinION is always 1. GridION is always 5. PromethION is 24 or 48, depending on the model. The one we have at the moment is 24. (ONT also sell a PromethION P2 with 2 flowcells, but we don’t have one).
Additional info: The flowcells in a GridION are arranged in a row and for customers e.g. via the ML warehouse, we address them in sequence 1-5 (i.e. 1-based indexing).
The flowcells on a PromethION are arranged in a grid, but we still allow addressing them in sequence 1-24 for customers (i.e. 1-based indexing, in column-major order).
Here’s some of our code for parsing the report JSON generated by PromethION runs which shows this explicitly: github.com/wtsi-npg/valet/blob/devel/valet/report.go
The instrument name for the current GridION is GXB02004 and the current PromethION is PC24B148.
MinIONs don’t have instrument names because they are just USB devices - I haven’t seen a MinION run for years, so I’m afraid that I can’t tell you if there is a logical equivalent that you can use instead.
Defined Under Namespace
Classes: Flowcell, Instrument, Library, MinKnowVersion, Pool, Request, Run
Class Method Summary collapse
- .associated_request_attributes ⇒ Object
- .direct_request_attributes ⇒ Object
- .library_attributes ⇒ Object
- .library_factory(request:, library_attributes:) ⇒ Object
- .pool_attributes ⇒ Object
-
.rebasecalling_processes ⇒ Array<String>
Returns a list of available rebasecalling processes for ONT runs.
- .request_attributes ⇒ Object
- .request_factory(sample:, container:, request_attributes:, resource_factory:, reception:) ⇒ Object
- .table_name_prefix ⇒ Object
Class Method Details
.associated_request_attributes ⇒ Object
25 26 27 |
# File 'app/ont/ont.rb', line 25 def self.associated_request_attributes %i[library_type data_type] end |
.direct_request_attributes ⇒ Object
29 30 31 |
# File 'app/ont/ont.rb', line 29 def self.direct_request_attributes request_attributes - associated_request_attributes end |
.library_attributes ⇒ Object
13 14 15 16 17 |
# File 'app/ont/ont.rb', line 13 def self.library_attributes %i[ volume concentration kit_barcode insert_size tag_id ] end |
.library_factory(request:, library_attributes:) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'app/ont/ont.rb', line 33 def self.library_factory(request:, library_attributes:) # Get the tag_set from the kit_barcode ont_tag_set = TagSet.find_by(name: library_attributes[:kit_barcode]) # Find the tag_id from the tag_set based on the tag_sequence/oligo if ont_tag_set.nil? library_attributes[:tag_id] = nil else library_attributes[:tag_id] = ont_tag_set..find_by(oligo: library_attributes[:tag_sequence])&.id end filtered_attributes = library_attributes.slice(*self.library_attributes) Ont::Library.new( request: request.requestable, **filtered_attributes ) end |
.pool_attributes ⇒ Object
9 10 11 |
# File 'app/ont/ont.rb', line 9 def self.pool_attributes %i[barcode volume concentration kit_barcode insert_size] end |
.rebasecalling_processes ⇒ Array<String>
Returns a list of available rebasecalling processes for ONT runs.
67 68 69 70 71 72 73 74 75 76 |
# File 'app/ont/ont.rb', line 67 def self.rebasecalling_processes [ 'None', '5mC and 5hmC (CG-context)', '5mC and 5hmC (all contexts)', '6mA (all contexts)', '5mC, 5hmC and 6mA (all contexts)', '5mC and 5hmC (CG-context) and 6mA (all contexts)' ] end |
.request_attributes ⇒ Object
19 20 21 22 23 |
# File 'app/ont/ont.rb', line 19 def self.request_attributes %i[ library_type data_type cost_code external_study_id number_of_flowcells ] end |
.request_factory(sample:, container:, request_attributes:, resource_factory:, reception:) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'app/ont/ont.rb', line 51 def self.request_factory(sample:, container:, request_attributes:, resource_factory:, reception:) ::Request.new( sample:, reception:, requestable: Ont::Request.new( container:, **request_attributes.slice(*self.request_attributes - associated_request_attributes), library_type: resource_factory.library_type_for(request_attributes), data_type: resource_factory.data_type_for(request_attributes) ) ) end |
.table_name_prefix ⇒ Object
5 6 7 |
# File 'app/ont/ont.rb', line 5 def self.table_name_prefix 'ont_' end |