CSeq_id_Handle Class Reference
[Seq-id Management]

Search Toolkit Book for CSeq_id_Handle

#include <seq_id_handle.hpp>

Inheritance diagram for CSeq_id_Handle:

Inheritance graph
[legend]
Collaboration diagram for CSeq_id_Handle:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 144 of file seq_id_handle.hpp.

Public Types

typedef set< CSeq_id_HandleTMatches

Public Member Functions

 CSeq_id_Handle (void)
 CSeq_id_Handle (const CSeq_id_Info *info, int packed=0)
 CSeq_id_Handle (ENull)
bool operator== (const CSeq_id_Handle &handle) const
bool operator!= (const CSeq_id_Handle &handle) const
bool operator< (const CSeq_id_Handle &handle) const
bool operator== (const CSeq_id &id) const
 DECLARE_OPERATOR_BOOL_REF (m_Info)
 Check if the handle is a valid or an empty one.
void Reset (void)
 Reset the handle (remove seq-id reference).
bool HaveMatchingHandles (void) const
bool HaveReverseMatch (void) const
void GetMatchingHandles (TMatches &matches) const
void GetReverseMatchingHandles (TMatches &matches) const
bool MatchesTo (const CSeq_id_Handle &h) const
 True if *this matches to h.
bool IsBetter (const CSeq_id_Handle &h) const
 True if "this" is a better bioseq than "h".
string AsString (void) const
CSeq_id::E_Choice Which (void) const
bool IsPacked (void) const
int GetPacked (void) const
bool IsGi (void) const
int GetGi (void) const
unsigned GetHash (void) const
CSeq_id::EAccessionInfo IdentifyAccession (void) const
CConstRef< CSeq_idGetSeqId (void) const
CConstRef< CSeq_idGetSeqIdOrNull (void) const
CSeq_id_MapperGetMapper (void) const
void Swap (CSeq_id_Handle &idh)
const CSeq_id_Infox_GetInfo (void) const

Static Public Member Functions

static CSeq_id_Handle GetHandle (const CSeq_id &id)
 Normal way of getting a handle, works for any seq-id.
static CSeq_id_Handle GetHandle (const string &str_id)
 Construct CSeq_id from string representation and return handle for it.
static CSeq_id_Handle GetHandle (int gi)
 Faster way to create a handle for a gi.
static CSeq_id_Handle GetGiHandle (int gi)
 Faster way to create a handle for a gi.

Private Attributes

CConstRef< CSeq_id_Info, CSeq_id_InfoLockerm_Info
int m_Packed

Friends

class CSeq_id_Mapper
class CSeq_id_Which_Tree


Member Typedef Documentation

typedef set<CSeq_id_Handle> CSeq_id_Handle::TMatches
 

Definition at line 210 of file seq_id_handle.hpp.


Constructor & Destructor Documentation

CSeq_id_Handle::CSeq_id_Handle void   )  [inline]
 

Definition at line 148 of file seq_id_handle.hpp.

CSeq_id_Handle::CSeq_id_Handle const CSeq_id_Info info,
int  packed = 0
[inline, explicit]
 

Definition at line 152 of file seq_id_handle.hpp.

References _ASSERT.

CSeq_id_Handle::CSeq_id_Handle ENull   )  [inline]
 

Definition at line 157 of file seq_id_handle.hpp.


Member Function Documentation

string CSeq_id_Handle::AsString void   )  const
 

Reimplemented in CAlnSeqId.

Definition at line 170 of file seq_id_handle.cpp.

References GetSeqId(), IsGi(), m_Info, and m_Packed.

Referenced by CAlnSeqId::AsString(), CSplitCacheApp::GetBioseqHandle(), CFeatGlyph::GetHTMLActiveAreas(), GetLabel(), CGBDataLoader::GetNamedAnnotAccessions(), CIdMapperApp::GetTargetString(), CReadDispatcher::LogStat(), CIdMapper::MapErrorString(), PConvertToString< CSeq_id_Handle >::operator()(), CSplitCacheApp::ProcessBlob(), CSGSegmentMapJob::x_Execute(), CGBDataLoader::x_GetRecords(), and CScope_Impl::x_ReportNewDataConflict().

CSeq_id_Handle::DECLARE_OPERATOR_BOOL_REF m_Info   ) 
 

Check if the handle is a valid or an empty one.

int CSeq_id_Handle::GetGi void   )  const [inline]
 

