A library for working with phylogenetic data.
Variant Struct Reference

#include <genesis/population/variant.hpp>

Detailed Description

A single variant at a position in a chromosome, along with BaseCounts 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.
  • 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 BaseCountss, 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 BaseCounts for details on the latter.

Definition at line 62 of file variant.hpp.

Public Attributes

char alternative_base = 'N'
std::string chromosome
size_t position = 0
char reference_base = 'N'
std::vector< BaseCountssamples

Member Data Documentation

◆ alternative_base

char alternative_base = 'N'

Definition at line 67 of file variant.hpp.

◆ chromosome

std::string chromosome

Definition at line 64 of file variant.hpp.

◆ position

size_t position = 0

Definition at line 65 of file variant.hpp.

◆ reference_base

char reference_base = 'N'

Definition at line 66 of file variant.hpp.

◆ samples

std::vector<BaseCounts> samples

Definition at line 69 of file variant.hpp.

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