|
A library for working with phylogenetic and population genetic data.
v0.27.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_POPULATION_FUNCTIONS_GENOME_REGION_H_
2 #define GENESIS_POPULATION_FUNCTIONS_GENOME_REGION_H_
41 #endif // htslib guard
48 namespace population {
57 bool operator ==( GenomeRegion
const& a, GenomeRegion
const& b );
62 bool operator !=( GenomeRegion
const& a, GenomeRegion
const& b );
68 std::string
to_string( GenomeRegion
const& region );
69 std::ostream&
operator<<( std::ostream& os, GenomeRegion
const& region );
81 std::string
const& region,
82 bool zero_based =
false,
83 bool end_exclusive =
false
94 std::string
const& regions,
95 bool zero_based =
false,
96 bool end_exclusive =
false
106 bool is_covered( GenomeRegion
const& region, std::string
const& chromosome,
size_t position );
111 bool is_covered( GenomeRegionList
const& regions, std::string
const& chromosome,
size_t position );
137 return is_covered( regions, locus.chromosome, locus.position );
140 #ifdef GENESIS_HTSLIB
142 bool is_covered( GenomeRegion
const& region, VcfRecord
const& variant );
143 bool is_covered( GenomeRegionList
const& regions, VcfRecord
const& variant );
145 #endif // htslib guard
150 #endif // include guard
bool operator!=(GenomeLocus const &l, GenomeLocus const &r)
Inequality comparison (!=) for two loci in a genome.
bool operator==(GenomeLocus const &l, GenomeLocus const &r)
Equality comparison (==) for two loci in a genome.
List of regions in a genome, for each chromosome.
bool is_covered(GenomeRegion const ®ion, std::string const &chromosome, size_t position)
Test whether the chromosome/position is within a given genomic region.
std::ostream & operator<<(std::ostream &os, BaseCounts const &bs)
Output stream operator for BaseCounts instances.
std::string to_string(GenomeLocus const &locus)
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
GenomeRegionList parse_genome_regions(std::string const ®ions, bool zero_based, bool end_exclusive)
Parse a set/list of genomic regions.
A region (between two positions) on a chromosome.
GenomeRegion parse_genome_region(std::string const ®ion, bool zero_based, bool end_exclusive)
Parse a genomic region.