Definition at line 240 of file seq_id_handle.hpp.

References IsGi(), and m_Packed.

Referenced by BOOST_AUTO_TEST_CASE(), CCachedSequence::CCachedSequence(), CAddFeatChecker::Do(), CRemoveFeatChecker::Do(), CAltValidator::GetAccDataFromObjMan(), CId1Reader::GetGiBlob_ids(), GetGiForId(), CId1Reader::GetGiSeq_ids(), CBioObjectId::GetSetId(), CBioObjectId::GetUniqNumber(), CTreeBuilderJob::x_CreateProjectItems(), and CDBSourceItem::x_FormatDBSourceID().

static CSeq_id_Handle CSeq_id_Handle::GetGiHandle int  gi  )  [inline, static]
 

Faster way to create a handle for a gi.

Definition at line 172 of file seq_id_handle.hpp.

References GetHandle().

Referenced by CSeqFetchQueue::Add(), ForEach(), GetId(), CSeq_feat_Handle::GetLocationId(), CSplitParser::Load(), CEditBioseqSampleApp::Run(), s_GetNewIdHandle(), s_RetrieveAlign(), s_RetrieveFeat(), CSplitParser::x_AddGiInterval(), CSplitParser::x_AddGiWhole(), CFeatureGraph::x_CreateMapRanges(), CSeq_annot_SNP_Info::x_UnmapAnnotObjects(), and CSeq_annot_SNP_Info::x_UpdateAnnotIndexContents().

CSeq_id_Handle CSeq_id_Handle::GetHandle int  gi  )  [static]
 

Faster way to create a handle for a gi.

Definition at line 106 of file seq_id_handle.cpp.

References CSeq_id_Mapper::GetInstance().

CSeq_id_Handle CSeq_id_Handle::GetHandle const string &  str_id  )  [static]
 

Construct CSeq_id from string representation and return handle for it.

Definition at line 118 of file seq_id_handle.cpp.

References CSeq_id_Mapper::GetInstance(), and id.

CSeq_id_Handle CSeq_id_Handle::GetHandle const CSeq_id id  )  [static]
 

Normal way of getting a handle, works for any seq-id.

Definition at line 112 of file seq_id_handle.cpp.

References CSeq_id_Mapper::GetInstance().

Referenced by CSeqsRange::Add(), CIdMapper::AddMapping(), CHandleRangeMap::AddRange(), SAlignment_Segment::AddRow(), CLoadLockSeq_ids::AddSeq_id(), BOOST_AUTO_TEST_CASE(), CBioseq_SplitInfo::CBioseq_SplitInfo(), CCachedSequence::CCachedSequence(), CBioseq_Handle::ContainsSegment(), CSeq_loc_Conversion_Set::Convert(), CSeq_loc_Conversion::Convert(), Convert_Seq_align_Seq_id(), Convert_Seq_annot_Seq_id(), Convert_Seq_annot_Seq_loc_All(), Convert_Seq_entry_Seq_id(), Convert_SeqSubmit_Seq_id(), CSeq_loc_Conversion_Set::ConvertBond(), CSeq_loc_Conversion_Set::ConvertInterval(), CSeq_loc_Conversion_Set::ConvertPacked_pnt(), CSeq_loc_Conversion_Set::ConvertPoint(), CBlobSplitterImpl::CopySkeleton(), CSeq_loc_Mapper::CSeq_loc_Mapper(), FindLatestSequence(), ForEach(), CFastaReader::GenerateID(), CDefaultSynonymMapper::GetBestSynonym(), CDummySynonymMapper::GetBestSynonym(), CTSE_Handle::GetBioseqHandle(), CScope_Impl::GetBioseqHandle(), CScope::GetBioseqHandle(), CScope::GetBioseqHandleFromTSE(), GetGIForSeqId(), GetGiHandle(), GetId(), GetIdHandle(), CSeqTableLocColumns::GetIdHandle(), CScope::GetIds(), CScope::GetLabel(), CSeq_feat_Handle::GetLocationId(), CMappedFeat::GetLocationId(), CBioseqContext::GetPreferredSynonym(), CSeq_feat_Handle::GetProductId(), CMappedFeat::GetProductId(), CMaskedRangeSet::GetRanges(), CSeqMap_CI::GetRefSeqid(), CGBDataLoader::GetSatSatkey(), CSeq_loc_CI::GetSeq_id_Handle(), CGenBankLoadOptionPanel::GetSeqIds(), CSeq_loc_Mapper_Base::GetSeqTypeById(), CScope::GetSynonyms(), CSeq_loc_Mapper_Base::GetWidthById(), CAlignGroup::GroupBySeqIds(), CAlignGroup::GroupBySequenceType(), CWinMaskConfig::CIdSet_SeqId::insert(), CMaskedRangeSet::Insert(), IsSameBioseq(), CBioseq_Handle::IsSynonym(), CSplitParser::Load(), CCacheReader::LoadSeq_idAccVer(), CIdMapper::Map(), CSplitCacheApp::ProcessSeqId(), CBookmarkManager::RemoveBookmark(), CFeatCompareJob_Align::Run(), s_CollectSeqIds(), s_Convert(), s_GetAlignmentContent(), s_GetAlignmentTooltip(), s_GetItems_Align(), s_IsVirtualLocation(), s_IsVirtualSeqInt(), CDotMatrixViewManager::SetObjects(), CSeq_loc_Mapper_Base::SetSeqTypeById(), CSeq_idValidator::TransferFromWindow(), CFlatSeqLoc::x_Add(), x_ApplyCmd(), CBioseq_Info::x_CalcBioseqLength(), CAlignCleanup::x_Cleanup_AlignVec(), CComponentSearchJob::x_DoSearch(), CCleanup_imp::x_FixPIDDbtag(), CAlnTableDS::x_GetNumSeqs(), CSeq_loc_Mapper_Base::x_MapInterval(), CSeq_loc_Mapper_Base::x_MapSeq_loc(), CId2ReaderBase::x_ProcessGetBlobId(), CId2ReaderBase::x_ProcessGetSeqId(), CSeqMap_CI::x_RefTSEMatch(), CSequenceSearchJob::x_SearchSequence(), CValidError_feat::x_SeqIdToGiNumber(), CBioseqContext::x_SetLocation(), CBioseq_Info::x_SetObject(), CSplitDataLoader::x_SplitAligns(), CSplitDataLoader::x_SplitSeq(), CAlnMultiDSBuilder::x_TestAlignments(), CGffLoadTask::x_UpdateIds(), and CGenBankLoadOptionPanel::x_ValidateInput().

