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

Search Toolkit Book for CBiosampleChkApp

+ Inheritance diagram for CBiosampleChkApp:
+ Collaboration diagram for CBiosampleChkApp:

Public Member Functions

 CBiosampleChkApp (void)
 
virtual void Init (void)
 
virtual int Run (void)
 
void ReadClassMember (CObjectIStream &in, const CObjectInfo::CMemberIterator &member)
 This method will be called at approriate time when the object of requested type is to be read. More...
 

Private Types

enum  E_Mode {
  e_report_diffs = 1, e_generate_biosample, e_push, e_take_from_biosample,
  e_take_from_biosample_force, e_report_status
}
 
enum  E_ListType { e_none = 0, e_accessions, e_files }
 
- Private 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 CAtomicCounter TCounter
 Counter type is CAtomiCounter. More...
 
typedef TCounter::TValue TCount
 Alias for value type of counter. More...
 

Private Member Functions

void Setup (const CArgs &args)
 
CObjectIStreamOpenFile (const CArgs &args)
 
CObjectIStreamOpenFile (string fname, const CArgs &args)
 
void GetBioseqDiffs (CBioseq_Handle bh)
 
void PushToRecord (CBioseq_Handle bh)
 
void ProcessBioseqForUpdate (CBioseq_Handle bh)
 
void ProcessBioseqHandle (CBioseq_Handle bh)
 
void ProcessSeqEntry (CRef< CSeq_entry > se)
 
void ProcessSeqEntry (void)
 
void ProcessSet (void)
 
void ProcessSeqSubmit (void)
 
void ProcessAsnInput (void)
 
void ProcessList (const string &fname)
 
void ProcessFileList (const string &fname)
 
int ProcessOneDirectory (const string &dir_name, const string &file_suffix, const string &file_mask, bool recurse)
 
void ProcessOneFile (string fname)
 
void ProcessReleaseFile (const CArgs &args)
 
CRef< CSeq_entryReadSeqEntry (void)
 
CRef< CBioseq_setReadBioseqSet (void)
 
void PrintResults (biosample_util::TBiosampleFieldDiffList &diffs)
 
void PrintDiffs (biosample_util::TBiosampleFieldDiffList &diffs)
 
void PrintTable (CRef< CSeq_table > table)
 
CRef< CScopeBuildScope (void)
 
void UpdateBioSource (CBioseq_Handle bh, const CBioSource &src)
 
vector< CRef< CSeqdesc > > GetBiosampleDescriptors (string fname)
 
vector< CRef< CSeqdesc > > GetBiosampleDescriptorsFromSeqSubmit ()
 
vector< CRef< CSeqdesc > > GetBiosampleDescriptorsFromSeqEntry ()
 
vector< CRef< CSeqdesc > > GetBiosampleDescriptorsFromSeqEntry (const CSeq_entry &se)
 
- Private Member Functions inherited from CReadClassMemberHook
virtual ~CReadClassMemberHook (void)
 
virtual void ReadMissingClassMember (CObjectIStream &in, const CObjectInfoMI &member)
 
void DefaultRead (CObjectIStream &in, const CObjectInfoMI &object)
 
void DefaultSkip (CObjectIStream &in, const CObjectTypeInfoMI &object)
 
void ResetMember (const CObjectInfoMI &object, CObjectInfoMI::EEraseFlag flag=CObjectInfoMI::eErase_Optional)
 
- Private 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...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 
- Private 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
 

Private Attributes

CRef< CObjectManagerm_ObjMgr
 
auto_ptr< CObjectIStreamm_In
 
bool m_Continue
 
size_t m_Level
 
CNcbiOstreamm_ReportStream
 
bool m_NeedReportHeader
 
CNcbiOfstreamm_AsnOut
 
CNcbiOstreamm_LogStream
 
int m_Mode
 
int m_ReturnCode
 
int m_ListType
 
string m_StructuredCommentPrefix
 
bool m_CompareStructuredComments
 
bool m_UseDevServer
 
bool m_FirstSeqOnly
 
string m_IDPrefix
 
string m_HUPDate
 
string m_BioSampleAccession
 
string m_BioProjectAccession
 
string m_Owner
 
string m_Comment
 
size_t m_Processed
 
size_t m_Unprocessed
 
biosample_util::TBiosampleFieldDiffList m_Diffs
 
CRef< CSeq_tablem_Table
 
vector< CRef< CSeqdesc > > m_Descriptors
 
CBiosampleHandlerm_Handler
 
biosample_util::TBioSamples m_cache
 

Additional Inherited Members

- Static Private Member Functions inherited from CObject
static NCBI_NORETURN void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_NORETURN 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 Private Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Private 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 187 of file biosample_chk.cpp.

Member Enumeration Documentation

Enumerator
e_none 
e_accessions 
e_files 

Definition at line 257 of file biosample_chk.cpp.

Enumerator
e_report_diffs 
e_generate_biosample 
e_push 
e_take_from_biosample 
e_take_from_biosample_force 
e_report_status 

