NCBI C++ ToolKit
Public Member Functions | List of all members
IRepeatRegion Class Referenceabstract

Search Toolkit Book for IRepeatRegion

Interface defining a read-only RepeatMasker repeat feature. More...

#include <objtools/readers/rm_reader.hpp>

+ Inheritance diagram for IRepeatRegion:
+ Collaboration diagram for IRepeatRegion:

Public Member Functions

virtual CConstRef< CSeq_locGetLocation (void) const =0
 Gets the location of this repeat. More...
 
virtual CConstRef< CFeat_idGetId () const =0
 Gets the more general feature ID for this repeat, which identifies a single repeat, which may be multi-segement, and allows linking the segments together. More...
 
virtual void GetLocation (CSeq_loc &result) const
 Gets a copy of the location into the Seq-loc instance provided by the caller. More...
 
virtual string GetSeqIdString () const
 Gets the sequence from the location of the repeat, without dealing with a Seq-loc. More...
 
virtual TSeqPos GetSeqPosBegin () const
 Convenience function that gets the position start on the sequence, without dealing with a Seq-loc. More...
 
virtual TSeqPos GetSeqPosEnd () const
 Convenience functions that gets the position end on the sequence, without dealing with a Seq-loc. More...
 
virtual bool IsReverseStrand () const
 Convenience functions that gets the strand on the sequence, without dealing with a Seq-loc. More...
 
- Public Member Functions inherited from IRawRepeatRegion
virtual ~IRawRepeatRegion (void)
 Enforce virtual destructor. More...
 
virtual TRptId GetRptId () const =0
 
virtual TScore GetSwScore () const =0
 
virtual TPercent GetPercDiv () const =0
 
virtual TPercent GetPercDel () const =0
 
virtual TPercent GetPercIns () const =0
 
virtual TSeqPos GetRptPosBegin () const =0
 
virtual TSeqPos GetRptPosEnd () const =0
 
virtual TSeqPos GetRptLeft () const =0
 
virtual TSeqPos GetSeqLeft () const =0
 
virtual bool IsOverlapped () const =0
 Flag that there is a higher-scoring match whose domain partly (<80%) includes the domain of this match. More...
 
string GetRptClassFamily () const
 Covenience function to get the class and family as one value, the way that RepeatMasker emits them. More...
 
- Public Member Functions inherited from IRepeat
virtual ~IRepeat (void)
 Enforce virtual destructor. More...
 
virtual string GetRptName () const =0
 Gets repeat name. More...
 
virtual string GetRptFamily () const =0
 Gets repeat family, or empty string if not known. More...
 
virtual string GetRptClass () const =0
 Gets repeat class, or empty string if not known. More...
 
virtual TSeqPos GetRptLength () const =0
 Gets repeat length, or kInvalidSeqPos if not known. More...
 
virtual TTaxId GetRptSpecificity () const =0
 Gets specificity as a taxonomy ID, or 0 if not known. More...
 
virtual string GetRptSpecificityName () const =0
 Gets specificity as a name, or empty string if not known. More...
 
virtual string GetRptRepbaseId () const =0
 Gets the RepbaseID, or empty string if not known. More...
 

Additional Inherited Members

- Public Types inherited from IRawRepeatRegion
typedef ENa_strand TStrand
 
typedef unsigned int TRptId
 
typedef unsigned long TScore
 
typedef double TPercent
 
- Public Types inherited from IRepeat
typedef ITaxonomyResolver::TTaxId TTaxId
 
- Static Public Attributes inherited from IRawRepeatRegion
static const unsigned int kInvalidRptId = kMax_UInt
 
- Static Public Attributes inherited from IRepeat
static const TTaxId kInvalidTaxId = 0
 

Detailed Description

Interface defining a read-only RepeatMasker repeat feature.

This interface is almost equvalent to the semantics of a tabular RepeatMasker output file, but locations are represented using the NCBI ASN.1 data model.

Note
Please use this interface in favor of IRawRepeatRegion.
Warning
See GetLocation() regarding multi-interval features.

Definition at line 229 of file rm_reader.hpp.

Member Function Documentation

◆ GetId()

virtual CConstRef<CFeat_id> IRepeatRegion::GetId ( ) const
pure virtual

