Class: Bio::MAF::AtLeastNSequencesFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/bio/maf/index.rb

Constant Summary

Constants included from KVHelpers

KVHelpers::CHROM_BIN_PREFIX_FMT, KVHelpers::KEY_FMT, KVHelpers::KEY_SCAN_FMT, KVHelpers::VAL_FMT, KVHelpers::VAL_IDX_OFFSET_FMT, KVHelpers::VAL_N_SEQ_FMT, KVHelpers::VAL_SPECIES_FMT, KVHelpers::VAL_TEXT_SIZE_FMT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Filter

#call

Methods included from KVHelpers

bin_start_prefix, extract_index_offset, extract_n_sequences, extract_species_vec, extract_text_size, unpack_key

Constructor Details

#initialize(n, idx) ⇒ AtLeastNSequencesFilter

Returns a new instance of AtLeastNSequencesFilter.



898
899
900
# File 'lib/bio/maf/index.rb', line 898

def initialize(n, idx)
  @n = n
end

Instance Attribute Details

#nObject (readonly)

Returns the value of attribute n.



897
898
899
# File 'lib/bio/maf/index.rb', line 897

def n
  @n
end

Instance Method Details

#match(entry) ⇒ Object



902
903
904
# File 'lib/bio/maf/index.rb', line 902

def match(entry)
  extract_n_sequences(entry) >= @n
end