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

#include <genesis/population/genome_locus.hpp>

Detailed Description

A single locus, that is, a position (or coordinate) on a chromosome.

For our purposes here, we define a locus to be one position (1-based) on one chromosome exactly.

When working with multiple loci, we here often expect their chromosome names to be sorted in lexicographical order. Hence, for example, when comparing two loci on different chromosomes, we also take the ordering of their chromosome names into account.

See also
GenomeRegion
GenomeRegionList

Definition at line 56 of file genome_locus.hpp.

Public Member Functions

 GenomeLocus (GenomeLocus &&)=default
 
 GenomeLocus (GenomeLocus const &)=default
 
 GenomeLocus (std::string const &chr="", size_t pos=0)
 
 ~GenomeLocus ()=default
 
bool empty () const
 
GenomeLocusoperator= (GenomeLocus &&)=default
 
GenomeLocusoperator= (GenomeLocus const &)=default
 
bool valid () const
 

Public Attributes

std::string chromosome
 
size_t position = 0
 

Constructor & Destructor Documentation

◆ GenomeLocus() [1/3]

GenomeLocus ( std::string const &  chr = "",
size_t  pos = 0 
)
inline

Definition at line 61 of file genome_locus.hpp.

◆ ~GenomeLocus()

~GenomeLocus ( )
default

◆ GenomeLocus() [2/3]

GenomeLocus ( GenomeLocus const &  )
default

◆ GenomeLocus() [3/3]

GenomeLocus ( GenomeLocus &&  )
default

Member Function Documentation

◆ empty()

bool empty ( ) const
inline

Definition at line 74 of file genome_locus.hpp.

◆ operator=() [1/2]

GenomeLocus& operator= ( GenomeLocus &&  )
default

◆ operator=() [2/2]

GenomeLocus& operator= ( GenomeLocus const &  )
default

◆ valid()

bool valid ( ) const
inline

Definition at line 79 of file genome_locus.hpp.

Member Data Documentation

◆ chromosome

std::string chromosome

Definition at line 58 of file genome_locus.hpp.

◆ position

size_t position = 0

Definition at line 59 of file genome_locus.hpp.


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