unsigned CSeq_id_Handle::GetHash void   )  const
 

Definition at line 186 of file seq_id_handle.cpp.

References CConstRef< C, Locker >::GetPointerOrNull(), m_Info, and m_Packed.

CSeq_id_Mapper& CSeq_id_Handle::GetMapper void   )  const [inline]
 

Definition at line 276 of file seq_id_handle.hpp.

References m_Info.

Referenced by GetMatchingHandles(), GetReverseMatchingHandles(), HaveMatchingHandles(), HaveReverseMatch(), IsBetter(), MatchesTo(), and operator==().

void CSeq_id_Handle::GetMatchingHandles TMatches matches  )  const
 

Definition at line 137 of file seq_id_handle.cpp.

References GetMapper(), and CSeq_id_Mapper::GetMatchingHandles().

Referenced by CTSE_Info::GetSeqMatch(), CDataSource_ScopeInfo::x_GetSeqMatch(), and CDataSource::x_GetSeqMatch().

int CSeq_id_Handle::GetPacked void   )  const [inline]
 

Definition at line 232 of file seq_id_handle.hpp.

References m_Packed.

Referenced by operator<<().

void CSeq_id_Handle::GetReverseMatchingHandles TMatches matches  )  const
 

Definition at line 143 of file seq_id_handle.cpp.

References GetMapper(), and CSeq_id_Mapper::GetReverseMatchingHandles().

Referenced by CScope_Impl::GetTSESetWithAnnots().

CConstRef<CSeq_id> CSeq_id_Handle::GetSeqId void   )  const [inline]
 

Reimplemented in CAlnSeqId.

Definition at line 251 of file seq_id_handle.hpp.

References m_Info, and m_Packed.