Gets the more general feature ID for this repeat, which identifies a single repeat, which may be multi-segement, and allows linking the segments together.

The feature ID can be either a CFeat_id as in ASN.1, or a RepeatMasker feature ID encoded as such a CFeat_id using a local integer ID.

Implemented in SRepeatRegion.

◆ GetLocation() [1/2]

void IRepeatRegion::GetLocation ( CSeq_loc result) const
virtual

Gets a copy of the location into the Seq-loc instance provided by the caller.

This function is provided with a default implementation, using GetLocation(). The latter may be able to take advantage of a copy-less Seq-loc that is already a member of the object, if that is the native representation.

The default implementation copies the result of GetLocation(void) into the result. Subclasses may override with a more direct translation from internal state.

Definition at line 125 of file rm_reader.cpp.

References GetLocation(), location, and result.

◆ GetLocation() [2/2]

virtual CConstRef<CSeq_loc> IRepeatRegion::GetLocation ( void  ) const
pure virtual

Gets the location of this repeat.

Warning
Repeat features may be multi-interval. RepeatMasker can identify repeats that have been split by other intervening repeats, and while RepeatMasker output will emit these as multiple lines, tied together by repeat ID, in the NCBI ASN.1 data model this may be normalized into a single multi-interval feature.

Implemented in SRepeatRegion.

Referenced by GetLocation(), GetSeqIdString(), GetSeqPosBegin(), GetSeqPosEnd(), IsReverseStrand(), and CRepeatToFeat::operator()().

◆ GetSeqIdString()

string IRepeatRegion::GetSeqIdString ( ) const
virtual

Gets the sequence from the location of the repeat, without dealing with a Seq-loc.

This is more than merely a conevience function.

This function is provided with a default implementation, using GetLocation(). The latter is richer, dealing with Seq-ids which can be more than just strings, so that's the one which should be provided by the concrete implementation.

The default implementation returns the Seq-id in FASTA format.

Implements IRawRepeatRegion.

Reimplemented in SRepeatRegion.

Definition at line 135 of file rm_reader.cpp.

References CSeq_id::AsFastaString(), CSeq_loc::GetId(), and GetLocation().

Referenced by SRepeatRegion::GetSeqIdString(), and CRepeatToFeat::operator()().

◆ GetSeqPosBegin()

TSeqPos IRepeatRegion::GetSeqPosBegin ( ) const
virtual

Convenience function that gets the position start on the sequence, without dealing with a Seq-loc.

This function is provided with a default implementation, using GetLocation(). The latter is richer, dealing with Seq-ids which can be more than just strings, so that's the one which should be provided by the concrete implementation.

Implements IRawRepeatRegion.

Definition at line 140 of file rm_reader.cpp.

References eExtreme_Positional, GetLocation(), and CSeq_loc::GetStart().

Referenced by CRepeatToFeat::operator()().

◆ GetSeqPosEnd()

TSeqPos IRepeatRegion::GetSeqPosEnd ( ) const
virtual

Convenience functions that gets the position end on the sequence, without dealing with a Seq-loc.

This function is provided with a default implementation, using GetLocation(). The latter is richer, dealing with Seq-ids which can be more than just strings, so that's the one which should be provided by the concrete implementation.

Implements IRawRepeatRegion.

Definition at line 145 of file rm_reader.cpp.

References eExtreme_Positional, GetLocation(), and CSeq_loc::GetStop().

Referenced by CRepeatToFeat::operator()().

◆ IsReverseStrand()

bool IRepeatRegion::IsReverseStrand ( void  ) const
virtual

Convenience functions that gets the strand on the sequence, without dealing with a Seq-loc.

This function is provided with a default implementation, using GetLocation(). The latter is richer, dealing with Seq-ids which can be more than just strings, so that's the one which should be provided by the concrete implementation.

Implements IRawRepeatRegion.

Definition at line 150 of file rm_reader.cpp.

References GetLocation(), and CSeq_loc::IsReverseStrand().

Referenced by CRepeatToFeat::operator()(), and CRepeatMaskerReader::ParseRecord().


The documentation for this class was generated from the following files:
Modified on Mon Apr 22 04:03:18 2024 by modify_doxy.py rev. 669887