NCBI C++ ToolKit
|
Search Toolkit Book for CPhrap_Seq
Public Types | |
typedef map< TSeqPos, TSeqPos > | TPadMap |
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< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Member Functions | |
CPhrap_Seq (TPhrapReaderFlags flags) | |
CPhrap_Seq (const string &name, TPhrapReaderFlags flags) | |
virtual | ~CPhrap_Seq (void) |
void | Read (CNcbiIstream &in) |
void | ReadData (CNcbiIstream &in) |
virtual void | ReadTag (CNcbiIstream &in, char tag)=0 |
void | SetComplemented (bool value) |
bool | IsComplemented (void) const |
TPhrapReaderFlags | GetFlags (void) const |
bool | FlagSet (EPhrapReaderFlags value) const |
const string & | GetName (void) const |
TSeqPos | GetPaddedLength (void) const |
TSeqPos | GetUnpaddedLength (void) const |
const string & | GetData (void) const |
CRef< CSeq_id > | GetId (void) const |
TSeqPos | GetPaddedPos (TSeqPos unpadded) const |
TSeqPos | GetUnpaddedPos (TSeqPos padded, TSeqPos *link=0) const |
CRef< CBioseq > | CreateBioseq (void) const |
const TPadMap & | GetPadMap (void) const |
TSeqPos | GetAlignedFrom (void) const |
TSeqPos | GetAlignedTo (void) const |
Public Member Functions inherited from CObject | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (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... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. 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 | |
void | CreateComplementedDescr (CRef< CSeq_descr > &descr) const |
void | CreatePadsFeat (CRef< CSeq_annot > &annot) const |
void | SetAligned (TSeqPos from, TSeqPos to) |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Private Member Functions | |
void | x_FillSeqData (CSeq_data &data) const |
void | CopyFrom (CPhrap_Seq &seq) |
Friends | |
class | CPhrap_Sequence |
Additional Inherited Members | |
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 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... | |
CPhrap_Seq::CPhrap_Seq | ( | TPhrapReaderFlags | flags | ) |
CPhrap_Seq::CPhrap_Seq | ( | const string & | name, |
TPhrapReaderFlags | flags | ||
) |
|
private |
Definition at line 205 of file phrap.cpp.
References _ASSERT, map_checker< Container >::empty(), m_AlignedFrom, m_AlignedTo, m_Complemented, m_Data, m_Flags, m_Id, m_Name, m_PaddedLength, m_PadMap, m_UnpaddedLength, and map_checker< Container >::swap().
Referenced by CPhrap_Sequence::GetContig(), CPhrap_Sequence::GetRead(), and CPhrap_Sequence::SetRead().
Definition at line 319 of file phrap.cpp.
References CSeq_inst_Base::eMol_dna, GetId(), m_UnpaddedLength, CBioseq_Base::SetId(), CBioseq_Base::SetInst(), CSeq_inst_Base::SetLength(), CSeq_inst_Base::SetMol(), CSeq_inst_Base::SetSeq_data(), and x_FillSeqData().
Referenced by CPhrap_Contig::CreateContig(), and CPhrap_Read::CreateRead().
|
protected |
Definition at line 345 of file phrap.cpp.
References FlagSet(), fPhrap_NoComplement, m_Complemented, CRef< C, Locker >::Reset(), CSeq_descr_Base::Set(), and CSeqdesc_Base::SetComment().
Referenced by CPhrap_Read::x_CreateDesc(), and CPhrap_Contig::x_CreateDesc().
|
protected |
Definition at line 365 of file phrap.cpp.
References FlagSet(), fPhrap_FeatGaps, GetId(), GetPaddedLength(), GetUnpaddedLength(), i, IsComplemented(), ITERATE, m_Name, m_PadMap, CRef< C, Locker >::Reset(), CSeq_feat_Base::SetComment(), CSeq_annot_Base::SetData(), CSeq_feat_Base::SetData(), CPacked_seqpnt_Base::SetId(), CSeq_feat_Base::SetLocation(), CPacked_seqpnt_Base::SetPoints(), and map_checker< Container >::size().
Referenced by CPhrap_Read::x_CreateFeat(), and CPhrap_Contig::x_CreateFeat().
|
inline |
Definition at line 130 of file phrap.cpp.
References m_Flags, and rapidjson::value.
Referenced by CreateComplementedDescr(), CreatePadsFeat(), IsComplemented(), CPhrap_Contig::x_AddBaseSegFeats(), CPhrap_Read::x_AddQualityFeat(), CPhrap_Contig::x_AddReadLocFeats(), CPhrap_Read::x_AddTagFeats(), CPhrap_Contig::x_AddTagFeats(), CPhrap_Read::x_CreateDesc(), CPhrap_Contig::x_CreateDesc(), and x_FillSeqData().
|
inline |
Definition at line 148 of file phrap.cpp.
References m_AlignedFrom.
Referenced by CPhrap_Read::IsCircular(), CPhrap_Contig::x_AddAlignRanges(), and CPhrap_Read::x_AddQualityFeat().
|
inline |
Definition at line 149 of file phrap.cpp.
References m_AlignedTo.
Referenced by CPhrap_Contig::x_AddAlignRanges(), and CPhrap_Read::x_AddQualityFeat().
|
inline |
Definition at line 129 of file phrap.cpp.
References m_Flags.
Referenced by CPhrap_Sequence::GetContig(), CPhrap_Sequence::GetRead(), CPhrap_Contig::ReadBaseSegment(), CPhrap_Read::ReadQuality(), CPhrap_Contig::ReadReadLocation(), and CPhrap_Contig::x_CreateAlign().
Definition at line 309 of file phrap.cpp.
References m_Id, m_Name, CRef< C, Locker >::Reset(), CSeq_id_Base::SetLocal(), and CObject_id_Base::SetStr().
Referenced by CreateBioseq(), CreatePadsFeat(), CPhrap_Contig::x_AddBaseSegFeats(), CPhrap_Read::x_AddQualityFeat(), CPhrap_Contig::x_AddReadLocFeats(), CPhrap_Read::x_AddTagFeats(), and CPhrap_Contig::x_AddTagFeats().
Definition at line 133 of file phrap.cpp.
References m_Name.
Referenced by CPhrap_Sequence::GetRead(), CPhrap_Read::ReadDS(), CPhrap_Contig::ReadReadLocation(), CPhrap_Contig::ReadTag(), CPhrap_Sequence::SetRead(), CPhrapReader::x_AddContig(), CPhrapReader::x_AddRead(), CPhrap_Read::x_AddTagFeats(), and CPhrap_Contig::x_CreateGraph().
|
inline |
Definition at line 134 of file phrap.cpp.
References m_PaddedLength.
Referenced by CreatePadsFeat(), CPhrap_Contig::x_AddAlignRanges(), CPhrap_Contig::x_AddBaseSegFeats(), CPhrap_Contig::x_AddReadLocFeats(), CPhrap_Contig::x_CreateAlignAll(), CPhrap_Contig::x_CreateAlignOptimized(), CPhrap_Contig::x_CreateAlignPairs(), and CPhrap_Contig::x_CreateSeq_align().
Definition at line 278 of file phrap.cpp.
References _ASSERT, map_checker< Container >::end(), first(), map_checker< Container >::lower_bound(), m_PadMap, and pad().
Definition at line 146 of file phrap.cpp.
References m_PadMap.
Referenced by CPhrap_Contig::x_AddAlignRanges().
|
inline |
Definition at line 135 of file phrap.cpp.
References m_UnpaddedLength.
Referenced by CreatePadsFeat(), CPhrap_Contig::ReadBaseQualities(), CPhrap_Contig::x_AddAlignRanges(), CPhrap_Read::x_AddQualityFeat(), CPhrap_Contig::x_AddReadLocFeats(), CPhrap_Read::x_AddTagFeats(), CPhrap_Contig::x_CreateGraph(), and CPhrap_Contig::x_CreateSeq_align().
Definition at line 290 of file phrap.cpp.
References map_checker< Container >::end(), kInvalidSeqPos, map_checker< Container >::lower_bound(), m_PadMap, and pad().
Referenced by CPhrap_Contig::x_AddAlignRanges(), CPhrap_Contig::x_AddBaseSegFeats(), CPhrap_Read::x_AddQualityFeat(), CPhrap_Contig::x_AddReadLocFeats(), CPhrap_Read::x_AddTagFeats(), and CPhrap_Contig::x_AddTagFeats().
|
inline |
Definition at line 117 of file phrap.cpp.
References FlagSet(), fPhrap_NoComplement, and m_Complemented.
Referenced by CreatePadsFeat(), CPhrap_Read::x_AddQualityFeat(), CPhrap_Read::x_AddTagFeats(), CPhrap_Contig::x_CreateSeq_align(), and x_FillSeqData().
void CPhrap_Seq::Read | ( | CNcbiIstream & | in | ) |
Definition at line 222 of file phrap.cpp.
References CheckStreamState(), in(), m_Name, and m_PaddedLength.
Referenced by CPhrap_Read::Read(), and CPhrap_Contig::Read().
void CPhrap_Seq::ReadData | ( | CNcbiIstream & | in | ) |
Definition at line 233 of file phrap.cpp.
References _ASSERT, cnt, CT_POS_TYPE, fPhrap_OldVersion, in(), isspace(), kInvalidSeqPos, kPadChar, m_AlignedTo, m_Data, m_Flags, m_Name, m_PaddedLength, m_PadMap, m_UnpaddedLength, NCBI_THROW2, next(), ReadLine(), and NStr::ToUpper().
|
pure virtual |
Implemented in CPhrap_Sequence, CPhrap_Contig, and CPhrap_Read.
Referenced by CPhrapReader::x_ReadTag().
Definition at line 154 of file phrap.cpp.
References m_AlignedFrom, and m_AlignedTo.
Referenced by CPhrap_Read::ReadQuality().
|
inline |
Definition at line 116 of file phrap.cpp.
References m_Complemented, and rapidjson::value.
Referenced by CPhrap_Read::AddReadLoc(), CPhrap_Sequence::CPhrap_Sequence(), and CPhrap_Contig::Read().
|
private |
Definition at line 333 of file phrap.cpp.
References data, FlagSet(), fPhrap_PackSeqData, IsComplemented(), m_Data, m_UnpaddedLength, CSeqportUtil::Pack(), and CSeqportUtil::ReverseComplement().
Referenced by CreateBioseq().
|
friend |
|
private |
Definition at line 174 of file phrap.cpp.
Referenced by CopyFrom(), GetAlignedFrom(), and SetAligned().
|
private |
Definition at line 175 of file phrap.cpp.
Referenced by CopyFrom(), GetAlignedTo(), ReadData(), and SetAligned().
|
private |
Definition at line 173 of file phrap.cpp.
Referenced by CopyFrom(), CreateComplementedDescr(), IsComplemented(), and SetComplemented().
|
private |
Definition at line 171 of file phrap.cpp.
Referenced by CopyFrom(), GetData(), ReadData(), and x_FillSeqData().
|
private |
Definition at line 166 of file phrap.cpp.
Referenced by CopyFrom(), FlagSet(), GetFlags(), and ReadData().
Definition at line 176 of file phrap.cpp.
Referenced by CopyFrom(), and GetId().
|
private |
Definition at line 168 of file phrap.cpp.
Referenced by CopyFrom(), CreatePadsFeat(), GetId(), GetName(), Read(), and ReadData().
|
private |
Definition at line 169 of file phrap.cpp.
Referenced by CopyFrom(), GetPaddedLength(), Read(), and ReadData().
|
private |
Definition at line 172 of file phrap.cpp.
Referenced by CopyFrom(), CreatePadsFeat(), GetPaddedPos(), GetPadMap(), GetUnpaddedPos(), and ReadData().
|
private |
Definition at line 170 of file phrap.cpp.
Referenced by CopyFrom(), CreateBioseq(), GetUnpaddedLength(), ReadData(), and x_FillSeqData().