|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_POPULATION_FUNCTION_GENOME_REGION_H_
2 #define GENESIS_POPULATION_FUNCTION_GENOME_REGION_H_
42 #endif // htslib guard
49 namespace population {
58 bool operator ==( GenomeRegion
const& a, GenomeRegion
const& b );
63 bool operator !=( GenomeRegion
const& a, GenomeRegion
const& b );
69 std::string
to_string( GenomeRegion
const& region );
70 std::ostream&
operator<<( std::ostream& os, GenomeRegion
const& region );
82 std::string
const& region,
83 bool zero_based =
false,
84 bool end_exclusive =
false
95 std::string
const& regions,
96 bool zero_based =
false,
97 bool end_exclusive =
false
111 bool is_covered( GenomeRegion
const& region, std::string
const& chromosome,
size_t position );
118 return regions.
is_covered( chromosome, position );
126 return loci.
is_covered( chromosome, position );
157 return is_covered( regions, locus.chromosome, locus.position );
170 return is_covered( loci, locus.chromosome, locus.position );
177 #ifdef GENESIS_HTSLIB
194 #endif // htslib guard
199 #endif // include guard
bool operator!=(GenomeLocus const &l, GenomeLocus const &r)
Inequality comparison (!=) for two loci in a genome.
static bool is_covered(utils::Bitvector const &bitvector, size_t position)
Return whether a given position on the provided bitvector is covered.
std::ostream & operator<<(std::ostream &os, SampleCounts const &bs)
Output stream operator for SampleCounts instances.
List of positions/coordinates in a genome, for each chromosome.
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::string to_string(GenomeLocus const &locus)
std::string get_chromosome() const
Get the name of a chromosome/contig/sequence (CHROM, first column of the line).
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
bool is_covered(std::string const &chromosome, numerical_type position) const
Return whether a given position on a chromosome is part of any of the regions (intervals) that are st...
GenomeRegionList parse_genome_regions(std::string const ®ions, bool zero_based, bool end_exclusive)
Parse a set/list of genomic regions.
size_t get_position() const
Get the position within the chromosome/contig (POS, second column of the line).
A region (between two positions) on a chromosome.
Capture the information of a single SNP/variant line in a VCF/BCF file.
GenomeRegion parse_genome_region(std::string const ®ion, bool zero_based, bool end_exclusive)
Parse a genomic region.