A library for working with phylogenetic and population genetic data.
v0.27.0
VariantInputIteratorData Struct Reference

#include <genesis/population/formats/variant_input_iterator.hpp>

Detailed Description

Data storage for input-specific information when traversing a variant file.

This is used by VariantInputIterator, see there for details.

The utils::LambdaIterator allows us to store some extra data. When traversing a file as a list of Variants, one per genomic position, we can use this extra field to store information such as the file name and the individual sample names.

In the future, we might even want to store pointers to the underlying iterators and readers (useful for VCF for example), so that users can work with them when iterating. For now however, we just store some basic information.

Definition at line 80 of file variant_input_iterator.hpp.

Public Attributes

std::string file_path
 Full file path, when reading from a file. More...
 
std::vector< std::string > sample_names
 Sample names, for example as found in the file header. More...
 
std::string source_name
 User-readable name of the input source. More...
 

Member Data Documentation

◆ file_path

std::string file_path

Full file path, when reading from a file.

Definition at line 85 of file variant_input_iterator.hpp.

◆ sample_names

std::vector<std::string> sample_names

Sample names, for example as found in the file header.

Not all input file formats contain sample names. In that case, this field is left empty, independent of the number of samples contained in the file. That means that downstream processing needs to check this if sample names are going to be used (e.g., for output).

Definition at line 101 of file variant_input_iterator.hpp.

◆ source_name

std::string source_name

User-readable name of the input source.

This can for example be the file base name, without path and extensions.

Definition at line 92 of file variant_input_iterator.hpp.


The documentation for this struct was generated from the following file: