Class: BioDSL::CollectOtus
- Inherits:
-
Object
- Object
- BioDSL::CollectOtus
- Defined in:
- lib/BioDSL/commands/collect_otus.rb
Overview
Collect OTU data from records in the stream.
collect_otus
count the number of times each OTU is found in a set of samples. OTUs are given by the :S_ID key and samples by the :SAMPLE key. If a :SEQ_COUNT key is present it will be used to increment the OTU count, allowing for dereplicated sequences to be used.
Usage
collect_otus()
Options
Examples
Constant Summary collapse
- STATS =
%i(records_in records_out hits_in hits_out)
Instance Method Summary collapse
-
#initialize(options) ⇒ CollectOtus
constructor
Constructor for CollectOtus.
-
#lmb ⇒ Proc
Return lambda for CollectOtus command.
Constructor Details
#initialize(options) ⇒ CollectOtus
Constructor for CollectOtus.
52 53 54 55 56 |
# File 'lib/BioDSL/commands/collect_otus.rb', line 52 def initialize() @options = end |
Instance Method Details
#lmb ⇒ Proc
Return lambda for CollectOtus command.
61 62 63 64 65 66 67 68 69 |
# File 'lib/BioDSL/commands/collect_otus.rb', line 61 def lmb lambda do |input, output, status| status_init(status, STATS) count_hash = process_input(input, output) samples = collect_samples(count_hash) process_output(count_hash, samples, output) end end |