GenomicInterval¶
#include <pbbam/GenomicInterval.h>
-
class
PacBio::BAM::GenomicInterval¶ The GenomicInterval class represents a genomic interval (reference name and 0-based coordinates).
Constructors & Related Methods
-
GenomicInterval()¶ Creates an empty genomic interval.
-
GenomicInterval(std::string name, Position start, Position stop)¶ Creates a genomic interval on sequence with
name, using range: [start,stop)
-
GenomicInterval(const std::string &zeroBasedRegionString)¶ Creates a genomic interval, using REGION string.
“<ref>:<start>-<stop>” (“chr8:200-600”)
- Note
- The htslib/samtools REGION string expects start positions to be 1-based. However, throughout pbbam (including the rest of this class), we stick to 0-based start coordinates. Thus, while the syntax matches that of samtools, we are using a 0-based start coordinate here.
-
GenomicInterval(const GenomicInterval &other)¶
-
GenomicInterval(GenomicInterval &&other)¶
-
GenomicInterval &
operator=(const GenomicInterval &other)¶
-
GenomicInterval &
operator=(GenomicInterval &&other)¶
-
~GenomicInterval()¶
Comparison Operators
-
bool
operator==(const GenomicInterval &other) const¶ - Return
- true if same id & underlying interval
-
bool
operator!=(const GenomicInterval &other) const¶ - Return
- true if either ids or underlying intervals differ
Interval Operations
-
bool
CoveredBy(const GenomicInterval &other) const¶ - Return
- true if same id and underlying Interval::CoveredBy() other.
-
bool
Covers(const GenomicInterval &other) const¶ - Return
- true if same id and underlying Interval::Covers() other.
-
bool
Intersects(const GenomicInterval &other) const¶ - Return
- true if same id and underlying Interval::Intersects() other.
-
bool
IsValid() const¶ - Return
- true if underlying Interval::IsValid(), and id/endpoints are non-negative.
-
size_t
Length() const¶ - Return
- length of underlying
Attributes
-
std::string
Name() const¶ - Return
- interval reference name
-
GenomicInterval &
Name(const std::string &name)¶ Sets this interval’s reference name.
- Return
- reference to this interval
- Parameters
name:
-
GenomicInterval &
Interval(const PacBio::BAM::Interval<Position> &interval)¶ Sets this underlying Interval
- Return
- reference to this interval
- Parameters
interval:
-
GenomicInterval &
Start(const Position start)¶ Sets this interval’s start coordinate.
- Return
- reference to this interval
- Parameters
start:
-
GenomicInterval &
Stop(const Position stop)¶ Sets this interval’s stop coordinate.
- Return
- reference to this interval
- Parameters
stop:
-