Class: Minibwa::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/minibwa/options.rb,
ext/minibwa/mb_options.c

Overview

Alignment parameters, a Ruby view of mb_opt_t.

The class and all of its field accessors come from mb_options.c; this file reopens it for what reads better in Ruby -- keyword initialization, #to_h and #inspect, and rejecting an unknown preset name before it reaches mb_opt_preset().

Presets are "sr", "adap" and "lr". Note that mb_opt_init() applies "adap", so a fresh Options is paired-end and adaptive by default.

Constant Summary collapse

PRESETS =

Supported preset names for #preset.

%w[sr adap lr].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#new(**kwargs) ⇒ Options

Returns a new Options initialised with mb_opt_init() (adaptive paired-end defaults). Pass keyword arguments to override individual fields, e.g.

Options.new(bw: 500, min_len: 19)


177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'ext/minibwa/mb_options.c', line 177

static VALUE
mb_opt_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE kwargs;
    rb_scan_args(argc, argv, ":", &kwargs);

    if (!NIL_P(kwargs)) {
        static ID id_keyword_new;
        if (!id_keyword_new)
            id_keyword_new = rb_intern("__keyword_new__");
        /* Delegate to Ruby-side keyword handling in lib/minibwa/options.rb */
        rb_funcall(self, id_keyword_new, 1, kwargs);
    }
    return Qnil;
}

Instance Attribute Details

#a ⇒ Integer

Returns match score.

Returns:

  • (Integer) —

    match score.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#b ⇒ Integer

Returns mismatch penalty.

Returns:

  • (Integer) —

    mismatch penalty.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#b_ambi ⇒ Integer

Returns ambiguous-base mismatch penalty.

Returns:

  • (Integer) —

    ambiguous-base mismatch penalty.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#b_ts ⇒ Integer

Returns transition mismatch penalty.

Returns:

  • (Integer) —

    transition mismatch penalty.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#best_n ⇒ Integer

Returns number of best hits retained.

Returns:

  • (Integer) —

    number of best hits retained.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#bw ⇒ Integer

Returns band width for dynamic programming.

Returns:

  • (Integer) —

    band width for dynamic programming.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#bw_long ⇒ Integer

Returns band width for long alignments.

Returns:

  • (Integer) —

    band width for long alignments.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#cap_kalloc ⇒ Integer

Returns kalloc capacity limit.

Returns:

  • (Integer) —

    kalloc capacity limit.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#chain_gap_scale ⇒ Float

Returns gap penalty scale for chaining.

Returns:

  • (Float) —

    gap penalty scale for chaining.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#e ⇒ Integer

Returns gap-extension penalty.

Returns:

  • (Integer) —

    gap-extension penalty.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#e2 ⇒ Integer

Returns second gap-extension penalty.

Returns:

  • (Integer) —

    second gap-extension penalty.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#end_bonus ⇒ Integer

Returns alignment end bonus.

Returns:

  • (Integer) —

    alignment end bonus.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#flag ⇒ Integer

Returns raw bit flags.

Returns:

  • (Integer) —

    raw bit flags.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#mask_len ⇒ Integer

Returns masking length threshold.

Returns:

  • (Integer) —

    masking length threshold.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#mask_level ⇒ Float

Returns masking level for secondary hits.

Returns:

  • (Float) —

    masking level for secondary hits.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_chain_iter ⇒ Integer

Returns maximum chaining iterations.

Returns:

  • (Integer) —

    maximum chaining iterations.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_chain_skip ⇒ Integer

Returns maximum skipped anchors during chaining.

Returns:

  • (Integer) —

    maximum skipped anchors during chaining.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_gap ⇒ Integer

Returns maximum gap size considered during chaining.

Returns:

  • (Integer) —

    maximum gap size considered during chaining.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_mb_size ⇒ Integer

Returns maximum mini-batch size.

Returns:

  • (Integer) —

    maximum mini-batch size.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_occ ⇒ Integer

Returns maximum occurrence count for seeds.

Returns:

  • (Integer) —

    maximum occurrence count for seeds.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_pe_ins ⇒ Integer

Returns maximum paired-end insert size.

Returns:

  • (Integer) —

    maximum paired-end insert size.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_rescue ⇒ Integer

Returns maximum rescue attempts.

Returns:

  • (Integer) —

    maximum rescue attempts.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_sr_len ⇒ Integer

Returns maximum short-read length.

Returns:

  • (Integer) —

    maximum short-read length.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_sub_occ ⇒ Integer

Returns maximum occurrence count for sub-seeds.

Returns:

  • (Integer) —

    maximum occurrence count for sub-seeds.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#max_sw_mat ⇒ Integer

Returns maximum Smith-Waterman matrix size.

Returns:

  • (Integer) —

    maximum Smith-Waterman matrix size.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#mb_size ⇒ Integer

Returns mini-batch size.

Returns:

  • (Integer) —

    mini-batch size.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#min_chain_score ⇒ Integer

