A library for working with phylogenetic and population genetic data.
v0.32.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, or even the whole chromosome (see special cases below). We use a simple form with a chromosome name, and a start and end position, both 1-based and inclusive (closed interval).

There are some special cases:

  • We use an empty chromosome with start and end equal to 0 to denote an empty(), unspecified region.
  • Another special case is a non-empty chromosome with both start and end being equal to 0, which denotes the whole chromosome as the region; this is however not considered to be a specified() region.
  • All other cases are invalid, that is, an empty chromosome with non-zero start or end, or cases where start or end are zero, but not both, or where start is greather than end.
See also
GenomeLocus
GenomeLocusSet
GenomeRegionList

Definition at line 70 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 specified () 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 78 of file genome_region.hpp.

Member Function Documentation

◆ empty()

bool empty ( ) const
inline

Definition at line 86 of file genome_region.hpp.

◆ specified()

bool specified ( ) const
inline

Definition at line 92 of file genome_region.hpp.

Member Data Documentation

◆ chromosome

std::string chromosome

Definition at line 74 of file genome_region.hpp.

◆ end

size_t end = 0

Definition at line 76 of file genome_region.hpp.

◆ start

size_t start = 0

Definition at line 75 of file genome_region.hpp.


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