1 #ifndef GLNEXUS_GENOTYPER_H
2 #define GLNEXUS_GENOTYPER_H
8 #include "service_config.h"
12 Status genotype_site(
const genotyper_config& cfg, MetadataCache& cache, BCFData& data,
13 const unified_site& site,
14 const std::string& sampleset,
const std::vector<std::string>& samples,
15 const bcf_hdr_t* hdr, std::shared_ptr<bcf1_t>& ans, consolidated_loss& losses_for_site);
28 orig_call(
range pos_,
bool is_gvcf_) : pos(pos_), is_gvcf(is_gvcf_) {}
33 bool operator==(
const orig_call& rhs)
const noexcept {
return pos == rhs.pos && is_gvcf == rhs.is_gvcf; }
34 bool operator<(
const orig_call& rhs)
const noexcept {
return pos < rhs.pos; }
35 bool operator<=(
const orig_call& rhs)
const noexcept {
return pos <= rhs.pos; }
41 Status add_call_for_site(
const range call,
int n_calls,
bool is_gvcf) noexcept;
42 Status finalize_loss_for_site(
int n_no_calls) noexcept;
46 bool is_loss() const noexcept {
47 return n_calls_lost > 0;
58 std::map<orig_call, int> orig_calls_for_site;
60 int n_calls_total=0, n_bp_total=0;
61 int n_gvcf_calls_total=0, n_gvcf_bp_total=0;
62 int n_calls_lost=0, n_bp_lost=0;
63 int n_gvcf_calls_lost=0, n_gvcf_bp_lost=0;
64 int n_no_calls_total = 0;
66 bool is_finalized =
false;
69 using LossTrackers = std::vector<LossTracker>;
Definition: genotyper.h:27
Genomic range (chromosome id, begin coordinate, end coordinate)
Definition: types.h:99
Function status (return) codes.
Definition: types.h:30
Definition: genotyper.h:22