A library for working with phylogenetic and population genetic data.
v0.27.0
GenomeRegion Struct Reference

#include <genesis/population/genome_region.hpp>

Detailed Description

A region (between two positions) on a chromosome.

This can be used to represent a gene, a feature, or just generally a region of interest. We use a simple form with a chromosome name, and a start and end position, both 1-based and inclusive (closed interval).

We futhermore use the empty string to denote an invalid or undefined chromosome, and position 0 for either start or end to denote invalid or undefined positions.

See also
GenomeLocus
GenomeRegionList

Definition at line 60 of file genome_region.hpp.

Public Member Functions

 GenomeRegion (std::string const &chr="", size_t s=0, size_t e=0)
 
bool empty () const
 
bool valid () const
 

Public Attributes

std::string chromosome
 
size_t end = 0
 
size_t start = 0
 

Constructor & Destructor Documentation

◆ GenomeRegion()

GenomeRegion ( std::string const &  chr = "",
size_t  s = 0,
size_t  e = 0 
)
inline

Definition at line 68 of file genome_region.hpp.

Member Function Documentation

◆ empty()

bool empty ( ) const
inline

Definition at line 81 of file genome_region.hpp.

◆ valid()

bool valid ( ) const
inline

Definition at line 86 of file genome_region.hpp.

Member Data Documentation

◆ chromosome

std::string chromosome

Definition at line 64 of file genome_region.hpp.

◆ end

size_t end = 0

Definition at line 66 of file genome_region.hpp.

◆ start

size_t start = 0

Definition at line 65 of file genome_region.hpp.


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