Returns minimum chaining score.

Returns:

  • (Integer) —

    minimum chaining score.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#min_dp_max ⇒ Integer

Returns minimum dynamic-programming score.

Returns:

  • (Integer) —

    minimum dynamic-programming score.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#min_ksw_len ⇒ Integer

Returns minimum length for Smith-Waterman alignment.

Returns:

  • (Integer) —

    minimum length for Smith-Waterman alignment.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#min_len ⇒ Integer

Returns minimum seed length.

Returns:

  • (Integer) —

    minimum seed length.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#n_thread ⇒ Integer

Returns number of threads for batch work.

Returns:

  • (Integer) —

    number of threads for batch work.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#out_n ⇒ Integer

Returns maximum number of output alignments.

Returns:

  • (Integer) —

    maximum number of output alignments.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#out_s ⇒ Float

Returns minimum output score ratio.

Returns:

  • (Float) —

    minimum output score ratio.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pe_avg ⇒ Integer

Returns paired-end insert-size average.

Returns:

  • (Integer) —

    paired-end insert-size average.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pe_hi ⇒ Integer

Returns paired-end upper insert-size bound.

Returns:

  • (Integer) —

    paired-end upper insert-size bound.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pe_lo ⇒ Integer

Returns paired-end lower insert-size bound.

Returns:

  • (Integer) —

    paired-end lower insert-size bound.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pe_std ⇒ Integer

Returns paired-end insert-size standard deviation.

Returns:

  • (Integer) —

    paired-end insert-size standard deviation.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pen_unpair ⇒ Integer

Returns unpaired alignment penalty.

Returns:

  • (Integer) —

    unpaired alignment penalty.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pri_ratio ⇒ Float

Returns primary-to-secondary score ratio.

Returns:

  • (Float) —

    primary-to-secondary score ratio.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#q ⇒ Integer

Returns gap-open penalty.

Returns:

  • (Integer) —

    gap-open penalty.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#q2 ⇒ Integer

Returns second gap-open penalty.

Returns:

  • (Integer) —

    second gap-open penalty.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#sb_len ⇒ Integer

Returns sequence batch length.

Returns:

  • (Integer) —

    sequence batch length.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#sb_seq ⇒ Integer

Returns sequence batch count.

Returns:

  • (Integer) —

    sequence batch count.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#seed ⇒ Integer

Returns random seed.

Returns:

  • (Integer) —

    random seed.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#xa_max ⇒ Integer

Returns maximum XA tag hits.

Returns:

  • (Integer) —

    maximum XA tag hits.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#zdrop ⇒ Integer

Returns Z-drop threshold.

Returns:

  • (Integer) —

    Z-drop threshold.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#zdrop_inv ⇒ Integer

Returns inversion Z-drop threshold.

Returns:

  • (Integer) —

    inversion Z-drop threshold.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

Instance Method Details

#adap=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#adap? ⇒ Boolean

Returns whether adaptive mode is enabled.

Returns:

  • (Boolean) —

    whether adaptive mode is enabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#copy_comment=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#copy_comment? ⇒ Boolean

Returns whether FASTQ comments are copied.

Returns:

  • (Boolean) —

    whether FASTQ comments are copied.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#eqx=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#eqx? ⇒ Boolean

Returns whether CIGAR uses =/X operators.

Returns:

  • (Boolean) —

    whether CIGAR uses =/X operators.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#inspect ⇒ Object

Returns a compact representation of all option fields.



218
219
220
# File 'lib/minibwa/options.rb', line 218

def inspect
  "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
end

#long_mode=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#long_mode? ⇒ Boolean

Returns whether long-read mode is enabled.

Returns:

  • (Boolean) —

    whether long-read mode is enabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#meth=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#meth? ⇒ Boolean

Returns whether methylation mode is enabled.

Returns:

  • (Boolean) —

    whether methylation mode is enabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#no_aln=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#no_aln? ⇒ Boolean

Returns whether alignment is disabled.

Returns:

  • (Boolean) —

    whether alignment is disabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#no_kalloc=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#no_kalloc? ⇒ Boolean

Returns whether kalloc is disabled.

Returns:

  • (Boolean) —

    whether kalloc is disabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#no_pairing=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#no_pairing? ⇒ Boolean

Returns whether pairing is disabled.

Returns:

  • (Boolean) —

    whether pairing is disabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#no_unmap=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#no_unmap? ⇒ Boolean

Returns whether unmapped records are suppressed.

Returns:

  • (Boolean) —

    whether unmapped records are suppressed.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#paf=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#paf? ⇒ Boolean

Returns whether PAF output mode is enabled.

Returns:

  • (Boolean) —

    whether PAF output mode is enabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pe=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pe? ⇒ Boolean

Returns whether paired-end mode is enabled.

Returns:

  • (Boolean) —

    whether paired-end mode is enabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pe_predef=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#pe_predef? ⇒ Boolean

