|
Gamgee
You miserable little maggot. I'll stove your head in!
|
Utility class to read a VCF/BCF file with an appropriate Variant iterator from a stream (e.g. file, stdin, ...) in a for-each loop. More...
#include <variant_reader.h>
Public Member Functions | |
| VariantReader (const std::string &filename) | |
| reads through all records in a file (vcf or bcf) parsing them into Variant objects More... | |
| VariantReader (const std::vector< std::string > &filenames) | |
| reads through all records in a file (vcf or bcf) parsing them into Variant objects More... | |
| VariantReader (const std::string &filename, const std::vector< std::string > &samples, const bool include=true) | |
| reads through all records in a file (vcf or bcf) parsing them into Variant objects but only including the selected samples. To create a sites only file, simply pass an empty vector of samples. More... | |
| VariantReader (const std::vector< std::string > &filenames, const std::vector< std::string > &samples, const bool include=true) | |
| reads through all records in a file (vcf or bcf) parsing them into Variant objects but only including the selected samples. To create a sites only file, simply pass an empty vector of samples. More... | |
| VariantReader (const VariantReader &other)=delete | |
| a VariantReader cannot be copied safely, as it is iterating over a stream. More... | |
| VariantReader & | operator= (const VariantReader &other)=delete |
| VariantReader (VariantReader &&other)=default | |
| a VariantReader can be moved More... | |
| VariantReader & | operator= (VariantReader &&other)=default |
| ITERATOR | begin () const |
| creates a ITERATOR pointing at the start of the input stream (needed by for-each loop) More... | |
| ITERATOR | end () const |
| creates a ITERATOR with a nullified input stream (needed by for-each loop) More... | |
| VariantHeader | header () const |
| returns the variant header of the file being read More... | |
Utility class to read a VCF/BCF file with an appropriate Variant iterator from a stream (e.g. file, stdin, ...) in a for-each loop.
This class is designed to parse the file in for-each loops with the following signature:
You can also use it with the stdin or any other stream by using the default constructor or passing in an empty string for a filename, like so:
Most iterators have aliases defined by this module so you can use it like so:
|
inlineexplicit |
reads through all records in a file (vcf or bcf) parsing them into Variant objects
| filename | the name of the variant file |
|
inlineexplicit |
reads through all records in a file (vcf or bcf) parsing them into Variant objects
| filenames | a vector containing a single element: the name of the variant file |
|
inline |
reads through all records in a file (vcf or bcf) parsing them into Variant objects but only including the selected samples. To create a sites only file, simply pass an empty vector of samples.
| filename | the name of the variant file |
| samples | the list of samples you want included/excluded from your iteration |
| include | whether you want these samples to be included or excluded from your iteration. default = true (include) |
|
inline |
reads through all records in a file (vcf or bcf) parsing them into Variant objects but only including the selected samples. To create a sites only file, simply pass an empty vector of samples.
| filenames | a vector containing a single element: the name of the variant file |
| samples | the list of samples you want included/excluded from your iteration |
| include | whether you want these samples to be included or excluded from your iteration. default = true (include) |
|
delete |
a VariantReader cannot be copied safely, as it is iterating over a stream.
|
default |
a VariantReader can be moved
|
inline |
creates a ITERATOR pointing at the start of the input stream (needed by for-each loop)
|
inline |
creates a ITERATOR with a nullified input stream (needed by for-each loop)
|
inline |
returns the variant header of the file being read
|
delete |
|
default |
1.8.8