A library for working with phylogenetic and population genetic data.
v0.27.0
consensus.hpp File Reference
#include <string>

Go to the source code of this file.

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::sequence
 

Functions

std::string consensus_sequence_cavener (SequenceSet const &sequences, bool allow_gaps=true)
 Calculate a consensus sequence using the method by Cavener for nucleic acid codes ACGT and their ambiguities. More...
 
std::string consensus_sequence_cavener (SiteCounts const &counts, bool allow_gaps=true)
 Calculate a consensus sequence using the method by Cavener for nucleic acid codes ACGT and their ambiguities. More...
 
std::string consensus_sequence_with_ambiguities (SequenceSet const &sequences, double similarity_factor=0.9, bool allow_gaps=true)
 Calculate a consensus sequence by using the most frequent characters at each site, for nucleic acid codes ACGT and their ambiguities. More...
 
std::string consensus_sequence_with_ambiguities (SiteCounts const &counts, double similarity_factor=0.9, bool allow_gaps=true)
 Calculate a consensus sequence by using the most frequent characters at each site, for nucleic acid codes ACGT and their ambiguities. More...
 
std::string consensus_sequence_with_majorities (SequenceSet const &sequences, bool allow_gaps=true)
 Calculate the majority rule consensus sequence by using the most frequent character at each site for nucleic acid codes ACGT. More...
 
std::string consensus_sequence_with_majorities (SequenceSet const &sequences, std::string const &characters, bool allow_gaps=true, char gap_char='-')
 Calculate the majority rule consensus sequence by using the most frequent character at each site. More...
 
std::string consensus_sequence_with_majorities (SiteCounts const &counts, bool allow_gaps=true, char gap_char='-')
 Calculate the majority rule consensus sequence by using the most frequent character at each site. More...
 
std::string consensus_sequence_with_threshold (SequenceSet const &sequences, double frequency_threshold=0.6, bool allow_gaps=true, bool use_ambiguities=true)
 Calculate a consensus sequence where the character frequency needs to be above a given threshold, for nucleic acid codes ACGT. More...
 
std::string consensus_sequence_with_threshold (SiteCounts const &counts, double frequency_threshold=0.6, bool allow_gaps=true, bool use_ambiguities=true)
 Calculate a consensus sequence where the character frequency needs to be above a given threshold, for nucleic acid codes ACGT. More...