bpp-seq-omics  2.4.1
bpp::SeqRange Class Reference

a coordinate range on a sequence. Stores coordinates as a Range<size_t> object, but also keep the strand information. More...

#include <Bpp/Seq/Feature/SequenceFeature.h>

+ Inheritance diagram for bpp::SeqRange:
+ Collaboration diagram for bpp::SeqRange:

Public Member Functions

 SeqRange (size_t a, size_t b, char strand='.')
 
 SeqRange (const Range< size_t > range, char strand='.')
 
SeqRangeclone () const
 
virtual char getStrand () const
 
virtual bool isNegativeStrand () const
 
virtual bool isStranded () const
 
virtual void invert ()
 
bool operator== (const Range< T > &r) const
 
bool operator!= (const Range< T > &r) const
 
bool operator< (const Range< T > &r) const
 
virtual Rangeoperator+= (const T &val)
 
virtual Range operator+ (const T &val)
 
virtual Rangeoperator-= (const T &val)
 
virtual Range operator- (const T &val)
 
begin () const
 
end () const
 
length () const
 
bool overlap (const Range &r) const
 
bool isContiguous (const Range &r) const
 
bool contains (const Range &r) const
 
void expandWith (const Range &r)
 
void sliceWith (const Range &r)
 
bool isEmpty () const
 
std::string toString () const
 

Private Attributes

char strand_
 
begin_
 
end_
 

Detailed Description

a coordinate range on a sequence. Stores coordinates as a Range<size_t> object, but also keep the strand information.

Definition at line 75 of file SequenceFeature.h.

Constructor & Destructor Documentation

◆ SeqRange() [1/2]

bpp::SeqRange::SeqRange ( size_t  a,
size_t  b,
char  strand = '.' 
)
inline
Parameters
aFirst position
bSecond position
strandThe strand information. Can take one of the four values: '+' for positive strand, '-' for negative, '.' if not stranded or '?' if strandedness is relevant but unknown.

Definition at line 87 of file SequenceFeature.h.

References strand_.

Referenced by clone().

◆ SeqRange() [2/2]

bpp::SeqRange::SeqRange ( const Range< size_t >  range,
char  strand = '.' 
)
inline
Parameters
rangeA range object
strandThe strand information. Can take one of the four values: '+' for positive strand, '-' for negative, '.' if not stranded or '?' if strandedness is relevant but unknown.

Definition at line 97 of file SequenceFeature.h.

References strand_.

Member Function Documentation

◆ clone()

SeqRange* bpp::SeqRange::clone ( ) const
inlinevirtual

Implements bpp::Clonable.

Definition at line 103 of file SequenceFeature.h.

References SeqRange().

◆ getStrand()

virtual char bpp::SeqRange::getStrand ( ) const
inlinevirtual

◆ invert()

virtual void bpp::SeqRange::invert ( )
inlinevirtual

Definition at line 110 of file SequenceFeature.h.

References isNegativeStrand(), isStranded(), and strand_.

Referenced by bpp::BasicSequenceFeature::invert().

◆ isNegativeStrand()

virtual bool bpp::SeqRange::isNegativeStrand ( ) const
inlinevirtual

◆ isStranded()

virtual bool bpp::SeqRange::isStranded ( ) const
inlinevirtual

Definition at line 109 of file SequenceFeature.h.

References strand_.

Referenced by invert(), and bpp::BasicSequenceFeature::isStranded().

Member Data Documentation

◆ strand_

char bpp::SeqRange::strand_
private

Definition at line 79 of file SequenceFeature.h.

Referenced by getStrand(), invert(), isNegativeStrand(), isStranded(), and SeqRange().


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