#include <genesis/population/window/window.hpp>
Data that is stored per entry that was enqueued in a window.
This is the data that the per-window computation is based on. We store the actual user-provided D
/Data
type, as well as its position in the genome (as for example given by the POS
column in a VCF file), and the index within the current chromosome - that is, the how many'th Entry this data point is in the list of enqueued data (starting from zero for each chromosome).
Definition at line 125 of file window.hpp.
Public Member Functions | |
Entry (size_t index, size_t position, Data &&data) | |
Contructor that takes data by r-value reference (i.e., moved data); preferred if possible to use, for speed. More... | |
Entry (size_t index, size_t position, Data const &data) | |
Contructor that takes data by reference. More... | |
operator Data & () | |
Implicit conversion to Data& type. More... | |
operator Data const & () const | |
Implicit conversion to Data const& type. More... | |
Public Attributes | |
Data | data |
Data stored in the Window for this entry. More... | |
size_t | index |
Index of the entry, that is, how many other entries have there been in total in the underlying data for the current chromosome. More... | |
size_t | position |
Genomic position (1-based) of the entry along a chromosome. More... | |
Contructor that takes data
by reference.
Definition at line 130 of file window.hpp.
Contructor that takes data
by r-value reference (i.e., moved data); preferred if possible to use, for speed.
Definition at line 140 of file window.hpp.
|
inline |
Implicit conversion to Data&
type.
Useful to plug in a Window into some function expecting a range of Data objects.
Definition at line 151 of file window.hpp.
|
inline |
Implicit conversion to Data const&
type.
Useful to plug in a Window into some function expecting a range of Data objects.
Definition at line 161 of file window.hpp.
Data data |
Data stored in the Window for this entry.
Definition at line 187 of file window.hpp.
size_t index |
Index of the entry, that is, how many other entries have there been in total in the underlying data for the current chromosome.
This is useful for example when working with SlidingWindowType::kVariants, to know the how many-th variant in the chromosome the entry is. Gets reset to 0 for each chromosome.
Definition at line 173 of file window.hpp.
size_t position |
Genomic position (1-based) of the entry along a chromosome.
We here only store the position; for the name of the chromosome, call Window::chromosome(), because for storage and speed reasons, we do not copy and store the chromosome name with every entry.
Definition at line 182 of file window.hpp.