cgatools::reference::Range Class Reference

Class representing a range of sequence in a CrrFile. More...

#include <range.hpp>

List of all members.

Public Member Functions

 Range (uint16_t chromosome, uint32_t begin, uint32_t end)
 Range (const Location &beginLoc, const Location &endLoc)
Location beginLocation () const
 Return the Location corresponding to the first base of the Range.
Location endLocation () const
 Return the Location corresponding to one past the last base of the Range.
uint32_t length () const
 Return the length of the Range.
bool contains (const Location &loc) const
 Returns true if this range contains the given location.
bool intersects (const Range &r) const
 Returns true if this range overlaps the specified range.
Range overlappingRange (const Range &rr) const
 Returns overlapping portion of both ranges.

Public Attributes

uint16_t chromosome_
 Chromosome id in CrrFile.
uint32_t begin_
 0-based offset in CrrFile of first base of the Range.
uint32_t end_
 0-based offset in CrrFile of one past first base of the Range.

Detailed Description

Class representing a range of sequence in a CrrFile.

Offsets in the CrrFile are 0-based.


Member Function Documentation

Location cgatools::reference::Range::beginLocation (  )  const [inline]

Return the Location corresponding to the first base of the Range.

Location cgatools::reference::Range::endLocation (  )  const [inline]

Return the Location corresponding to one past the last base of the Range.

bool cgatools::reference::Range::intersects ( const Range r  )  const [inline]

Returns true if this range overlaps the specified range.

Zero-length overlap is allowed for empty ranges, therefore an empty range overlaps with itself. An empty range overlap includes begin of other range: [b,b) overlaps [a,b) and [b,c) and vise versa.

Range cgatools::reference::Range::overlappingRange ( const Range rr  )  const [inline]

Returns overlapping portion of both ranges.

Always returns an empty range if one of ranges is empty.


Member Data Documentation

0-based offset in CrrFile of first base of the Range.

0-based offset in CrrFile of one past first base of the Range.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2