src/algo/sequence/demo/xcompareannotsdemo.cpp File Reference

#include <ncbi_pch.hpp>
#include <vector>
#include <map>
#include <list>
#include <corelib/ncbistd.hpp>
#include <corelib/ncbiapp.hpp>
#include <corelib/ncbienv.hpp>
#include <corelib/ncbiargs.hpp>
#include <corelib/ncbiobj.hpp>
#include <corelib/ncbiexpt.hpp>
#include <corelib/plugin_manager.hpp>
#include <objmgr/object_manager.hpp>
#include <objmgr/scope.hpp>
#include <objects/seqset/gb_release_file.hpp>
#include <objects/seqalign/Seq_align.hpp>
#include <objects/seqalign/Seq_align_set.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqfeat/RNA_ref.hpp>
#include <objects/seqfeat/Feat_id.hpp>
#include <objects/seqfeat/SeqFeatXref.hpp>
#include <objects/seq/MolInfo.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/general/Object_id.hpp>
#include <util/compress/stream.hpp>
#include <util/compress/zlib.hpp>
#include <objtools/data_loaders/genbank/gbloader.hpp>
#include <objtools/data_loaders/lds/lds_dataloader.hpp>
#include <objtools/data_loaders/genbank/readers.hpp>
#include <objtools/alnmgr/alnmix.hpp>
#include <algo/sequence/loc_mapper.hpp>
#include <algo/sequence/compare_feats.hpp>
#include <dbapi/driver/drivers.hpp>
#include <limits>

Include dependency graph for xcompareannotsdemo.cpp:

Go to the source code of this file.

Classes

class  CLocMapper_Default
class  CLocMapper_Default::CGappedRange
class  CGbScopeLoader
class  CXcompareAnnotsApplication

Typedefs

typedef int TLoadScopeMethod

Enumerations

enum  ELoadScopeMethod {
  eLoadScope_Failed, eLoadScope_LDS, eLoadScope_SeqEntry, eLoadScope_SeqAnnot,
  eLoadScope_GBR
}

Functions

 USING_SCOPE (objects)
bool IsManualScope (CScope &scope)
bool IsInScope (CScope &scope, const CSeq_id &id)
string GetProductLabel (const CSeq_feat &feat, CScope &scope)
ESerialDataFormat StringToSerialFormat (string str)
string GetIdStartStopStrandStr (const CSeq_loc &loc, CScope &scope, bool use_long_label)
void AddSpanningSentinelFeat (CScope &scope, const CSeq_id &id, CSeqFeatData::E_Choice type, string title="Sentinel")
void AddSentinelRNASeq (CScope &scope, const CSeq_id &id)
void AddDefaultSentinelFeats (CScope &scope, const CSeq_loc &loc)
auto_ptr< CObjectIStreamGetIStream (string path, ESerialDataFormat serial_format)
TLoadScopeMethod LoadScope (string arg_path, CScope &scope, ESerialDataFormat serial_format)
int main (int argc, const char *argv[])

Variables

 USING_NCBI_SCOPE


Typedef Documentation

typedef int TLoadScopeMethod
 

Definition at line 608 of file xcompareannotsdemo.cpp.


Enumeration Type Documentation

enum ELoadScopeMethod
 

Enumerator:
eLoadScope_Failed 
eLoadScope_LDS 
eLoadScope_SeqEntry 
eLoadScope_SeqAnnot 
eLoadScope_GBR 

Definition at line 607 of file xcompareannotsdemo.cpp.


Function Documentation

void AddDefaultSentinelFeats CScope scope,
const CSeq_loc loc
 

Definition at line 511 of file xcompareannotsdemo.cpp.

References AddSpanningSentinelFeat(), CSeqFeatData_Base::e_Gene, CMolInfo_Base::eBiomol_genomic, CMolInfo_Base::eBiomol_other, CMolInfo_Base::eBiomol_other_genetic, CMolInfo_Base::eBiomol_peptide, CMolInfo_Base::eBiomol_unknown, NStr::eFirst, NStr::eNocase, NStr::Find(), CMolInfo_Base::GetBiomol(), CScope::GetBioseqHandle(), GetId(), GetMolInfo(), GetTitle(), NPOS, SAnnotSelector::SetFeatType(), SAnnotSelector::SetOverlapTotalRange(), SAnnotSelector::SetResolveAll(), and SAnnotSelector::SetResolveDepth().

