GLnexus
Scalable datastore for population genome sequencing, with on-demand joint genotyping
|
#include <data.h>
Public Member Functions | |
virtual Status | contigs (std::vector< std::pair< std::string, size_t > > &ans) const =0 |
virtual Status | sampleset_samples (const std::string &sampleset, std::shared_ptr< const std::set< std::string > > &ans) const =0 |
virtual Status | sample_dataset (const std::string &sample, std::string &ans) const =0 |
virtual Status | all_samples_sampleset (std::string &ans)=0 |
virtual Status | sample_count (size_t &ans) const =0 |
Return the count of all samples in the database. | |
Abstract interface to "metadata" – namely contigs and sample sets.
Definitions: Each sample (individual whose GLs are stored) has a unique string identifier. A sample set is simply a set of sample identifiers. A data set contains all the allele/genotype/likelihood data for one or more samples – just like a [V/B]CF file. All the GL data for each sample resides in exactly one data set. Sample sets and data sets are immutable.
|
pure virtual |
Return the name of a sample set representing all samples currently available. This may either create a new sample set if needed, or return an existing one if available. As always, the sample set is immutable: it will not include samples added to the database later (but one could call all_samples_sampleset again to get a different sample set including them).
Implemented in GLnexus::MetadataCache, and GLnexus::BCFKeyValueData.
|
pure virtual |
Get the reference contigs.
The indices of the vector are the "rid" used in range()
Implemented in GLnexus::MetadataCache, and GLnexus::BCFKeyValueData.
|
pure virtual |
Find the data set containing the sample.
The data set may contain other samples.
Implemented in GLnexus::MetadataCache, and GLnexus::BCFKeyValueData.
|
pure virtual |
List the samples in a sample set.
The resulting data structure may be shared, so the strings must not be mutated. They aren't declared const because...C++ http://stackoverflow.com/a/21365478
Implemented in GLnexus::MetadataCache, and GLnexus::BCFKeyValueData.