class holiding data stored in FORMAT and data fields
More...
#include <yat/omic/VCF.h>
|
| Data (void) |
| Default constructor.
|
|
| Data (size_t n) |
|
template<typename T > |
void | add (const std::string &key, const std::vector< T > &data) |
| T is string, numeric or vector string or numeric.
|
|
void | clear (void) |
|
size_t | count (const std::string &key) const |
|
const std::vector< std::string > & | format (void) const |
|
template<typename T > |
void | get (const std::string &key, std::vector< T > &data) const |
| T is string, numeric or vector string or numeric.
|
|
size_t | n_samples (void) const |
|
template<typename T > |
void | set (const std::string &key, const std::vector< T > &data) |
|
void | subset (const std::vector< size_t > &index) |
|
|
class | VCF |
|
std::ostream & | operator<< (std::ostream &, const VCF::Data &) |
|
class holiding data stored in FORMAT and data fields
◆ Data()
theplu::yat::omic::VCF::Data::Data |
( |
size_t |
n | ) |
|
|
explicit |
Create Data representing n
samples
- Since
- New in yat 0.20
◆ clear()
void theplu::yat::omic::VCF::Data::clear |
( |
void |
| ) |
|
Set FORMAT and all data fields to empty string. Number of samples remains unmodified.
◆ count()
size_t theplu::yat::omic::VCF::Data::count |
( |
const std::string & |
key | ) |
const |
◆ format()
const std::vector<std::string>& theplu::yat::omic::VCF::Data::format |
( |
void |
| ) |
const |
FORMAT
- Returns
- vector of format in the data fields
◆ n_samples()
size_t theplu::yat::omic::VCF::Data::n_samples |
( |
void |
| ) |
const |
- Returns
- number of samples
- Since
- New in yat 0.20
◆ set()
template<typename T >
void theplu::yat::omic::VCF::Data::set |
( |
const std::string & |
key, |
|
|
const std::vector< T > & |
data |
|
) |
| |
T is string, numeric or vector string or numeric
If key exists in FORMAT, replace data with data
. Otherwise add data with key; see data(key, data).
- Since
- New in yat 0.20
◆ subset()
void theplu::yat::omic::VCF::Data::subset |
( |
const std::vector< size_t > & |
index | ) |
|
Construct Data representing a subset of samples. The object will have index.size() samples; if index[0] is k, the first sample correspond to the (k+1)th sample in the old object.
- Since
- New in yat 0.20
◆ operator<<()
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const VCF::Data & |
data |
|
) |
| |
|
related |
The documentation for this class was generated from the following file: