1 #ifndef GENESIS_SEQUENCE_FUNCTIONS_SIGNATURE_SPECIFICATIONS_H_ 2 #define GENESIS_SEQUENCE_FUNCTIONS_SIGNATURE_SPECIFICATIONS_H_ 142 return unknown_char_behavior_;
154 return is_nucleic_acids_;
165 return index_lookup_[c];
171 std::vector<std::string>
const&
kmer_list()
const;
196 unknown_char_behavior_ = value;
207 std::string alphabet_;
212 bool is_nucleic_acids_ =
false;
216 mutable std::vector<std::string> kmer_list_;
217 mutable std::vector<std::string> rev_comp_list_;
218 mutable std::vector<size_t> rev_comp_map_;
219 mutable std::vector<size_t> rev_comp_indices_;
225 #endif // include guard ~SignatureSpecifications()=default
Default destructor.
std::vector< size_t > const & kmer_combined_reverse_complement_map() const
Get a map from indices of kmer_list() and signature_counts() vectors to a smaller list which combines...
SignatureSpecifications & unknown_char_behavior(UnknownCharBehavior value)
std::vector< std::string > const & kmer_list() const
Return the list of all possible k-mers for the given k and alphabet.
size_t char_index(char c) const
Return the index of a char within the alphabet().
SignatureSpecifications & operator=(SignatureSpecifications const &)=default
Default copy assignment.
size_t kmer_list_size() const
bool is_nucleic_acids() const
Speedup and shortcut to test whether the alphabet() is "ACGT".
static size_t const InvalidCharIndex
Value that is used to indicate an invalid (non-alphabet) char when using index_of().
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
std::string const & alphabet() const
UnknownCharBehavior unknown_char_behavior() const
std::vector< size_t > const & kmer_reverse_complement_indices() const
Get the indices for each kmer in kmer_list() to its reverse complement in the list.
Specifications for calculating signatures (like k-mer counts) from Sequences.
UnknownCharBehavior
List of policies to decide what to do when a char that is not part of the alphabet occurs while count...
size_t kmer_reverse_complement_list_size(bool with_palindromes=true) const
Simply ignore the char by skipping it.
SignatureSpecifications()=default
std::vector< std::string > const & kmer_reverse_complement_list() const