NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Types | Private Attributes | List of all members
CRepeatToFeat Class Reference

Search Toolkit Book for CRepeatToFeat

Class which, given an input IRepeatRegion, can generate an appropriate and normalized NCBI ASN.1 representation as a sequence feature. More...

#include <objtools/readers/rm_reader.hpp>

+ Inheritance diagram for CRepeatToFeat:
+ Collaboration diagram for CRepeatToFeat:

Public Types

typedef CRepeatLibrary TRepeatLibrary
 
typedef IIdGenerator< CRef< CFeat_id > > TIdGenerator
 
- Public Types inherited from IRmReaderFlags
enum  EFlags {
  fStandardizeNomenclature = 1 << 0 , fRemoveRedundancy = 1 << 1 , fAllowNonstandardQualifiers = 1 << 2 , fSetComment = 1 << 3 ,
  fIncludeCoreStatistics = 1 << 4 , fIncludeExtraStatistics = 1 << 5 , fIncludeRepeatName = 1 << 6 , fIncludeRepeatFamily = 1 << 7 ,
  fIncludeRepeatClass = fIncludeRepeatFamily , fIncludeRepeatPos = 1 << 8 , fIncludeRepeatId = 1 << 9 , fIncludeRepeatSpecificity = 1 << 10 ,
  fIncludeRepeatLength = 1 << 11 , fIncludeRepeatRepbaseId = 1 << 12 , fIncludeRepeatPosId , fStandardize ,
  fIncludeStatistics , fIncludeLibraryAttributes , fIncludeAll , fPreserveContent ,
  fDefaults
}
 
typedef int TFlags
 

Public Member Functions

 CRepeatToFeat (TFlags flags=fDefaults, CConstRef< TRepeatLibrary > lib=null, TIdGenerator &ids= *(CIRef< TIdGenerator >(new COrdinalFeatIdGenerator)))
 
void ResetRepeatLibrary ()
 Clear out any repeat library which may be used to add additional attributes to repeats. More...
 
void SetRepeatLibrary (const TRepeatLibrary &lib)
 Set a repeat library which may be used to add additional attributes to repeats. More...
 
void ResetIdGenerator ()
 Reset the Feature-id generator, do use a default implementation which will generate unique integer local IDs. More...
 
void SetIdGenerator (TIdGenerator &generator)
 Set the Feature-id generator which will be used to assign unique feature IDs. More...
 
void AssertReferencesResolved ()
 Asserts that all forward/backward references between any objects visited have now been resolved. More...
 
CRef< CSeq_featoperator() (const IRepeatRegion &repeat)
 Transforms the input repeat into a repeat feature. More...
 

Protected Types

typedef map< IRepeatRegion::TRptId, CConstRef< CFeat_id > > TIdMap
 

Private Attributes

TFlags m_Flags
 
CConstRef< TRepeatLibrarym_Library
 
CIRef< TIdGeneratorm_Ids
 
TIdMap m_IdMap
 

Detailed Description

Class which, given an input IRepeatRegion, can generate an appropriate and normalized NCBI ASN.1 representation as a sequence feature.

Such conversions are needed outside the scope of reading repeats from tabular RepeatMasker output files, so this logic has been pulled off into its own independent class.

Definition at line 627 of file rm_reader.hpp.

Member Typedef Documentation

◆ TIdGenerator

Definition at line 631 of file rm_reader.hpp.

◆ TIdMap

Definition at line 676 of file rm_reader.hpp.

◆ TRepeatLibrary

Definition at line 630 of file rm_reader.hpp.

Constructor & Destructor Documentation

◆ CRepeatToFeat()

CRepeatToFeat::CRepeatToFeat ( TFlags  flags = fDefaults,
CConstRef< TRepeatLibrary lib = null,
TIdGenerator ids = *(CIRef<TIdGenerator>(new COrdinalFeatIdGenerator)) 
)

Definition at line 450 of file rm_reader.cpp.

Member Function Documentation

◆ AssertReferencesResolved()

void CRepeatToFeat::AssertReferencesResolved ( )

Asserts that all forward/backward references between any objects visited have now been resolved.

This means that, if a multi-segment repeat spans multiple repeat regions, then all relevant repeat regions have been seen and no repeat region shall reference a repeat (via repeat_id) which has been visited prior to the call to this assertion.

For example, if all repeats on a given sequence have been processed, it is recommended to call AssertReferencesResolved().

Definition at line 479 of file rm_reader.cpp.

References map_checker< Container >::clear(), and m_IdMap.

◆ operator()()

CRef< CSeq_feat > CRepeatToFeat::operator() ( const IRepeatRegion repeat)

Transforms the input repeat into a repeat feature.

