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

Represents ASN.1 type GC-Sequence defined in file genome_collection.asn

Search Toolkit Book for CGC_Sequence

#include <objects/genomecoll/GC_Sequence.hpp>

+ Inheritance diagram for CGC_Sequence:
+ Collaboration diagram for CGC_Sequence:

Public Types

enum  EChildrenSubset { eScaffold , eComponent , eAll }
 
typedef list< CConstRef< CGC_Sequence > > TSequenceList
 
- Public Types inherited from CGC_Sequence_Base
enum  EPatch_type { ePatch_type_novel = 0 , ePatch_type_fix = 1 , ePatch_type_other = 255 }
 
enum class  E_memberIndex {
  e__allMandatory = 0 , e_seq_id , e_seq_id_synonyms , e_descr ,
  e_annot , e_sequences , e_structure , e_stats ,
  e_patch_type , e_roles
}
 
typedef CSeq_id TSeq_id
 
typedef list< CRef< CGC_TypedSeqId > > TSeq_id_synonyms
 
typedef CSeq_descr TDescr
 
typedef list< CRef< CSeq_annot > > TAnnot
 
typedef list< CRef< CGC_TaggedSequences > > TSequences
 
typedef CDelta_ext TStructure
 
typedef CGC_SequenceStats TStats
 
typedef int TPatch_type
 
typedef list< intTRoles
 
typedef Tparent::CMemberIndex< E_memberIndex, 10 > TmemberIndex
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CGC_Sequence (void)
 
 ~CGC_Sequence (void)
 
CConstRef< CGC_AssemblyUnitGetAssemblyUnit () const
 Access the assembly unit the sequence belongs to. More...
 
CConstRef< CGC_AssemblyGetFullAssembly () const
 Access the most specific full assembly the sequence belongs to This is needed because assemblies are packaged as sets of assemblies; knowing the unit is not always enough. More...
 
CConstRef< CGC_RepliconGetReplicon () const
 Access the replicon the sequence belongs to. More...
 
CConstRef< CGC_SequenceGetParent () const
 Access the parent sequence of this sequence. More...
 
CConstRef< CGC_SequenceGetTopLevelParent () const
 Access the top-most parent sequence of this sequence. More...
 
CGC_TaggedSequences::TState GetParentRelation () const
 Access the relationship to the parent. More...
 
CConstRef< CSeq_idGetSynonymSeq_id (CGC_TypedSeqId::E_Choice type, CGC_SeqIdAlias::E_AliasTypes) const
 
CConstRef< CSeq_idGetSubmitterName () const
 
bool HasRole (int Role) const
 
void GetChildren (TSequenceList &children, EChildrenSubset subset=eAll, CGC_TaggedSequences::TState state=0, int level=0) const
 Get sub-sequences. More...
 
string GetChrName () const
 Get name of chromosome that this sequence belongs to, if any. More...
 
string GetUnitDisplayName () const
 Get full display name of assmebly unit. More...
 
bool IsOrganelle () const
 Is this aN organelle sequence? More...
 
bool CanGetLength () const
 Is the length statistic available? More...
 
TSeqPos GetLength () const
 return the length of this sequence. More...
 
- Public Member Functions inherited from CGC_Sequence_Base
 CGC_Sequence_Base (void)
 
virtual ~CGC_Sequence_Base (void)
 
 DECLARE_INTERNAL_TYPE_INFO ()
 
bool IsSetSeq_id (void) const
 identifiers are: Local / gpipe-satellite / genbank / refseq local is merely local name (or maybe with WGS accession??) others are accession/ver/gi More...
 
bool CanGetSeq_id (void) const
 Check if it is safe to call GetSeq_id method. More...
 
void ResetSeq_id (void)
 Reset Seq_id data member. More...
 
const TSeq_idGetSeq_id (void) const
 Get the Seq_id member data. More...
 
void SetSeq_id (TSeq_id &value)
 Assign a value to Seq_id data member. More...
 
TSeq_idSetSeq_id (void)
 Assign a value to Seq_id data member. More...
 
bool IsSetSeq_id_synonyms (void) const
 Other known identifiers: Local / gpipe-satellite / genbank / refseq Check if a value has been assigned to Seq_id_synonyms data member. More...
 
bool CanGetSeq_id_synonyms (void) const
 Check if it is safe to call GetSeq_id_synonyms method. More...
 
void ResetSeq_id_synonyms (void)
 Reset Seq_id_synonyms data member. More...
 
const TSeq_id_synonymsGetSeq_id_synonyms (void) const
 Get the Seq_id_synonyms member data. More...
 
TSeq_id_synonymsSetSeq_id_synonyms (void)
 Assign a value to Seq_id_synonyms data member. More...
 