Referenced by AsString(), BestRank_SeqIdHandle(), CVisibleRangeEvent::Clamp(), Convert_Seq_feat_Seq_loc_Gen_Loc_TotalRange(), CSixFramesTransTrackFactory::CreateTracks(), CAnnotCompareDS::DumpTextReport(), FastaAARank_SeqIdHandle(), FastaNARank_SeqIdHandle(), FindLatestSequence(), GetAccession(), GetAccessionForGi(), GetAccessionForId(), CObjFingerprint::GetAlignSignature(), GetDirectLabel(), CMappingRange::GetDstId(), CObjFingerprint::GetFeatSignature(), CObjFingerprint::GetGraphSignature(), CBioseq_Handle::GetRangeSeq_loc(), CTraceChromatogramLoader::GetRecords(), CLDS_DataLoader::GetRecords(), CCddDataLoader::GetRecords(), CSeq_id_Mapper::GetSeq_id(), CBioseq_Handle::GetSeqId(), CGenBankLoadOptionPanel::GetSeqIds(), CObjFingerprint::GetSeqLocSignature(), IdentifyAccession(), CGuideTreeCalc::InitTreeFeatures(), IsSameBioseq(), CIdMapper::Map(), CLDS_FindSeqIdFunc::operator()(), CResolveRequest::Process(), s_ConvertId(), s_Fingerprint_Seq_id(), s_GetDescription(), s_GetSeqIDString(), s_ScoreForDBSource(), s_ScoreSeqIdHandle(), s_SeqAlignToXMLHit(), Score_SeqIdHandle(), SeqLocMapperToPairwiseAligns(), CSeqMap::SetSegmentRef(), CIdHandler::ToCanonical(), WorstRank_SeqIdHandle(), CComponentSearchJob::x_DoSearch(), CDBSourceItem::x_FormatDBSourceID(), CSeq_align_Mapper_Base::x_GetDstStd(), CGFFFormatter::x_GetGeneID(), CSeq_align_Mapper_Base::x_GetPartialDenseg(), CAnnot_Collector::x_Initialize(), CSeq_loc_Mapper::x_InitializeSeqMap(), CFeaturePanel::x_IsChromosome(), CSeq_loc_Mapper_Base::x_PushSourceRange(), CSeq_loc_Mapper_Base::x_RangeToSeq_loc(), CSequenceSearchJob::x_SearchSequence(), CSeq_id_PDB_Tree::x_Unindex(), and CGenBankLoadOptionPanel::x_ValidateInput().

CConstRef<CSeq_id> CSeq_id_Handle::GetSeqIdOrNull void   )  const [inline]
 

Definition at line 262 of file seq_id_handle.hpp.

References m_Info, and m_Packed.

Referenced by CBioseq_Handle::GetInitialSeqIdOrNull().

bool CSeq_id_Handle::HaveMatchingHandles void   )  const
 

Definition at line 125 of file seq_id_handle.cpp.

References GetMapper(), and CSeq_id_Mapper::HaveMatchingHandles().

Referenced by GetAccession(), CDataSource_ScopeInfo::x_GetSeqMatch(), and CDataSource::x_GetSeqMatch().

bool CSeq_id_Handle::HaveReverseMatch void   )  const
 

Definition at line 131 of file seq_id_handle.cpp.

References GetMapper(), and CSeq_id_Mapper::HaveReverseMatch().

CSeq_id::EAccessionInfo CSeq_id_Handle::IdentifyAccession void   )  const [inline]
 

Definition at line 246 of file seq_id_handle.hpp.

References GetSeqId().

Referenced by BOOST_AUTO_TEST_CASE(), and CAlnSeqId::GetSequenceType().

bool CSeq_id_Handle::IsBetter const CSeq_id_Handle h  )  const
 

True if "this" is a better bioseq than "h".

Definition at line 149 of file seq_id_handle.cpp.

References GetMapper(), and CSeq_id_Mapper::x_IsBetter().

Referenced by CBlobSplitterImpl::CopySkeleton(), CDataSource_ScopeInfo::x_GetSeqMatch(), and CDataSource::x_GetSeqMatch().

bool CSeq_id_Handle::IsGi void   )  const [inline]
 

Definition at line 236 of file seq_id_handle.hpp.

References CSeq_id_Base::e_Gi, m_Info, and m_Packed.

Referenced by AsString(), BOOST_AUTO_TEST_CASE(), CCachedSequence::CCachedSequence(), CBlobSplitterImpl::CopySkeleton(), CFtableFormatter::FormatFeatHeader(), GetDirectLabel(), GetGi(), CId1Reader::GetGiBlob_ids(), GetGiForId(), CId1Reader::GetGiSeq_ids(), GetId(), GetLabel(), operator<<(), operator==(), s_GetAlignedSeqGi(), s_GetSeqIDString(), CSeq_id_Mapper::x_GetTree(), and CBuildDatabase::x_ResolveRemoteId().

bool CSeq_id_Handle::IsPacked void   )  const [inline]
 

