#include <genesis/population/window/sliding_interval_window_iterator.hpp>
Inherits BaseWindowIterator< ForwardIterator, typename ForwardIterator::value_type >.
Iterator for sliding Windows of fixed sized intervals over the chromosomes of a genome.
The three functors
have to be set in the class prior to starting the iteration, as well as the width(). All other settings are optional and/or defaulted to reasonable values.
See BaseWindowIterator for more details on the three functors, the template parameters, and general usage examples of the class.
Definition at line 66 of file sliding_interval_window_iterator.hpp.
Public Types | |
using | base_type = BaseWindowIterator< ForwardIterator, DataType > |
using | const_reference = value_type const & |
using | Entry = typename Window::Entry |
using | InputType = typename ForwardIterator::value_type |
using | iterator_category = std::input_iterator_tag |
using | pointer = value_type * |
using | reference = value_type & |
using | self_type = SlidingIntervalWindowIterator< ForwardIterator, DataType > |
using | value_type = Window |
using | Window = ::genesis::population::Window< DataType > |
Public Types inherited from BaseWindowIterator< ForwardIterator, typename ForwardIterator::value_type > | |
using | const_reference = value_type const & |
using | Entry = typename Window::Entry |
using | InputType = typename ForwardIterator::value_type |
using | iterator_category = std::input_iterator_tag |
using | pointer = value_type * |
using | reference = value_type & |
using | self_type = BaseWindowIterator< ForwardIterator, typename ForwardIterator::value_type > |
using | value_type = Window |
using | Window = ::genesis::population::Window< typename ForwardIterator::value_type > |
Public Attributes | |
friend | DerivedIterator |
Public Attributes inherited from BaseWindowIterator< ForwardIterator, typename ForwardIterator::value_type > | |
std::function< std::string(InputType const &)> | chromosome_function |
Functor that yields the current chromosome, given the input iterator data. More... | |
std::function< typename ForwardIterator::value_type(InputType const &)> | entry_input_function |
Functor to convert from the underlying input iterator that provides the data to fill the windows to the data that is stored per window. More... | |
friend | Iterator |
std::function< size_t(InputType const &)> | position_function |
Functor that yields the current position on the chromosome, given the input iterator data. More... | |
Classes | |
class | DerivedIterator |
Internal iterator that produces Windows. More... | |
Protected Member Functions | |
std::unique_ptr< typename BaseWindowIterator< ForwardIterator, DataType >::BaseIterator > | get_begin_iterator_ () override final |
std::unique_ptr< typename BaseWindowIterator< ForwardIterator, DataType >::BaseIterator > | get_end_iterator_ () override final |
|
inline |
Definition at line 344 of file sliding_interval_window_iterator.hpp.
|
default |
|
default |
|
default |
|
inline |
Definition at line 415 of file sliding_interval_window_iterator.hpp.
|
inline |
Select whether the iterator produces empty windows in the beginning of each chromosome, before the first actual position that is reported by the underlying data.
Say the underlying iterator has the first Variant (or whatever datatype it iterates over) at position 1020 for a chromosome, and we use a window size of 100. If this setting is set to true
, the iterator will emit 10 empty windows before reaching this position. If set to false
, it will skip these, and start at position 1001, which is the first one that would have been reached by striding along the chromosome.
Definition at line 409 of file sliding_interval_window_iterator.hpp.
|
inlinefinaloverrideprotectedvirtual |
Implements BaseWindowIterator< ForwardIterator, typename ForwardIterator::value_type >.
Definition at line 427 of file sliding_interval_window_iterator.hpp.
|
inlinefinaloverrideprotectedvirtual |
Implements BaseWindowIterator< ForwardIterator, typename ForwardIterator::value_type >.
Definition at line 436 of file sliding_interval_window_iterator.hpp.
|
default |
|
default |
|
inline |
Definition at line 394 of file sliding_interval_window_iterator.hpp.
|
inline |
Stride of the Window, that is, how many positions to move forward with each iteration.
The stride his is the shift towards the next interval, determining how the first and last position in each Window change. It has to be <= width
. If stride is set to 0 (default), it is set automatically to the width when starting the iteration.
Definition at line 388 of file sliding_interval_window_iterator.hpp.
|
inline |
Definition at line 376 of file sliding_interval_window_iterator.hpp.
|
inline |
Width of the Window, that is, the fixed length along the chromosome.
The width has to be > 0
. This is the length of the interval, determining the first and last position in each Window.
Definition at line 370 of file sliding_interval_window_iterator.hpp.
using base_type = BaseWindowIterator<ForwardIterator, DataType> |
Definition at line 75 of file sliding_interval_window_iterator.hpp.
using const_reference = value_type const& |
Definition at line 85 of file sliding_interval_window_iterator.hpp.
using Entry = typename Window::Entry |
Definition at line 78 of file sliding_interval_window_iterator.hpp.
using InputType = typename ForwardIterator::value_type |
Definition at line 79 of file sliding_interval_window_iterator.hpp.
using iterator_category = std::input_iterator_tag |
Definition at line 81 of file sliding_interval_window_iterator.hpp.
using pointer = value_type* |
Definition at line 83 of file sliding_interval_window_iterator.hpp.
using reference = value_type& |
Definition at line 84 of file sliding_interval_window_iterator.hpp.
using self_type = SlidingIntervalWindowIterator<ForwardIterator, DataType> |
Definition at line 74 of file sliding_interval_window_iterator.hpp.
using value_type = Window |
Definition at line 82 of file sliding_interval_window_iterator.hpp.
using Window = ::genesis::population::Window<DataType> |
Definition at line 77 of file sliding_interval_window_iterator.hpp.
friend DerivedIterator |
Definition at line 358 of file sliding_interval_window_iterator.hpp.