Definition at line 247 of file biosample_chk.cpp.

Constructor & Destructor Documentation

CBiosampleChkApp::CBiosampleChkApp ( void  )

Definition at line 290 of file biosample_chk.cpp.

Member Function Documentation

CRef< CScope > CBiosampleChkApp::BuildScope ( void  )
private
vector< CRef< CSeqdesc > > CBiosampleChkApp::GetBiosampleDescriptors ( string  fname)
private
vector< CRef< CSeqdesc > > CBiosampleChkApp::GetBiosampleDescriptorsFromSeqEntry ( void  )
private

Definition at line 555 of file biosample_chk.cpp.

References ReadSeqEntry().

Referenced by GetBiosampleDescriptors(), and GetBiosampleDescriptorsFromSeqSubmit().

vector< CRef< CSeqdesc > > CBiosampleChkApp::GetBiosampleDescriptorsFromSeqEntry ( const CSeq_entry se)
private
vector< CRef< CSeqdesc > > CBiosampleChkApp::GetBiosampleDescriptorsFromSeqSubmit ( )
private
void CBiosampleChkApp::GetBioseqDiffs ( CBioseq_Handle  bh)
private
void CBiosampleChkApp::Init ( void  )
virtual
CObjectIStream * CBiosampleChkApp::OpenFile ( const CArgs args)
private
CObjectIStream * CBiosampleChkApp::OpenFile ( string  fname,
const CArgs args 
)
private

Definition at line 1218 of file biosample_chk.cpp.

References eSerial_AsnBinary, eSerial_AsnText, format, and CObjectIStream::Open().

void CBiosampleChkApp::PrintDiffs ( biosample_util::TBiosampleFieldDiffList diffs)
private

Definition at line 899 of file biosample_chk.cpp.

References ITERATE, m_NeedReportHeader, m_Processed, m_ReportStream, and m_Unprocessed.

Referenced by PrintResults().

void CBiosampleChkApp::PrintResults ( biosample_util::TBiosampleFieldDiffList diffs)
private

Definition at line 923 of file biosample_chk.cpp.

References PrintDiffs().

Referenced by ProcessOneFile().

void CBiosampleChkApp::PrintTable ( CRef< CSeq_table table)
private
void CBiosampleChkApp::ProcessAsnInput ( void  )
private
void CBiosampleChkApp::ProcessBioseqForUpdate ( CBioseq_Handle  bh)
private
void CBiosampleChkApp::ProcessBioseqHandle ( CBioseq_Handle  bh)
private
void CBiosampleChkApp::ProcessFileList ( const string fname)
private
void CBiosampleChkApp::ProcessList ( const string fname)
private
int CBiosampleChkApp::ProcessOneDirectory ( const string dir_name,
const string file_suffix,
const string file_mask,
bool  recurse 
)
private
void CBiosampleChkApp::ProcessOneFile ( string  fname)
private
void CBiosampleChkApp::ProcessReleaseFile ( const CArgs args)
private
void CBiosampleChkApp::ProcessSeqEntry ( CRef< CSeq_entry se)
private
void CBiosampleChkApp::ProcessSeqEntry ( void  )
private

Definition at line 1066 of file biosample_chk.cpp.

References m_AsnOut, and ReadSeqEntry().

Referenced by ProcessAsnInput(), ProcessSeqSubmit(), and ProcessSet().

void CBiosampleChkApp::ProcessSeqSubmit ( void  )
private
void CBiosampleChkApp::ProcessSet ( void  )
private
void CBiosampleChkApp::PushToRecord ( CBioseq_Handle  bh)
private

Definition at line 951 of file biosample_chk.cpp.

References ITERATE, m_Descriptors, and UpdateBioSource().

Referenced by ProcessBioseqForUpdate(), and ProcessBioseqHandle().

CRef< CBioseq_set > CBiosampleChkApp::ReadBioseqSet ( void  )
private

Definition at line 866 of file biosample_chk.cpp.

References CObjectIStream::eNoFileHeader, m_In, and ObjectInfo().

Referenced by ProcessSet().

void CBiosampleChkApp::ReadClassMember ( CObjectIStream in,
const CObjectInfo::CMemberIterator member 
)
virtual

This method will be called at approriate time when the object of requested type is to be read.

Implements CReadClassMemberHook.

Definition at line 800 of file biosample_chk.cpp.

References CStopWatch::Elapsed(), CStopWatch::eStart, i, n, PrintResults(), CObjectIStream::ReadClassMember(), and sw.

CRef< CSeq_entry > CBiosampleChkApp::ReadSeqEntry ( void  )
private
int CBiosampleChkApp::Run ( void  )
virtual
void CBiosampleChkApp::Setup ( const CArgs args)
private

Definition at line 1188 of file biosample_chk.cpp.

References CORE_SetLOG(), CORE_SetREG(), CObjectManager::GetInstance(), LOG_cxx2c(), m_ObjMgr, and REG_cxx2c().