void AddSentinelRNASeq CScope scope,
const CSeq_id id
 

Definition at line 489 of file xcompareannotsdemo.cpp.

References AddSpanningSentinelFeat(), CScope::AddTopLevelSeqEntry(), CSeqFeatData_Base::e_Gene, CSeqFeatData_Base::e_Rna, CSeq_inst_Base::eMol_rna, CSeq_inst_Base::eRepr_virtual, and CScope::ResetHistory().

void AddSpanningSentinelFeat CScope scope,
const CSeq_id id,
CSeqFeatData::E_Choice  type,
string  title = "Sentinel"
 

Definition at line 445 of file xcompareannotsdemo.cpp.

References CScope::AddSeq_annot(), CSeqFeatData_Base::e_Gene, CSeqFeatData_Base::e_Rna, CRNA_ref_Base::eType_other, eUnknown, and NCBI_THROW.

Referenced by AddDefaultSentinelFeats(), and AddSentinelRNASeq().

string GetIdStartStopStrandStr const CSeq_loc loc,
CScope scope,
bool  use_long_label
 

Definition at line 408 of file xcompareannotsdemo.cpp.

References CSeq_id::AsFastaString(), eGetId_ForceAcc, CSeq_loc::fMerge_SingleRange, GetId(), CSeq_loc::GetLabel(), CSeq_loc_Base::IsWhole(), out(), and Seq_loc_Merge().

auto_ptr<CObjectIStream> GetIStream string  path,
ESerialDataFormat  serial_format
 

Definition at line 586 of file xcompareannotsdemo.cpp.

References NStr::EndsWith(), CZipCompression::fCheckFileHeader, CCompressionStream::fOwnAll, CObjectIStream::Open(), and auto_ptr< X >::reset().

string GetProductLabel const CSeq_feat feat,
CScope scope
 

Definition at line 376 of file xcompareannotsdemo.cpp.

References CSeq_feat_Base::CanGetProduct(), eGetId_ForceAcc, GetId(), CSeq_feat_Base::GetProduct(), and id.

bool IsInScope CScope scope,
const CSeq_id id
 

Definition at line 334 of file xcompareannotsdemo.cpp.

References CSeqFeatData_Base::e_Cdregion, CSeqFeatData_Base::e_Gene, CSeqFeatData_Base::e_Rna, SAnnotSelector::eSortOrder_None, CSeqFeatData::eSubtype_exon, SAnnotSelector::IncludeFeatSubtype(), SAnnotSelector::IncludeFeatType(), IsManualScope(), SAnnotSelector::SetMaxSize(), SAnnotSelector::SetResolveAll(), SAnnotSelector::SetSearchUnresolved(), and SAnnotSelector::SetSortOrder().

bool IsManualScope CScope scope  ) 
 

Definition at line 327 of file xcompareannotsdemo.cpp.

References CScope::eManualTSEs, and CScope::GetAllTSEs().

Referenced by IsInScope().

TLoadScopeMethod LoadScope string  arg_path,
CScope scope,
ESerialDataFormat  serial_format
 

Definition at line 609 of file xcompareannotsdemo.cpp.

References _TRACE, CScope::AddDataLoader(), eLoadScope_LDS, CObjectManager::eNonDefault, CLDS_Database::eReadOnly, CObjectManager::GetInstance(), CLDS_DataLoader::GetLoaderNameFromArgs(), CLDS_Database::Open(), and CLDS_DataLoader::RegisterInObjectManager().

Referenced by CXcompareAnnotsApplication::Run().

int main int  argc,
const char *  argv[]
 

Definition at line 1902 of file xcompareannotsdemo.cpp.

References eDS_Default.

ESerialDataFormat StringToSerialFormat string  str  ) 
 

Definition at line 398 of file xcompareannotsdemo.cpp.

References eSerial_AsnBinary, eSerial_AsnText, eSerial_Json, eSerial_None, and eSerial_Xml.

Referenced by CXcompareAnnotsApplication::Run(), and CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile().

USING_SCOPE objects   ) 
 


Variable Documentation

USING_NCBI_SCOPE
 

Definition at line 79 of file xcompareannotsdemo.cpp.


Generated on Mon Dec 7 07:12:50 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:21:41 2009 by modify_doxy.py rev. 173732