Class: BioDSL::UchimeRef
- Inherits:
-
Object
- Object
- BioDSL::UchimeRef
- Includes:
- AuxHelper
- Defined in:
- lib/BioDSL/commands/uchime_ref.rb
Overview
Run uchime_ref on sequences in the stream.
This is a wrapper for the usearch
tool to run the program uchime_ref. Basically sequence type records are searched against a reference database or non-chimeric sequences, and chimirec sequences are filtered out so only non-chimeric sequences are output.
Please refer to the manual:
drive5.com/usearch/manual/uchime_ref.html
Usearch 7.0 must be installed for usearch
to work. Read more here:
Usage
uchime_ref(<database: <file>[cpus: <uint>])
Options
-
database: <file> - Database to search (in FASTA format).
-
cpus: <uint> - Number of CPU cores to use (default=1).
Examples
Constant Summary collapse
- STATS =
%i(records_in records_out sequences_in sequences_out residues_in residues_out)
Instance Method Summary collapse
-
#initialize(options) ⇒ UchimeRef
constructor
Constructor for UchimeRef.
-
#lmb ⇒ Proc
Return command lambda for uchime_ref.
Methods included from AuxHelper
Constructor Details
#initialize(options) ⇒ UchimeRef
Constructor for UchimeRef.
70 71 72 73 74 75 76 |
# File 'lib/BioDSL/commands/uchime_ref.rb', line 70 def initialize() @options = aux_exist('usearch') @options[:cpus] ||= 1 @options[:strand] ||= 'plus' # This option cant be changed in usearch7.0 end |
Instance Method Details
#lmb ⇒ Proc
Return command lambda for uchime_ref.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/BioDSL/commands/uchime_ref.rb', line 81 def lmb lambda do |input, output, status| status_init(status, STATS) TmpDir.create('input', 'output') do |tmp_in, tmp_out| process_input(input, output, tmp_in) run_uchime_ref(tmp_in, tmp_out) process_output(output, tmp_out) end end end |