Definition at line 228 of file seq_id_handle.hpp.

References m_Packed.

bool CSeq_id_Handle::MatchesTo const CSeq_id_Handle h  )  const
 

True if *this matches to h.

This mean that *this is either the same as h, or more generic version of h.

Definition at line 155 of file seq_id_handle.cpp.

References GetMapper(), and CSeq_id_Mapper::x_Match().

bool CSeq_id_Handle::operator!= const CSeq_id_Handle handle  )  const [inline]
 

Definition at line 181 of file seq_id_handle.hpp.

References m_Info, and m_Packed.

Referenced by CAlnSeqId::operator!=().

bool CSeq_id_Handle::operator< const CSeq_id_Handle handle  )  const [inline]
 

Definition at line 185 of file seq_id_handle.hpp.

References m_Info, and m_Packed.

bool CSeq_id_Handle::operator== const CSeq_id id  )  const
 

Definition at line 161 of file seq_id_handle.cpp.

References CSeq_id_Mapper::GetHandle(), GetMapper(), IsGi(), and m_Packed.

bool CSeq_id_Handle::operator== const CSeq_id_Handle handle  )  const [inline]
 

Definition at line 177 of file seq_id_handle.hpp.

References m_Info, and m_Packed.

Referenced by CAlnSeqId::operator==().

void CSeq_id_Handle::Reset void   )  [inline]
 

Reset the handle (remove seq-id reference).

Definition at line 199 of file seq_id_handle.hpp.

References m_Info, m_Packed, and CConstRef< C, Locker >::Reset().

Referenced by CIdMapper::AddMapping(), BOOST_AUTO_TEST_CASE(), CAlnMix::ChooseSeqId(), CwxDemoTableCtrlFrame::LoadAccession(), CwxDemoFeatureTableFrame::LoadAccession(), CwxDemoAlignTableFrame::LoadAccession(), CwxDemoTableCtrlFrame::LoadFile(), CwxDemoFeatureTableFrame::LoadFile(), CwxDemoAlignTableFrame::LoadFile(), CBioseq_Handle::Reset(), CDemoApp::Run(), s_OOFBlastHSP2SeqAlign(), s_TestFastaRoundTrip(), and CTSE_Info::SetSeq_entry().

void CSeq_id_Handle::Swap CSeq_id_Handle idh  )  [inline]
 

Definition at line 281 of file seq_id_handle.hpp.

References m_Info, m_Packed, swap(), and CConstRef< C, Locker >::Swap().

CSeq_id::E_Choice CSeq_id_Handle::Which void   )  const [inline]
 

Definition at line 224 of file seq_id_handle.hpp.

References m_Info.

Referenced by CId1Reader::GetGiBlob_ids(), CId1Reader::GetGiSeq_ids(), GetTitle(), s_ScoreForDBSource(), SameCDAccession(), CSeq_id_Textseq_Tree::x_FindStrInfo(), CDBSourceItem::x_GatherInfo(), CBuildDatabase::x_ResolveRemoteId(), and CGFFReader::x_ResolveSeqName().

const CSeq_id_Info* CSeq_id_Handle::x_GetInfo void   )  const [inline]
 

Definition at line 288 of file seq_id_handle.hpp.

References m_Info.


Friends And Related Function Documentation

friend class CSeq_id_Mapper [friend]
 

Definition at line 293 of file seq_id_handle.hpp.

friend class CSeq_id_Which_Tree [friend]
 

Definition at line 294 of file seq_id_handle.hpp.


Member Data Documentation

CConstRef<CSeq_id_Info, CSeq_id_InfoLocker> CSeq_id_Handle::m_Info [private]
 

Definition at line 297 of file seq_id_handle.hpp.

Referenced by AsString(), GetHash(), GetMapper(), GetSeqId(), GetSeqIdOrNull(), IsGi(), operator!=(), operator<(), operator==(), Reset(), Swap(), Which(), and x_GetInfo().

int CSeq_id_Handle::m_Packed [private]
 

Definition at line 298 of file seq_id_handle.hpp.

Referenced by AsString(), GetGi(), GetHash(), GetPacked(), GetSeqId(), GetSeqIdOrNull(), IsGi(), IsPacked(), operator!=(), operator<(), operator==(), Reset(), and Swap().


The documentation for this class was generated from the following files:
Generated on Wed Dec 9 08:07:49 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:19:52 2009 by modify_doxy.py rev. 173732