A library for working with phylogenetic and population genetic data.
v0.32.0
VariantInputStreamData Struct Reference

#include <genesis/population/stream/variant_input_stream.hpp>

Detailed Description

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

This is used by VariantInputStream, see there for details.

The utils::GenericInputStream 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 streams 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 61 of file stream/variant_input_stream.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 66 of file stream/variant_input_stream.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 might be left empty, or filled with names based on the source name and 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). The make_variant_input_stream_from_...() functions for instance fill this list with names based on the source name, and a numbered list of samples, such as file-1.

Definition at line 85 of file stream/variant_input_stream.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 73 of file stream/variant_input_stream.hpp.


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