A library for working with phylogenetic and population genetic data.
v0.32.0
Variant Struct Reference

#include <genesis/population/variant.hpp>

Detailed Description

A single variant at a position in a chromosome, along with SampleCounts for a set of samples.

Typically, this class is used as a general representation of the variants/SNPs at a given chromosome position, for example coming from a line in a VCF file or (m)pileup file.

The class consists of the following data fields:

  • A chromosome and position, 1-based.
  • The reference base and alternative base at that position (which might not always be available in the input file format, in which case we use 'N'). Note that we currently only support one alternative base here, that is, biallelic variants only.
  • A set of SampleCountss, that is, information on the counts of nucleotide bases of thereads of a set of pool samples or individuals that cover this variants/SNPs at that position. See SampleCounts for details on the latter.
  • A filter status to indicate whether this Variant is to be considered in analyses or not. See FilterStatus for details.

Definition at line 65 of file variant.hpp.

Public Attributes

char alternative_base = 'N'
 
std::string chromosome
 
size_t position = 0
 
char reference_base = 'N'
 
std::vector< SampleCountssamples
 
FilterStatus status
 

Member Data Documentation

◆ alternative_base

char alternative_base = 'N'

Definition at line 80 of file variant.hpp.

◆ chromosome

std::string chromosome

Definition at line 73 of file variant.hpp.

◆ position

size_t position = 0

Definition at line 74 of file variant.hpp.

◆ reference_base

char reference_base = 'N'

Definition at line 79 of file variant.hpp.

◆ samples

std::vector<SampleCounts> samples

Definition at line 82 of file variant.hpp.

◆ status

FilterStatus status

Definition at line 76 of file variant.hpp.


The documentation for this struct was generated from the following file: