( CanBeDeleted() ) {
74 _ASSERT(m_HeapScope->CanBeDeleted());
75m_Impl = m_HeapScope->m_Impl;
212 "CScope::GetSeq_entryEditHandle: entry cannot be edited");
223 "CScope::GetSeq_annotEditHandle: annot cannot be edited");
234 "CScope::GetBioseqEditHandle: bioseq cannot be edited");
246 "CScope::GetBioseq_setEditHandle: " 247 "bioseq set cannot be edited");
429 if( iter->IsGi() ) {
433 if(
autoseq_id = iter->GetSeqId() ) {
434 if(
autotext_id = seq_id->GetTextseq_Id() ) {
437 if( text_id->IsSetAccession() && text_id->IsSetVersion() ) {
451 if( iter->IsGi() ) {
452 returniter->GetGi();
455 returniter->GetSeqId()->GetGi();
652 "CScope::RemoveAnnot: parent doesn't contain annot");
666 "CScope::ReplaceAnnot: parent doesn't contain old_annot");
695 constTSeq_id_Handles& idhs,
700 "CScope::GetBulkIds: null results pointer");
716 constTSeq_id_Handles& idhs,
721 "CScope::GetAccVers: null results pointer");
737 constTSeq_id_Handles& idhs,
742 "CScope::GetGis: null results pointer");
758 constTSeq_id_Handles& idhs,
763 "CScope::GetLabels: null results pointer");
779 constTSeq_id_Handles& idhs,
784 "CScope::GetTaxIds: null results pointer");
805 constTSeq_id_Handles& ids,
810 "CScope::GetSequenceLengths: null results pointer");
840 constTSeq_id_Handles& ids,
845 "CScope::GetSequenceTypes: null results pointer");
877 constTSeq_id_Handles& ids,
882 "CScope::GetSequenceStates: null results pointer");
912 constTSeq_id_Handles& ids,
917 "CScope::GetSequenceHashes: null results pointer");
CBioseq_set_EditHandle â.
Base class for all object manager exceptions.
void x_ClearAnnotCache(void)
TSeqPos GetSequenceLength(const CSeq_id_Handle &id, TGetFlags flags)
string GetLabel(const CSeq_id_Handle &idh, TGetFlags flags)
void ResetDataAndHistory(void)
TBioseqHandles GetBioseqHandles(const TIds &ids)
CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri, TExist action)
void GetSequenceStates(TSequenceStates &ret, const TIds &idhs, TGetFlags flags)
bool Exists(const CSeq_id_Handle &id)
void GetTaxIds(TTaxIds &ret, const TIds &idhs, TGetFlags flags)
CSeq_entry_Handle AddSeq_entry(CSeq_entry &entry, TPriority pri, TExist action)
int GetSequenceHash(const CSeq_id_Handle &id, TGetFlags flags)
TCDD_Entries GetCDDAnnots(const TIds &idhs)
TBioseqHandles GetBioseqHandlesFromTSE(const TIds &ids, const CTSE_Handle &tse)
void AddDefaults(TPriority priority)
CSeq_entry_Handle GetSeq_entryHandle(CDataLoader *loader, const CBlobIdKey &blob_id, TMissing action)
void GetGis(TGIs &ret, const TIds &idhs, TGetFlags flags)
CSeq_annot_Handle AddSharedSeq_annot(const CSeq_annot &annot, TPriority pri, TExist action)
CBioseq_Handle GetBioseqHandleFromTSE(const CSeq_id_Handle &id, const CTSE_Handle &tse)
void RemoveFromHistory(const CTSE_Handle &tse, int action)
CSeq_annot_Handle AddSeq_annot(CSeq_annot &annot, TPriority pri, TExist action)
void GetAccVers(TIds &ret, const TIds &idhs, TGetFlags flags)
void AddScope(CScope_Impl &scope, TPriority priority)
void GetAllTSEs(TTSE_Handles &tses, int kind)
void RemoveTopLevelBioseq(const CBioseq_Handle &seq)
void GetBulkIds(TBulkIds &ret, const TIds &idhs, TGetFlags flags)
void AddDataLoader(const string &loader_name, TPriority priority)
void RemoveTopLevelAnnot(const CSeq_annot_Handle &annot)
CSeq_inst::TMol GetSequenceType(const CSeq_id_Handle &id, TGetFlags flags)
CSeq_annot_Handle GetSeq_annotHandle(const CSeq_annot &annot, TMissing action)
bool IsSameBioseq(const CSeq_id_Handle &id1, const CSeq_id_Handle &id2, int get_flag)
void ResetHistory(int action)
CSeq_entry_Handle AddSeq_submit(CSeq_submit &submit, TPriority pri)
CSeq_entry_Handle AddSharedSeq_entry(const CSeq_entry &entry, TPriority pri, TExist action)
CSeq_feat_Handle GetSeq_featHandle(const CSeq_feat &feat, TMissing action)
void GetSequenceTypes(TSequenceTypes &ret, const TIds &idhs, TGetFlags flags)
CBioseq_Handle AddSharedBioseq(const CBioseq &bioseq, TPriority pri, TExist action)
CConstRef< CSynonymsSet > GetSynonyms(const CSeq_id_Handle &id, int get_flag)
void RemoveDataLoader(const string &loader_name, int action)
void GetSequenceLengths(TSequenceLengths &ret, const TIds &idhs, TGetFlags flags)
CObjectManager & GetObjectManager(void)
void GetSequenceHashes(TSequenceHashes &ret, const TIds &idhs, TGetFlags flags)
CSeq_id_Handle GetAccVer(const CSeq_id_Handle &idh, TGetFlags flags)
void GetLabels(TLabels &ret, const TIds &idhs, TGetFlags flags)
CBioseq_Handle GetBioseqHandle(const CSeq_id_Handle &id, int get_flag)
CBioseq_set_Handle GetBioseq_setHandle(const CBioseq_set &seqset, TMissing action)
TIds GetIds(const CSeq_id_Handle &idh, TGetFlags flags=0)
TGi GetGi(const CSeq_id_Handle &idh, TGetFlags flags)
CTSE_Handle GetEditHandle(const CTSE_Handle &src_tse)
TTaxId GetTaxId(const CSeq_id_Handle &idh, TGetFlags flags)
void RemoveTopLevelSeqEntry(const CTSE_Handle &entry)
int GetSequenceState(const CSeq_id_Handle &id, TGetFlags flags)
namespace ncbi::objects::
bool CanBeEdited(void) const
Return true if this TSE handle is local to scope and can be edited.
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
SStrictId_Tax::TId TTaxId
Taxon id type.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
void RemoveSeq_annot(const CSeq_annot_Handle &annot)
Revoke Seq-annot previously added using AddSeq_annot().
void RemoveAnnot(CSeq_entry &parent, CSeq_annot &annot)
TIds GetIds(const CSeq_id &id, TGetFlags flags=0)
Get "native" bioseq ids without filtering and matching.
CBioseq_Handle GetBioseqHandleFromTSE(const CSeq_id &id, const CTSE_Handle &tse)
Get bioseq handle for sequence withing one TSE.
void ResetHistory(EActionIfLocked action=eKeepIfLocked)
Clean all unused TSEs from the scope's cache and release the memory.
CScopeTransaction GetTransaction()
void AddDataLoader(const string &loader_name, TPriority pri=kPriority_Default)
Add data loader by name.
CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add bioseq, return bioseq handle.
TSequenceHashes GetSequenceHashes(const TSeq_id_Handles &idhs, TGetFlags flags=0)
vector< TTaxId > TTaxIds
Get taxonomy ids of sequences Return -1 for sequences that aren't found Return 0 for sequences that d...
vector< TSeqPos > TSequenceLengths
Get lengths of sequences Return kInvalidSeqPos for sequences that aren't found.
void RemoveFromHistory(const CTSE_Handle &tse, EActionIfLocked action=eKeepIfLocked)
Remove single TSE from the scope's history.
CSeq_id_Handle GetAccVer(const CSeq_id_Handle &idh, TGetFlags flags=0)
Get accession.version Seq-id Returns null CSeq_id_Handle if the sequence is not found or if it doesn'...
TTaxId GetTaxId(const CSeq_id &id, TGetFlags flags=0)
Get taxonomy id of bioseq Return -1 if sequence is not found Return 0 if sequence doesn't have taxono...
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CSeq_entry_Handle GetSeq_entryHandle(CDataLoader *loader, const TBlobId &blob_id, EMissing action=eMissing_Default)
Get Seq-entry handle by its blob-id, with possible loading.
CBioseq_set_EditHandle GetBioseq_setEditHandle(const CBioseq_set &seqset)
TSequenceStates GetSequenceStates(const TSeq_id_Handles &idhs, TGetFlags flags=0)
EExist
AddXxx() control values.
friend class CScopeTransaction
TSeq_id_Handles GetAccVers(const TSeq_id_Handles &idhs, TGetFlags flags=0)
Get accession.version Seq-id Returns null CSeq_id_Handles for sequences that aren't found or don't ha...
CSeq_entry_Handle AddSeq_submit(CSeq_submit &submit, TPriority pri=kPriority_Default)
Add Seq-submit, return its CSeq_entry_Handle.
void RemoveBioseq(const CBioseq_Handle &seq)
Revoke Bioseq previously added using AddBioseq().
TCDD_Entries GetCDDAnnots(const TIds &idhs)
TSeqPos GetSequenceLength(const CSeq_id &id, TGetFlags flags=0)
Get sequence length Return kInvalidSeqPos if sequence is not found.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
vector< string > TLabels
Get short descriptions of sequences, usually "accession.version" Returns empty strings for sequences ...
void AttachEntry(CSeq_entry &parent, CSeq_entry &entry)
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
CTSE_Handle GetTSE_Handle(const CSeq_entry &tse, EMissing action=eMissing_Default)
Find object in scope If object is not found GetXxxHandle() methods will either throw an exception or ...
string GetLabel(const CSeq_id &id, TGetFlags flags=0)
Get short description of bioseq, usually "accession.version" Returns empty string if the sequence is ...
vector< TGi > TGIs
Get GI of a sequence Returns ZERO_GI for sequence that aren't found or don't have GI.
TSequenceTypes GetSequenceTypes(const TSeq_id_Handles &idhs, TGetFlags flags=0)
CRef< CSeq_entry > GetTSE(void) const
Create seq-entry with all parsed sequences, annotations etc.
TBioseqHandles GetBioseqHandles(const TIds &ids)
Get bioseq handles for all ids.
void GetAllTSEs(TTSE_Handles &tses, enum ETSEKind kind=eManualTSEs)
CSeq_inst::TMol GetSequenceType(const CSeq_id &id, TGetFlags flags=0)
Get molecular type of sequence (protein/dna/rna) Return CSeq_inst::eMol_not_set if sequence is not fo...
CSeq_feat_Handle GetSeq_featHandle(const CSeq_feat &feat, EMissing action=eMissing_Default)
FParserFlags
Parser options.
vector< CBioseq_Handle::TBioseqStateFlags > TSequenceStates
Get GenBank states of sequences Return (fState_not_found|fState_no_data) for sequences that aren't fo...
vector< TSequenceHash > TSequenceHashes
Get data hashes of sequences Return 0 for sequences that aren't found or they don't have hash Note: 0...
CBioseq_EditHandle GetEditHandle(const CBioseq_Handle &seq)
Get editable Biosec handle by regular one.
vector< CBioseq_Handle > TBioseqHandles
static CSeq_id_Handle x_GetAccVer(const TIds &ids)
CBioseq_set_Handle GetBioseq_setHandle(const CBioseq_set &seqset, EMissing action=eMissing_Default)
CSeq_annot_Handle AddSeq_annot(CSeq_annot &annot, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add Seq-annot, return its CSeq_annot_Handle.
void AttachAnnot(CSeq_entry &parent, CSeq_annot &annot)
CObjectManager & GetObjectManager(void)
Get object manager controlling this scope.
CConstRef< CSynonymsSet > GetSynonyms(const CSeq_id &id)
Get bioseq synonyms, resolving to the bioseq in this scope.
int TSequenceHash
Get sequence data hash value Return 0 if sequence is not found or if its hash is not known Note: 0 ca...
CSeq_annot_Handle GetSeq_annotHandle(const CSeq_annot &annot, EMissing action=eMissing_Default)
TGIs GetGis(const TSeq_id_Handles &idhs, TGetFlags flags=0)
void UpdateAnnotIndex(void)
vector< CTSE_Handle > TCDD_Entries
Get CDD annotations for all ids.
void RemoveTopLevelSeqEntry(const CTSE_Handle &entry)
Revoke TSE previously added using AddTopLevelSeqEntry() or AddBioseq().
void ReplaceAnnot(CSeq_entry &entry, CSeq_annot &old_annot, CSeq_annot &new_annot)
TGi GetGi(const CSeq_id_Handle &idh, TGetFlags flags=0)
Get GI of a sequence Returns ZERO_GI if the sequence is not found or if it doesn't have GI.
TLabels GetLabels(const TSeq_id_Handles &idhs, TGetFlags flags=0)
void AddScope(CScope &scope, TPriority pri=kPriority_Default)
Add the scope's datasources as a single group with the given priority All data sources (data loaders ...
CSeq_entry_EditHandle GetSeq_entryEditHandle(const CSeq_entry &entry)
static TGi x_GetGi(const TIds &ids)
vector< CSeq_inst::TMol > TSequenceTypes
Get molecular types of sequences (protein/dna/rna) Return CSeq_inst::eMol_not_set for sequences that ...
TBulkIds GetBulkIds(const TSeq_id_Handles &idhs, TGetFlags flags=0)
ERemoveDataLoaders
Clear all information in the scope including data loaders.
TSequenceLengths GetSequenceLengths(const TSeq_id_Handles &idhs, TGetFlags flags=0)
TSequenceHash GetSequenceHash(const CSeq_id &id, TGetFlags flags=0)
TTaxIds GetTaxIds(const TSeq_id_Handles &idhs, TGetFlags flags=0)
TBioseqHandles GetBioseqHandlesFromTSE(const TIds &ids, const CTSE_Handle &tse)
Bulk get bioseq handles for sequence withing one TSE.
CBioseq_Handle::TBioseqStateFlags GetSequenceState(const CSeq_id &id, TGetFlags flags=0)
Get sequence GenBank state Return (fState_not_found|fState_no_data) if sequence is not found.
int TPriority
priority type and special value for added objects
void RemoveDataLoader(const string &loader_name, EActionIfLocked action=eThrowIfLocked)
Revoke data loader from the scope.
vector< CSeq_id_Handle > TIds
CRef< CScope_Impl > m_Impl
void RemoveEntry(CSeq_entry &entry)
CSeq_entry_Handle AddGC_Assembly(const CGC_Assembly &gc_assembly, CGC_Assembly_Parser::FParserFlags flags=CGC_Assembly_Parser::fDefault, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add GC-Assembly.
vector< TIds > TBulkIds
Get all ids of sequences Returns empty ids if the sequence is not found.
vector< CSeq_entry_Handle > TTSE_Handles
bool IsSameBioseq(const CSeq_id_Handle &id1, const CSeq_id_Handle &id2, EGetBioseqFlag get_flag)
Check if two seq-ids are resolved to the same Bioseq.
CRef< CScope > m_HeapScope
CSeq_annot_EditHandle GetSeq_annotEditHandle(const CSeq_annot &annot)
void ResetDataAndHistory(void)
Clear all information in the scope except added data loaders.
EMissing
GetXxxHandle control values.
bool Exists(const CSeq_id &id)
Check existence of sequence with this id.
CBioseq_EditHandle GetBioseqEditHandle(const CBioseq &bioseq)
Get edit handle for the specified object Throw an exception if object is not found,...
vector< CSeq_id_Handle > TSeq_id_Handles
Bulk retrieval methods Common argument typedef - vector of requested ids.
@ eGetBioseq_All
Search bioseq, load if not loaded yet.
const CTSE_Handle & GetTSE_Handle(void) const
const CTSE_Handle & GetTSE_Handle(void) const
Get CTSE_Handle of containing TSE.
void Remove(void) const
Remove current annot.
const CTSE_Handle & GetTSE_Handle(void) const
void Remove(void) const
Remove this Seq-entry from parent, or scope if it's top level Seq-entry.
CSeq_annot_EditHandle AttachAnnot(CSeq_annot &annot) const
Attach an annotation.
const CTSE_Handle & GetTSE_Handle(void) const
CSeq_entry_EditHandle GetParentEntry(void) const
Navigate object tree.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
@ e_Gi
GenInfo Integrated Database.
EMol
molecule class in living organism
Definition of all error codes used in objmgr libraries (xobjmgr.lib, xobjutil.lib and others).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4