Returns whether paired-end bounds are predefined.

Returns:

  • (Boolean) —

    whether paired-end bounds are predefined.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#preset(name) ⇒ Object

Applies a named preset with validation.

opt.preset("sr")   # => true
opt.preset("bad")  # raises ArgumentError


189
190
191
192
193
194
195
# File 'lib/minibwa/options.rb', line 189

def preset(name)
  unless PRESETS.include?(name.to_s)
    raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
  end

  preset!(name)
end

#preset!(name) ⇒ Boolean

Applies a named preset. Returns true on success, false if the preset name is unknown. Known presets: "sr", "adap", "lr".

Returns:

  • (Boolean)


200
201
202
203
204
205
206
# File 'ext/minibwa/mb_options.c', line 200

static VALUE
rb_minibwa_opt_preset(VALUE self, VALUE name)
{
    mb_opt_t *opt = rb_minibwa_get_opt(self);
    const char *s = StringValueCStr(name);
    return mb_opt_preset(opt, s) == 0 ? Qtrue : Qfalse;
}

#primary5=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#primary5? ⇒ Boolean

Returns whether primary alignment selection is 5-prime based.

Returns:

  • (Boolean) —

    whether primary alignment selection is 5-prime based.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#second_seq=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#second_seq? ⇒ Boolean

Returns whether second-sequence output is enabled.

Returns:

  • (Boolean) —

    whether second-sequence output is enabled.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#supp_soft=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#supp_soft? ⇒ Boolean

Returns whether supplementary alignments use soft clipping.

Returns:

  • (Boolean) —

    whether supplementary alignments use soft clipping.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#to_h ⇒ Object

Returns all field values as a Hash.



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/minibwa/options.rb', line 198

def to_h
  {
    flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
    bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
    max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
    min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
    mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
    best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
    q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
    min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
    min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
    pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
    pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
    n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
    xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
    max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
  }
end

#write_cs=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#write_cs? ⇒ Boolean

Returns whether the CS tag is emitted.

Returns:

  • (Boolean) —

    whether the CS tag is emitted.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#write_ds=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#write_ds? ⇒ Boolean

Returns whether the DS tag is emitted.

Returns:

  • (Boolean) —

    whether the DS tag is emitted.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#write_md=(value) ⇒ Object

Returns value.

Returns:

  • (Object) —

    value



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end

#write_md? ⇒ Boolean

Returns whether the MD tag is emitted.

Returns:

  • (Boolean) —

    whether the MD tag is emitted.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/minibwa/options.rb', line 181

class Options
  # Supported preset names for {#preset}.
  PRESETS = %w[sr adap lr].freeze

  # Applies a named preset with validation.
  #
  #   opt.preset("sr")   # => true
  #   opt.preset("bad")  # raises ArgumentError
  def preset(name)
    unless PRESETS.include?(name.to_s)
      raise ArgumentError, "unknown preset: #{name.inspect}, expected one of #{PRESETS.inspect}"
    end

    preset!(name)
  end

  # Returns all field values as a Hash.
  def to_h
    {
      flag: flag, min_len: min_len, max_sub_occ: max_sub_occ, max_occ: max_occ,
      bw: bw, bw_long: bw_long, max_gap: max_gap, max_sr_len: max_sr_len,
      max_chain_skip: max_chain_skip, max_chain_iter: max_chain_iter,
      min_chain_score: min_chain_score, chain_gap_scale: chain_gap_scale,
      mask_level: mask_level, mask_len: mask_len, pri_ratio: pri_ratio,
      best_n: best_n, a: a, b: b, b_ts: b_ts, b_ambi: b_ambi,
      q: q, q2: q2, e: e, e2: e2, end_bonus: end_bonus,
      min_dp_max: min_dp_max, zdrop: zdrop, zdrop_inv: zdrop_inv,
      min_ksw_len: min_ksw_len, max_pe_ins: max_pe_ins, max_rescue: max_rescue,
      pen_unpair: pen_unpair, pe_avg: pe_avg, pe_std: pe_std,
      pe_lo: pe_lo, pe_hi: pe_hi, sb_len: sb_len, sb_seq: sb_seq,
      n_thread: n_thread, out_n: out_n, out_s: out_s, seed: seed,
      xa_max: xa_max, mb_size: mb_size, max_mb_size: max_mb_size,
      max_sw_mat: max_sw_mat, cap_kalloc: cap_kalloc
    }
  end

  # Returns a compact representation of all option fields.
  def inspect
    "#<#{self.class.name} #{to_h.map { |k, v| "#{k}=#{v.inspect}" }.join(', ')}>"
  end

  private

  # Called from C's initialize with a keyword-arguments Hash.
  # @api private
  def __keyword_new__(kwargs)
    kwargs.each do |key, value|
      setter = :"#{key}="
      raise ArgumentError, "unknown option: #{key}" unless respond_to?(setter)

      public_send(setter, value)
    end
  end
end