Definition at line 485 of file rm_reader.cpp.

References CUser_object::AddField(), map_checker< Container >::end(), eq(), IRmReaderFlags::fAllowNonstandardQualifiers, IRmReaderFlags::fIncludeCoreStatistics, IRmReaderFlags::fIncludeExtraStatistics, IRmReaderFlags::fIncludeRepeatFamily, IRmReaderFlags::fIncludeRepeatId, IRmReaderFlags::fIncludeRepeatLength, IRmReaderFlags::fIncludeRepeatName, IRmReaderFlags::fIncludeRepeatPos, IRmReaderFlags::fIncludeRepeatRepbaseId, IRmReaderFlags::fIncludeRepeatSpecificity, map_checker< Container >::find(), IRmReaderFlags::fRemoveRedundancy, IRmReaderFlags::fSetComment, IRmReaderFlags::fStandardizeNomenclature, IRepeatRegion::GetLocation(), IRawRepeatRegion::GetPercDel(), IRawRepeatRegion::GetPercDiv(), IRawRepeatRegion::GetPercIns(), IRawRepeatRegion::GetRptClassFamily(), IRawRepeatRegion::GetRptId(), IRawRepeatRegion::GetRptLeft(), SRepeat::GetRptLength(), IRepeat::GetRptName(), IRawRepeatRegion::GetRptPosBegin(), IRawRepeatRegion::GetRptPosEnd(), SRepeat::GetRptRepbaseId(), SRepeat::GetRptSpecificity(), SRepeat::GetRptSpecificityName(), IRepeatRegion::GetSeqIdString(), IRawRepeatRegion::GetSeqLeft(), IRepeatRegion::GetSeqPosBegin(), IRepeatRegion::GetSeqPosEnd(), IRawRepeatRegion::GetSwScore(), NStr::IntToString(), IRawRepeatRegion::IsOverlapped(), IRepeatRegion::IsReverseStrand(), CUser_object_Base::IsSetData(), kInvalidSeqPos, m_Flags, m_IdMap, m_Ids, m_Library, CSeq_feat_Base::ResetExts(), CSeq_feat_Base::ResetQual(), s_SetQual(), s_StandardizeNomenclature(), CSeq_feat_Base::SetComment(), CSeq_feat_Base::SetData(), CSeq_feat_Base::SetDbxref(), CSeq_feat_Base::SetExts(), CSeq_feat_Base::SetId(), CSeqFeatData::SetImp(), CImp_feat_Base::SetKey(), CSeq_feat_Base::SetLocation(), CSeq_feat_Base::SetQual(), CUser_object_Base::SetType(), CSeq_feat_Base::SetXref(), and tag.

◆ ResetIdGenerator()

void CRepeatToFeat::ResetIdGenerator ( )

Reset the Feature-id generator, do use a default implementation which will generate unique integer local IDs.

Definition at line 469 of file rm_reader.cpp.

References m_Ids.

◆ ResetRepeatLibrary()

void CRepeatToFeat::ResetRepeatLibrary ( )

Clear out any repeat library which may be used to add additional attributes to repeats.

Definition at line 459 of file rm_reader.cpp.

References m_Library.

◆ SetIdGenerator()

void CRepeatToFeat::SetIdGenerator ( TIdGenerator generator)

Set the Feature-id generator which will be used to assign unique feature IDs.

Definition at line 474 of file rm_reader.cpp.

References m_Ids.

◆ SetRepeatLibrary()

void CRepeatToFeat::SetRepeatLibrary ( const TRepeatLibrary lib)

Set a repeat library which may be used to add additional attributes to repeats.

Definition at line 464 of file rm_reader.cpp.

References m_Library.

Member Data Documentation

◆ m_Flags

TFlags CRepeatToFeat::m_Flags
private

Definition at line 679 of file rm_reader.hpp.

Referenced by operator()().

◆ m_IdMap

TIdMap CRepeatToFeat::m_IdMap
private

Definition at line 682 of file rm_reader.hpp.

Referenced by AssertReferencesResolved(), and operator()().

◆ m_Ids

CIRef<TIdGenerator> CRepeatToFeat::m_Ids
private

Definition at line 681 of file rm_reader.hpp.

Referenced by operator()(), ResetIdGenerator(), and SetIdGenerator().

◆ m_Library

CConstRef<TRepeatLibrary> CRepeatToFeat::m_Library
private

Definition at line 680 of file rm_reader.hpp.

Referenced by operator()(), ResetRepeatLibrary(), and SetRepeatLibrary().


The documentation for this class was generated from the following files:
Modified on Sun Apr 14 05:27:42 2024 by modify_doxy.py rev. 669887