Referenced by Run().

void CBiosampleChkApp::UpdateBioSource ( CBioseq_Handle  bh,
const CBioSource src 
)
private

Member Data Documentation

CNcbiOfstream* CBiosampleChkApp::m_AsnOut
private

Definition at line 244 of file biosample_chk.cpp.

Referenced by ProcessOneFile(), ProcessSeqEntry(), ProcessSeqSubmit(), ProcessSet(), and Run().

string CBiosampleChkApp::m_BioProjectAccession
private

Definition at line 273 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), and Run().

string CBiosampleChkApp::m_BioSampleAccession
private

Definition at line 272 of file biosample_chk.cpp.

Referenced by GetBioseqDiffs(), ProcessBioseqForUpdate(), and Run().

biosample_util::TBioSamples CBiosampleChkApp::m_cache
private

Definition at line 286 of file biosample_chk.cpp.

Referenced by GetBioseqDiffs(), and ProcessBioseqForUpdate().

string CBiosampleChkApp::m_Comment
private

Definition at line 275 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), and Run().

bool CBiosampleChkApp::m_CompareStructuredComments
private

Definition at line 267 of file biosample_chk.cpp.

Referenced by GetBioseqDiffs(), ProcessBioseqHandle(), and Run().

bool CBiosampleChkApp::m_Continue
private

Definition at line 238 of file biosample_chk.cpp.

vector<CRef<CSeqdesc> > CBiosampleChkApp::m_Descriptors
private

Definition at line 282 of file biosample_chk.cpp.

Referenced by ProcessBioseqForUpdate(), PushToRecord(), and Run().

biosample_util::TBiosampleFieldDiffList CBiosampleChkApp::m_Diffs
private

Definition at line 280 of file biosample_chk.cpp.

Referenced by GetBioseqDiffs(), ProcessBioseqHandle(), and ProcessOneFile().

bool CBiosampleChkApp::m_FirstSeqOnly
private

Definition at line 269 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), ProcessSeqEntry(), and Run().

CBiosampleHandler* CBiosampleChkApp::m_Handler
private

Definition at line 284 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), ProcessOneFile(), and Run().

string CBiosampleChkApp::m_HUPDate
private

Definition at line 271 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), and Run().

string CBiosampleChkApp::m_IDPrefix
private

Definition at line 270 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), and Run().

auto_ptr<CObjectIStream> CBiosampleChkApp::m_In
private
size_t CBiosampleChkApp::m_Level
private

Definition at line 240 of file biosample_chk.cpp.

int CBiosampleChkApp::m_ListType
private

Definition at line 265 of file biosample_chk.cpp.

Referenced by ProcessFileList(), ProcessOneFile(), and Run().

CNcbiOstream* CBiosampleChkApp::m_LogStream
private
int CBiosampleChkApp::m_Mode
private

Definition at line 263 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), ProcessOneFile(), and Run().

bool CBiosampleChkApp::m_NeedReportHeader
private

Definition at line 243 of file biosample_chk.cpp.

Referenced by PrintDiffs(), and ProcessOneFile().

CRef<CObjectManager> CBiosampleChkApp::m_ObjMgr
private

Definition at line 236 of file biosample_chk.cpp.

Referenced by BuildScope(), and Setup().

string CBiosampleChkApp::m_Owner
private

Definition at line 274 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), and ProcessSeqSubmit().

size_t CBiosampleChkApp::m_Processed
private

Definition at line 277 of file biosample_chk.cpp.

Referenced by GetBioseqDiffs(), and PrintDiffs().

CNcbiOstream* CBiosampleChkApp::m_ReportStream
private

Definition at line 242 of file biosample_chk.cpp.

Referenced by PrintDiffs(), PrintTable(), ProcessBioseqHandle(), ProcessOneFile(), and Run().

int CBiosampleChkApp::m_ReturnCode
private

Definition at line 264 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), and Run().

string CBiosampleChkApp::m_StructuredCommentPrefix
private

Definition at line 266 of file biosample_chk.cpp.

Referenced by GetBioseqDiffs(), ProcessBioseqHandle(), and Run().

CRef<CSeq_table> CBiosampleChkApp::m_Table
private

Definition at line 281 of file biosample_chk.cpp.

Referenced by ProcessBioseqHandle(), ProcessOneFile(), and Run().

size_t CBiosampleChkApp::m_Unprocessed
private

Definition at line 278 of file biosample_chk.cpp.

Referenced by GetBioseqDiffs(), PrintDiffs(), ProcessList(), and Run().

bool CBiosampleChkApp::m_UseDevServer
private

Definition at line 268 of file biosample_chk.cpp.

Referenced by GetBioseqDiffs(), ProcessBioseqForUpdate(), and Run().


The documentation for this class was generated from the following file:
Modified on Tue May 23 17:11:18 2017 by modify_doxy.py rev. 533848