bool IsSetDescr (void) const
 Various attributes assigned at this level: biosrc, comments, publications... More...
 
bool CanGetDescr (void) const
 Check if it is safe to call GetDescr method. More...
 
void ResetDescr (void)
 Reset Descr data member. More...
 
const TDescrGetDescr (void) const
 Get the Descr member data. More...
 
void SetDescr (TDescr &value)
 Assign a value to Descr data member. More...
 
TDescrSetDescr (void)
 Assign a value to Descr data member. More...
 
bool IsSetAnnot (void) const
 Feature annotation; Contains Pseudo Autosomal regions on chromosomes and scaffolds in the following format: Id = <ID of PAR (ex:"PAR#1")> Desc (set of Annot-descr) Name: "pseudo autosomal region" Region (seq-loc): int (seq-interval) Id: <GI of chromosome> From: <start-position of region> To : <end-position of region> Data: locs (set of seq-loc): List of int (seq-interval): Id: GI of scaffold From/to: position on scaffold that belongs to this PAR region. More...
 
bool CanGetAnnot (void) const
 Check if it is safe to call GetAnnot method. More...
 
void ResetAnnot (void)
 Reset Annot data member. More...
 
const TAnnotGetAnnot (void) const
 Get the Annot member data. More...
 
TAnnotSetAnnot (void)
 Assign a value to Annot data member. More...
 
bool IsSetSequences (void) const
 placed: populated both on chromosome and scaffold levels unlocalized: populated on chromosome level Check if a value has been assigned to Sequences data member. More...
 
bool CanGetSequences (void) const
 Check if it is safe to call GetSequences method. More...
 
void ResetSequences (void)
 Reset Sequences data member. More...
 
const TSequencesGetSequences (void) const
 Get the Sequences member data. More...
 
TSequencesSetSequences (void)
 Assign a value to Sequences data member. More...
 
bool IsSetStructure (void) const
 locations of ordered scaffolds/components Check if a value has been assigned to Structure data member. More...
 
bool CanGetStructure (void) const
 Check if it is safe to call GetStructure method. More...
 
void ResetStructure (void)
 Reset Structure data member. More...
 
const TStructureGetStructure (void) const
 Get the Structure member data. More...
 
void SetStructure (TStructure &value)
 Assign a value to Structure data member. More...
 
TStructureSetStructure (void)
 Assign a value to Structure data member. More...
 
bool IsSetStats (void) const
 statistics Check if a value has been assigned to Stats data member. More...
 
bool CanGetStats (void) const
 Check if it is safe to call GetStats method. More...
 
void ResetStats (void)
 Reset Stats data member. More...
 
const TStatsGetStats (void) const
 Get the Stats member data. More...
 
void SetStats (TStats &value)
 Assign a value to Stats data member. More...
 
TStatsSetStats (void)
 Assign a value to Stats data member. More...
 
bool IsSetPatch_type (void) const
 Check if a value has been assigned to Patch_type data member. More...
 
bool CanGetPatch_type (void) const
 Check if it is safe to call GetPatch_type method. More...
 
void ResetPatch_type (void)
 Reset Patch_type data member. More...
 
TPatch_type GetPatch_type (void) const
 Get the Patch_type member data. More...
 
void SetPatch_type (TPatch_type value)
 Assign a value to Patch_type data member. More...
 
TPatch_typeSetPatch_type (void)
 Assign a value to Patch_type data member. More...
 
bool IsSetRoles (void) const
 sequence-role: what role(s) does this sequence have in the assembly Check if a value has been assigned to Roles data member. More...
 
bool CanGetRoles (void) const
 Check if it is safe to call GetRoles method. More...
 
void ResetRoles (void)
 Reset Roles data member. More...
 
const TRolesGetRoles (void) const
 Get the Roles member data. More...
 
TRolesSetRoles (void)
 Assign a value to Roles data member. More...
 
virtual void Reset (void)
 Reset the whole object. More...
 
- Public Member Functions inherited from CSerialObject
 CSerialObject (void)
 
virtual ~CSerialObject (void)
 
virtual const CTypeInfoGetThisTypeInfo (void) const =0
 
virtual void Assign (const CSerialObject &source, ESerialRecursionMode how=eRecursive)
 Set object to copy of another one. More...
 
