A toolkit for working with phylogenetic data.
v0.18.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
labels.cpp File Reference

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

void filter_by_label_list (SequenceSet &set, std::unordered_set< std::string > const &labels, bool invert=false)
 Remove all those Sequences from a SequenceSet whose labels are in the given list. More...
 
Sequence const * find_sequence (SequenceSet const &set, std::string const &label)
 Return a pointer to a Sequence with a specific label, or nullptr iff not found. More...
 
bool has_unique_labels (SequenceSet const &set, bool case_sensitive=true)
 Return true iff all labels of the Sequences in the SequenceSet are unique. More...
 
bool has_valid_label (Sequence const &seq)
 Check whether a Sequence has a valid label. More...
 
bool has_valid_labels (SequenceSet const &set)
 Check whether all Sequences in a SequenceSet have valid labels. More...
 
bool is_valid_label (std::string const &label)
 Check whether a given string is a valid label for a Sequence. More...
 
std::unordered_set< std::string > labels (SequenceSet const &set)
 Return a set of all labels of the SequenceSet. More...
 
void relabel_sha1 (Sequence &seq)
 Relabel the Sequence using the SHA1 hash digest of its sites. More...
 
void relabel_sha1 (SequenceSet &set)
 Relabel all Sequences in the SequenceSet using the SHA1 hash digest of the sites. More...
 
std::string sanitize_label (std::string const &label)
 Sanitize a label by replacing all invalid characters with underscores. More...
 
void sanitize_label (Sequence &seq)
 Sanitize a label by replacing all invalid characters with underscores. More...
 
void sanitize_labels (SequenceSet &set)
 Sanitize the labels of all Sequences in the SequenceSet by replacing all invalid characters with underscores. More...