GLnexus
Scalable datastore for population genome sequencing, with on-demand joint genotyping
 All Classes Functions Variables
Classes | Public Member Functions | Static Public Member Functions | List of all members
GLnexus::MetadataCache Class Reference

#include <data.h>

Inheritance diagram for GLnexus::MetadataCache:
GLnexus::Metadata

Classes

struct  body
 

Public Member Functions

Status contigs (std::vector< std::pair< std::string, size_t > > &ans) const override
 
Status sampleset_samples (const std::string &sampleset, std::shared_ptr< const std::set< std::string > > &ans) const override
 
Status sample_dataset (const std::string &sample, std::string &ans) const override
 
Status all_samples_sampleset (std::string &ans) override
 
Status sample_count (size_t &ans) const override
 Return the count of all samples in the database.
 
const std::vector< std::pair
< std::string, size_t > > & 
contigs () const
 
Status sampleset_datasets (const std::string &sampleset, std::shared_ptr< const std::set< std::string > > &samples, std::shared_ptr< const std::set< std::string >> &datasets) const
 

Static Public Member Functions

static Status Start (Metadata &inner, std::unique_ptr< MetadataCache > &ptr)
 

Detailed Description

Wraps any Metadata implementation to provide in-memory caching/indexing of the immutable relationships

Member Function Documentation

Status GLnexus::MetadataCache::all_samples_sampleset ( std::string &  ans)
overridevirtual

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).

Implements GLnexus::Metadata.

Status GLnexus::MetadataCache::contigs ( std::vector< std::pair< std::string, size_t > > &  ans) const
overridevirtual

Get the reference contigs.

The indices of the vector are the "rid" used in range()

Implements GLnexus::Metadata.

Status GLnexus::MetadataCache::sample_dataset ( const std::string &  sample,
std::string &  ans 
) const
overridevirtual

Find the data set containing the sample.

The data set may contain other samples.

Implements GLnexus::Metadata.

Status GLnexus::MetadataCache::sampleset_samples ( const std::string &  sampleset,
std::shared_ptr< const std::set< std::string > > &  ans 
) const
overridevirtual

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

Implements GLnexus::Metadata.


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