virtual bool Equals (const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
 Check if both objects contain the same values. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
void ThrowUnassigned (TMemberIndex index) const
 
void ThrowUnassigned (TMemberIndex index, const char *file_name, int file_line) const
 
bool HasNamespaceName (void) const
 Check if object data type has namespace name. More...
 
const stringGetNamespaceName (void) const
 Get namespace name. More...
 
bool HasNamespacePrefix (void) const
 Check if data type has namespace prefix. More...
 
const stringGetNamespacePrefix (void) const
 Get namespace prefix. More...
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Protected Member Functions

TSeqPos x_GetLength () const
 
void x_GetChildren (TSequenceList &children, EChildrenSubset subset, CGC_TaggedSequences::TState state, int level) const
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Protected Attributes

CGC_Assemblym_Assembly
 
CGC_AssemblyUnitm_AssemblyUnit
 
CGC_Repliconm_Replicon
 
CGC_Sequencem_ParentSequence
 
CGC_TaggedSequences::TState m_ParentRel
 
TSeqPos m_SeqLength
 
bool m_SeqLengthRetrieved
 

Private Types

typedef CGC_Sequence_Base Tparent
 

Private Member Functions

 CGC_Sequence (const CGC_Sequence &value)
 
CGC_Sequenceoperator= (const CGC_Sequence &value)
 

Friends

class CGC_Assembly
 
class CGC_Replicon
 

Additional Inherited Members

- Static Public Member Functions inherited from CGC_Sequence_Base
static const NCBI_NS_NCBI::CEnumeratedTypeValues *ENUM_METHOD_NAME() EPatch_type (void)
 Access to EPatch_type's attributes (values, names) as defined in spec. More...
 
- Static Public Member Functions inherited from CSerialObject
static void SetVerifyDataThread (ESerialVerifyData verify)
 
static void SetVerifyDataGlobal (ESerialVerifyData verify)
 
static string UnassignedString (void)
 
static CStringUTF8 UnassignedStringUTF8 (void)
 
static char UnassignedByte (void)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CSerialObject
static const char * ms_UnassignedStr = "<*unassigned*>"
 
static const char ms_UnassignedByte = char(0xcd)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 

Detailed Description

Definition at line 62 of file GC_Sequence.hpp.

Member Typedef Documentation

◆ Tparent

Definition at line 64 of file GC_Sequence.hpp.

◆ TSequenceList

Definition at line 98 of file GC_Sequence.hpp.

Member Enumeration Documentation

◆ EChildrenSubset

Enumerator
eScaffold 
eComponent 
eAll 

Definition at line 99 of file GC_Sequence.hpp.

Constructor & Destructor Documentation

◆ CGC_Sequence() [1/2]

CGC_Sequence::CGC_Sequence ( void  )

Definition at line 56 of file GC_Sequence.cpp.

◆ ~CGC_Sequence()

CGC_Sequence::~CGC_Sequence ( void  )

Definition at line 69 of file GC_Sequence.cpp.

◆ CGC_Sequence() [2/2]

CGC_Sequence::CGC_Sequence ( const CGC_Sequence value)
private

Member Function Documentation

◆ CanGetLength()

bool CGC_Sequence::CanGetLength ( void  ) const

Is the length statistic available?

Definition at line 283 of file GC_Sequence.cpp.

References x_GetLength().

Referenced by CGC_Assembly_Parser::x_AddBioseq(), and CSeq_loc_Mapper::x_AddVirtualBioseq().

◆ GetAssemblyUnit()

CConstRef< CGC_AssemblyUnit > CGC_Sequence::GetAssemblyUnit ( ) const

Access the assembly unit the sequence belongs to.

Definition at line 74 of file GC_Sequence.cpp.

References m_AssemblyUnit.

Referenced by CTableDataGCAssembly::GetStringValue(), and GetUnitDisplayName().

◆ GetChildren()

void CGC_Sequence::GetChildren ( TSequenceList children,
EChildrenSubset  subset = eAll,
CGC_TaggedSequences::TState  state = 0,
int  level = 0 
) const

Get sub-sequences.

Parameters
subsetsubset of children to get; default is all children
statsget only children with this state; default is all children
lebelget children up to this level; default is all levels

Definition at line 204 of file GC_Sequence.cpp.

References x_GetChildren().

◆ GetChrName()

string CGC_Sequence::GetChrName ( ) const

Get name of chromosome that this sequence belongs to, if any.

Definition at line 261 of file GC_Sequence.cpp.

References GetReplicon(), and GetTopLevelParent().

Referenced by IsOrganelle().

◆ GetFullAssembly()

CConstRef< CGC_Assembly > CGC_Sequence::GetFullAssembly ( ) const

Access the most specific full assembly the sequence belongs to This is needed because assemblies are packaged as sets of assemblies; knowing the unit is not always enough.

Definition at line 79 of file GC_Sequence.cpp.

References m_Assembly.

◆ GetLength()

TSeqPos CGC_Sequence::GetLength ( void  ) const

return the length of this sequence.

if not available throws CUnassignedMember exception.

Definition at line 288 of file GC_Sequence.cpp.

References eGet, NCBI_THROW, result, and x_GetLength().

Referenced by CGC_Assembly_Parser::x_AddBioseq(), and CSeq_loc_Mapper::x_AddVirtualBioseq().

◆ GetParent()

CConstRef< CGC_Sequence > CGC_Sequence::GetParent ( void  ) const

◆ GetParentRelation()

CGC_TaggedSequences::TState CGC_Sequence::GetParentRelation ( ) const

Access the relationship to the parent.

Definition at line 95 of file GC_Sequence.cpp.

References m_ParentRel.

Referenced by CTableDataGCAssembly::GetStringValue(), and CGencollIdMapper::x_FillGpipeTopRole().

◆ GetReplicon()

CConstRef< CGC_Replicon > CGC_Sequence::GetReplicon ( ) const

Access the replicon the sequence belongs to.

Definition at line 84 of file GC_Sequence.cpp.

References m_Replicon.

Referenced by CGC_Assembly::CreateIndex(), GetChrName(), and CTableDataGCAssembly::GetStringValue().

◆ GetSubmitterName()

CConstRef< CSeq_id > CGC_Sequence::GetSubmitterName ( ) const

◆ GetSynonymSeq_id()

CConstRef< CSeq_id > CGC_Sequence::GetSynonymSeq_id ( CGC_TypedSeqId::E_Choice  type,
CGC_SeqIdAlias::E_AliasTypes  alias_type 
) const

◆ GetTopLevelParent()

CConstRef< CGC_Sequence > CGC_Sequence::GetTopLevelParent ( ) const

Access the top-most parent sequence of this sequence.

Definition at line 101 of file GC_Sequence.cpp.

Referenced by GetChrName().

◆ GetUnitDisplayName()

string CGC_Sequence::GetUnitDisplayName ( ) const

Get full display name of assmebly unit.

Definition at line 272 of file GC_Sequence.cpp.

References GetAssemblyUnit().

◆ HasRole()

bool CGC_Sequence::HasRole ( int  Role) const

◆ IsOrganelle()

bool CGC_Sequence::IsOrganelle ( ) const

Is this aN organelle sequence?

Definition at line 278 of file GC_Sequence.cpp.

References GetChrName().

◆ operator=()

CGC_Sequence& CGC_Sequence::operator= ( const CGC_Sequence value)
private

◆ x_GetChildren()

void CGC_Sequence::x_GetChildren ( TSequenceList children,
EChildrenSubset  subset,
CGC_TaggedSequences::TState  state,
int  level 
) const
protected

◆ x_GetLength()

TSeqPos CGC_Sequence::x_GetLength ( ) const
protected

Friends And Related Function Documentation

◆ CGC_Assembly

friend class CGC_Assembly
friend

Definition at line 65 of file GC_Sequence.hpp.

◆ CGC_Replicon

friend class CGC_Replicon
friend

Definition at line 66 of file GC_Sequence.hpp.

Member Data Documentation

◆ m_Assembly

CGC_Assembly* CGC_Sequence::m_Assembly
protected

Definition at line 130 of file GC_Sequence.hpp.

Referenced by GetFullAssembly(), and CGC_Assembly::x_Index().

◆ m_AssemblyUnit

CGC_AssemblyUnit* CGC_Sequence::m_AssemblyUnit
protected

Definition at line 131 of file GC_Sequence.hpp.

Referenced by GetAssemblyUnit(), and CGC_Assembly::x_Index().

◆ m_ParentRel

CGC_TaggedSequences::TState CGC_Sequence::m_ParentRel
protected

Definition at line 134 of file GC_Sequence.hpp.

Referenced by GetParentRelation(), and CGC_Assembly::x_Index().

◆ m_ParentSequence

CGC_Sequence* CGC_Sequence::m_ParentSequence
protected

Definition at line 133 of file GC_Sequence.hpp.

Referenced by GetParent(), and CGC_Assembly::x_Index().

◆ m_Replicon

CGC_Replicon* CGC_Sequence::m_Replicon
protected

Definition at line 132 of file GC_Sequence.hpp.

Referenced by GetReplicon(), and CGC_Assembly::x_Index().

◆ m_SeqLength

TSeqPos CGC_Sequence::m_SeqLength
mutableprotected

Definition at line 137 of file GC_Sequence.hpp.

Referenced by x_GetLength().

◆ m_SeqLengthRetrieved

bool CGC_Sequence::m_SeqLengthRetrieved
mutableprotected

Definition at line 138 of file GC_Sequence.hpp.

Referenced by x_GetLength().


The documentation for this class was generated from the following files:
Modified on Thu Mar 28 17:09:29 2024 by modify_doxy.py rev. 669887