Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
gamgee::IndexedVariantReader< ITERATOR > Class Template Reference

Utility class to read an indexed BCF file by intervals using an appropriate Variant iterator in a for-each loop. More...

#include <indexed_variant_reader.h>

Public Member Functions

 IndexedVariantReader (const std::string &filename, const std::vector< std::string > &interval_list)
 reads through all records in a file matching one of the given intervals, parsing them into Variant objects More...
 
 IndexedVariantReader (const IndexedVariantReader &other)=delete
 an IndexedVariantReader cannot be copied safely, as it is iterating over a stream. More...
 
IndexedVariantReaderoperator= (const IndexedVariantReader &other)=delete
 
 IndexedVariantReader (IndexedVariantReader &&other)=default
 an IndexedVariantReader can be moved More...
 
IndexedVariantReaderoperator= (IndexedVariantReader &&other)=default
 
ITERATOR begin () const
 
ITERATOR end () const
 
VariantHeader header () const
 returns the variant header of the file being read More...
 

Detailed Description

template<class ITERATOR>
class gamgee::IndexedVariantReader< ITERATOR >

Utility class to read an indexed BCF file by intervals using an appropriate Variant iterator in a for-each loop.

NOTE: this will only parse BCF files with CSI indices

This class is designed to parse the file in for-each loops with the following signature:

for (auto& record : IndexedVariantReader<IndexedVariantIterator>{filename, intervals})
do_something_with_record(record);

Constructor & Destructor Documentation

template<class ITERATOR >
gamgee::IndexedVariantReader< ITERATOR >::IndexedVariantReader ( const std::string &  filename,
const std::vector< std::string > &  interval_list 
)
inline

reads through all records in a file matching one of the given intervals, parsing them into Variant objects

Parameters
filenamethe name of the variant file
interval_lista vector of intervals represented by strings. Empty vector for all intervals.
template<class ITERATOR >
gamgee::IndexedVariantReader< ITERATOR >::IndexedVariantReader ( const IndexedVariantReader< ITERATOR > &  other)
delete

an IndexedVariantReader cannot be copied safely, as it is iterating over a stream.

template<class ITERATOR >
gamgee::IndexedVariantReader< ITERATOR >::IndexedVariantReader ( IndexedVariantReader< ITERATOR > &&  other)
default

an IndexedVariantReader can be moved

Member Function Documentation

template<class ITERATOR >
ITERATOR gamgee::IndexedVariantReader< ITERATOR >::begin ( ) const
inline
template<class ITERATOR >
ITERATOR gamgee::IndexedVariantReader< ITERATOR >::end ( ) const
inline
template<class ITERATOR >
VariantHeader gamgee::IndexedVariantReader< ITERATOR >::header ( ) const
inline

returns the variant header of the file being read

template<class ITERATOR >
IndexedVariantReader& gamgee::IndexedVariantReader< ITERATOR >::operator= ( const IndexedVariantReader< ITERATOR > &  other)
delete
template<class ITERATOR >
IndexedVariantReader& gamgee::IndexedVariantReader< ITERATOR >::operator= ( IndexedVariantReader< ITERATOR > &&  other)
default

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