NCBI C++ ToolKit
aln_build_app.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: aln_build_app.cpp 94619 2021-08-24 13:58:52Z grichenk $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Author: Kamen Todorov
27 *
28 * File Description:
29 * Demo of alignment building.
30 *
31 * ===========================================================================
32 */
33 
34 #include <ncbi_pch.hpp>
35 #include <corelib/ncbistd.hpp>
36 #include <corelib/ncbiapp.hpp>
37 #include <corelib/ncbienv.hpp>
38 #include <corelib/ncbiargs.hpp>
40 
42 #include <objmgr/scope.hpp>
44 
45 #include <serial/iterator.hpp>
46 #include <serial/objistr.hpp>
47 #include <serial/objostr.hpp>
48 #include <serial/serial.hpp>
49 
63 
64 #include <common/test_assert.h> /* This header must go last */
65 
66 using namespace ncbi;
67 using namespace objects;
68 
69 
71 {
72 public:
73  virtual void Init (void);
74  virtual int Run (void);
75  CScope& GetScope (void) const;
76  void LoadInputAlns(void);
77  bool InsertAln (const CSeq_align* aln) {
78  m_AlnContainer.insert(*aln);
79  aln->Validate(true);
80  return true;
81  }
82  void ReportTime(const string& msg);
83  void PrintAnchoredAln(const CAnchoredAln& anchored_aln);
84 
85 private:
90 };
91 
92 
94 {
95  unique_ptr<CArgDescriptions> arg_desc(new CArgDescriptions);
96 
97  arg_desc->AddDefaultKey
98  ("in", "input_file_name",
99  "Name of file to read from (standard input by default)",
101 
102  arg_desc->AddDefaultKey
103  ("b", "bin_obj_type",
104  "This forces the input file to be read in binary ASN.1 mode\n"
105  "and specifies the type of the top-level ASN.1 object.\n",
107 
108  arg_desc->AddDefaultKey
109  ("noobjmgr", "bool",
110  // ObjMgr is used to identify sequences and obtain a bioseqhandle.
111  // Also used to calc scores and determine the type of molecule
112  "Skip ObjMgr in identifying sequences, calculating scores, etc.",
114 
115  arg_desc->AddDefaultKey
116  ("single", "bool",
117  "Create a single AnchoredAln in addition to building/merging all alignments.\n"
118  "If input contains more than one aligmnent the first one will be used only.\n",
120 
121 
122  arg_desc->AddDefaultKey
123  ("print", "bool",
124  "Print the sequence strings",
126 
127 
128  arg_desc->AddDefaultKey
129  ("asnout", "asn_out_file_name",
130  "Text ASN output",
132 
133 
134  // Conversion option
135  arg_desc->AddDefaultKey
136  ("dir", "filter_direction",
137  "eBothDirections = 0, ///< No filtering: use both direct and reverse sequences.\n"
138  "eDirect = 1, ///< Use only sequences whose strand is the same as that of the anchor\n"
139  "eReverse = 2 ///< Use only sequences whose strand is opposite to that of the anchor\n",
141  arg_desc->SetConstraint("dir", new CArgAllow_Integers(0,2));
142 
143 
144  arg_desc->AddOptionalKey
145  ("anchor", "anchor", "Anchor row",
147 
148 
149  // Merge option
150  arg_desc->AddDefaultKey
151  ("merge_algo", "merge_algo",
152  "eMergeAllSeqs = 0, ///< Merge all sequences [greedy algo]\n"
153  "eQuerySeqMergeOnly = 1, ///< Only put the query seq on same\n"
154  " /// row [input order is not\n"
155  " /// significant]\n"
156  "ePreserveRows = 2, ///< Preserve all rows as they were in\n"
157  " /// the input (e.g. self-align a\n"
158  " /// sequence) (coresponds to separate\n"
159  " /// alignments) [greedy algo]\n"
160  "eDefaultMergeAlgo = eMergeAllSeqs",
162  arg_desc->SetConstraint("merge_algo", new CArgAllow_Integers(0,2));
163 
164 
165  // Merge option
166  arg_desc->AddDefaultKey
167  ("merge_flags", "merge_flags",
168  "fTruncateOverlaps = 1 << 0, ///< Otherwise put on separate\n"
169  " /// rows\n"
170  "fAllowMixedStrand = 1 << 1, ///< Allow mixed strand on the\n"
171  " /// same row\n"
172  "fAllowTranslocation = 1 << 2, ///< Allow translocations on the\n"
173  " /// same row\n"
174  "fSkipSortByScore = 1 << 3, ///< In greedy algos, skip\n"
175  " /// sorting input alignments by\n"
176  " /// score thus allowing for\n"
177  " /// user-defined sort order.\n"
178  "fUseAnchorAsAlnSeq = 1 << 4 ///< (Not recommended!) Use the\n"
179  " /// anchor sequence as the\n"
180  " /// alignment sequence.\n"
181  " /// Otherwise (the default) a\n"
182  " /// pseudo sequence is created\n"
183  " /// whose coordinates are the\n"
184  " /// alignment coordinates.\n"
185  " /// WARNING: This will make all\n"
186  " /// CSparseAln::*AlnPos*\n"
187  " /// methods incosistent with\n"
188  " /// CAlnVec::*AlnPos*.\n",
190  arg_desc->SetConstraint("merge_flags", new CArgAllow_Integers(0,31));
191 
192 
193  // Program description
194  string prog_description = "Alignment build application.\n";
195  arg_desc->SetUsageContext(GetArguments().GetProgramBasename(),
196  prog_description, false);
197 
198  SetupArgDescriptions(arg_desc.release());
199 
200  // Start the timer
201  m_StopWatch.Start();
202 }
203 
204 
206 {
207  const CArgs& args = GetArgs();
208 
209  /// get the asn type of the top-level object
210  string asn_type = args["b"].AsString();
211  bool binary = !asn_type.empty();
212  unique_ptr<CObjectIStream> in
214  args["in"].AsInputFile(binary ? CArgValue::fBinary : CArgValue::fText)));
215 
216  CAlnAsnReader reader(&GetScope());
217  reader.Read(in.get(),
218  bind(mem_fn(&CAlnBuildApp::InsertAln), this, placeholders::_1),
219  asn_type);
220 }
221 
222 
224 {
225  if (!m_Scope) {
226  m_ObjMgr = CObjectManager::GetInstance();
228 
229  m_Scope = new CScope(*m_ObjMgr);
230  m_Scope->AddDefaults();
231  }
232  return *m_Scope;
233 }
234 
235 
236 void CAlnBuildApp::ReportTime(const string& msg)
237 {
238  cerr << "time:\t"
239  << m_StopWatch.AsSmartString(CTimeSpan::eSSP_Millisecond)
240  << "\t" << msg << endl;
241  m_StopWatch.Restart();
242 }
243 
244 
246 {
247  CSparseAln sparse_aln(anchored_aln, GetScope());
248  ReportTime("CSparseAln");
249  if (GetArgs()["print"].AsBoolean()) {
250  for (CSparseAln::TDim row = 0; row < sparse_aln.GetDim(); ++row) {
251  cout << "Row " << row << ": "
252  << sparse_aln.GetSeqId(row).AsFastaString() << endl;
253  try {
254  string sequence;
255  sparse_aln.GetAlnSeqString
256  (row,
257  sequence,
258  sparse_aln.GetSeqAlnRange(row));
259  cout << sequence << endl;
260  } catch (...) {
261  // if sequence is not in scope,
262  // the above is impossible
263  }
264 
265  unique_ptr<IAlnSegmentIterator> sparse_ci
266  (sparse_aln.CreateSegmentIterator(row,
267  sparse_aln.GetAlnRange(),
268  IAlnSegmentIterator::eSkipInserts/*eAllSegments*/));
269 
270  while (*sparse_ci) {
271  cout << **sparse_ci << endl;
272 #if 0
273  {{
274  /// Demonstrate/verify usage of GetSeqPosFromAlnPos:
275  const IAlnSegment& aln_seg = **sparse_ci;
276  cout << "GetSeqPosFromAlnPos(" << row << ", " << aln_seg.GetAlnRange().GetFrom() << ", IAlnExplorer::eLeft): "
277  << sparse_aln.GetSeqPosFromAlnPos(row,
278  aln_seg.GetAlnRange().GetFrom(),
280  << endl;
281  cout << "Expected: " << (aln_seg.GetType() == IAlnSegment::fGap ?
282  aln_seg.GetRange().GetFrom() - 1 :
283  aln_seg.GetRange().GetFrom())
284  << endl;
285  cout << "GetSeqPosFromAlnPos(" << row << ", " << aln_seg.GetAlnRange().GetTo() << ", IAlnExplorer::eRight): "
286  << sparse_aln.GetSeqPosFromAlnPos(row,
287  aln_seg.GetAlnRange().GetTo(),
289  << endl;
290  cout << "Expected: " << (aln_seg.GetType() == IAlnSegment::fGap ?
291  aln_seg.GetRange().GetTo() + 1 :
292  aln_seg.GetRange().GetTo())
293  << endl;
294  }}
295 #endif
296  ++(*sparse_ci);
297  }
298  }
299  ReportTime("GetAlnSeqString");
300  cout << endl;
301  }
302 }
303 
304 
306 {
307  // Setup application registry, error log, and MT-lock for CONNECT library
308  CONNECT_Init(&GetConfig());
309 
310  LoadInputAlns();
311  ReportTime("LoadInputAlns");
312 
313 
314  /// Create a vector of seq-ids per seq-align
315  TIdExtract id_extract;
316  TAlnIdMap aln_id_map(id_extract, m_AlnContainer.size());
317  ITERATE(CAlnContainer, aln_it, m_AlnContainer) {
318  try {
319  aln_id_map.push_back(**aln_it);
320  } catch (CAlnException e) {
321  cerr << "Skipping this alignment: " << e.what() << endl;;
322  }
323  }
324  ReportTime("TAlnIdMap");
325 
326 
327  /// Crete align statistics object
328  TAlnStats aln_stats(aln_id_map);
329  ReportTime("TAlnStats");
330  {
331  cout << aln_stats;
332  m_StopWatch.Restart();
333  }
334 
335 
336  /// Show which seq-ids are aligned to the first one
337  {
338  const TAlnStats::TIdVec& aligned_ids = aln_stats.GetAlignedIds(aln_stats.GetIdVec()[0]);
339  ReportTime("GetAlignedIds");
340  cerr << aln_stats.GetIdVec()[0]->AsString()
341  << " is aligned to:" << endl;
342  ITERATE(TAlnStats::TIdVec, id_it, aligned_ids) {
343  cerr << (*id_it)->AsString() << endl;
344  }
345  cerr << endl;
346  m_StopWatch.Restart();
347  }
348 
349 
350  /// Create user options
351  CAlnUserOptions aln_user_options;
352 
353 
354  /// Optionally, choose to filter a direction
355  aln_user_options.m_Direction =
356  (CAlnUserOptions::EDirection) GetArgs()["dir"].AsInteger();
357 
358 
359  /// Can the alignments be anchored?
360  if ( !aln_stats.CanBeAnchored() ) {
361  cout << "Input alignments cannot be anchored because they don't share at least one common sequence." << endl;
362  return 0;
363  }
364 
365  if (GetArgs()["anchor"]) {
366  size_t anchor_row = GetArgs()["anchor"].AsInteger();
367  const TAlnStats::TIdxVec& idx_vec = aln_stats.GetAnchorIdxVec();
368  TAlnStats::TIdxVec::const_iterator find_it = find(idx_vec.begin(), idx_vec.end(), anchor_row);
369  if (find_it == idx_vec.end()) {
370  cerr << "Invalid anchor index! Please choose among the following: ";
371  copy(idx_vec.begin(), idx_vec.end(), ostream_iterator<int>(cerr, " "));
372  cerr << endl;
373  return 0;
374  }
375  aln_user_options.SetAnchorId(aln_stats.GetIdVec()[anchor_row]);
376  cout << "Manually set anchor to: " << aln_user_options.GetAnchorId();
377  } else {
378  cout << "Anchor will be automatically set.";
379  }
380  cout << endl << endl;
381 
382 
383  /// Construct a single anchored alignment
384  if (GetArgs()["single"].AsBoolean()) {
385  CRef<CAnchoredAln> single_anchored_aln =
386  CreateAnchoredAlnFromAln(aln_stats,
387  0,
388  aln_user_options,
389  GetArgs()["anchor"] ? GetArgs()["anchor"].AsInteger() : -1);
390  cout << "Single anchored alignment" << endl;
391  cout << *single_anchored_aln;
392  PrintAnchoredAln(*single_anchored_aln);
393  }
394 
395 
396  /// Construct a vector of anchored alignments
397  TAnchoredAlnVec anchored_aln_vec;
398  CreateAnchoredAlnVec(aln_stats, anchored_aln_vec, aln_user_options);
399  ReportTime("TAnchoredAlnVec");
400  {
401  ITERATE(TAnchoredAlnVec, aln_vec_it, anchored_aln_vec) {
402  cout << **aln_vec_it;
403  }
404  m_StopWatch.Restart();
405  }
406 
407  /// Choose merging algorithm
408  aln_user_options.m_MergeAlgo =
409  (CAlnUserOptions::EMergeAlgo) GetArgs()["merge_algo"].AsInteger();
410 
411 
412  /// Choose merging flags
413  aln_user_options.m_MergeFlags =
414  (CAlnUserOptions::EMergeFlags) GetArgs()["merge_flags"].AsInteger();
415 
416 
417  /// Build a single anchored aln
418  CAnchoredAln out_anchored_aln;
419 
420  /// Optionally, create an id for the alignment pseudo sequence
421  /// (otherwise one would be created automatically)
422  CRef<CSeq_id> seq_id (new CSeq_id("lcl|PSEUDO ALNSEQ"));
423  CRef<CAlnSeqId> aln_seq_id(new CAlnSeqId(*seq_id));
424  TAlnSeqIdIRef pseudo_seqid(aln_seq_id);
425 
426  BuildAln(anchored_aln_vec,
427  out_anchored_aln,
428  aln_user_options,
429  pseudo_seqid);
430 
431  ReportTime("BuildAln");
432  {
433  cout << out_anchored_aln;
434  out_anchored_aln.SplitStrands();
435  cout << out_anchored_aln;
436  m_StopWatch.Restart();
437  }
438 
439 
440  /// Print the sequences:
441  PrintAnchoredAln(out_anchored_aln);
442 
443 
444  /// Create a Seq-align
445  CRef<CSeq_align> sa =
446  CreateSeqAlignFromAnchoredAln(out_anchored_aln,
448  ReportTime("CreateSeqAlignFromAnchoredAln");
449  unique_ptr<CObjectOStream> asn_out
451  GetArgs()["asnout"].AsString()));
452  *asn_out << *sa;
453 
454  /// Create individual Dense-segs (one per CPairwiseAln)
456  pairwise_aln_i,
457  out_anchored_aln.GetPairwiseAlns()) {
458 
459  CRef<CDense_seg> ds =
460  CreateDensegFromPairwiseAln(**pairwise_aln_i);
461  *asn_out << *ds;
462  }
463 
464  /// Create individual Dense-segs (one per CPairwiseAln) via CreateSeqAlignFromEachPairwiseAln
465  vector<CRef<CSeq_align> > out_seqaligns;
467  out_anchored_aln.GetAnchorRow(),
468  out_seqaligns,
470  ITERATE(vector<CRef<CSeq_align> >, sa_it, out_seqaligns) {
471  *asn_out << **sa_it;
472  }
473 
474  return 0;
475 }
476 
477 
478 int main(int argc, const char* argv[])
479 {
480  return CAlnBuildApp().AppMain(argc, argv, 0, eDS_Default, 0);
481 }
static CRef< CScope > m_Scope
int main(int argc, const char *argv[])
void BuildAln(TAnchoredAlnVec &in_alns, CAnchoredAln &out_aln, const CAlnUserOptions &options, TAlnSeqIdIRef pseudo_seqid=TAlnSeqIdIRef())
Build anchored alignment from a set of alignmnets.
void CreateAnchoredAlnVec(_TAlnStats &aln_stats, TAnchoredAlnVec &out_vec, const CAlnUserOptions &options)
Create anchored alignment from each seq-align in the stats.
CRef< CAnchoredAln > CreateAnchoredAlnFromAln(const _TAlnStats &aln_stats, size_t aln_idx, const CAlnUserOptions &options, objects::CSeq_align::TDim explicit_anchor_row=-1)
Create an anchored alignment from Seq-align using hints.
void CreateSeqAlignFromEachPairwiseAln(const CAnchoredAln::TPairwiseAlnVector pairwises, CAnchoredAln::TDim anchor, vector< CRef< CSeq_align > > &out_seqaligns, CSeq_align::TSegs::E_Choice choice, CScope *scope=NULL)
Create seq-align from each of the pairwise alignments vs the selected anchor row.
CRef< CSeq_align > CreateSeqAlignFromAnchoredAln(const CAnchoredAln &anchored_aln, CSeq_align::TSegs::E_Choice choice, CScope *scope=NULL)
Convert CAnchoredAln to seq-align of the selected type.
CRef< CDense_seg > CreateDensegFromPairwiseAln(const CPairwiseAln &pairwise_aln, CScope *scope=NULL)
Helper class for reading seq-align objects from a CObjectIStream.
void Read(CObjectIStream *obj_in_stream, TCallback callback, const string &top_level_asn_object=kEmptyStr)
Read all seq-align objects from the stream.
CRef< CObjectManager > m_ObjMgr
void PrintAnchoredAln(const CAnchoredAln &anchored_aln)
void LoadInputAlns(void)
CScope & GetScope(void) const
bool InsertAln(const CSeq_align *aln)
CRef< CScope > m_Scope
virtual int Run(void)
Run the application.
virtual void Init(void)
Initialize the application.
void ReportTime(const string &msg)
CAlnContainer m_AlnContainer
CStopWatch m_StopWatch
CSeq_align container.
Container mapping seq-aligns to vectors of participating seq-ids.
Definition: aln_tests.hpp:56
void push_back(const CSeq_align &aln)
Adding an alignment.
Definition: aln_tests.hpp:87
Default IAlnSeqId implementation based on CSeq_id_Handle.
Definition: aln_seqid.hpp:116
IAlnSeqId extracting functor.
Helper class which collects seq-align statistics: seq-ids participating in alignments and rows,...
Definition: aln_stats.hpp:57
_TAlnIdVec::TIdVec TIdVec
Vector of ids used in all alignments.
Definition: aln_stats.hpp:70
const TIdxVec & GetAnchorIdxVec(void) const
Get vector of id indexes (from IdVec) for potential anchors.
Definition: aln_stats.hpp:312
const TIdVec & GetIdVec(void) const
Get vector of all ids from all alignments.
Definition: aln_stats.hpp:241
bool CanBeAnchored(void) const
Check if there are any ids which can be used as anchors for the whole set of alignments.
Definition: aln_stats.hpp:284
vector< size_t > TIdxVec
Vector of indexes in TIdVec.
Definition: aln_stats.hpp:73
const TIdVec & GetAlignedIds(const TAlnSeqIdIRef &id) const
Get a set of ids that are aligned to a particular id.
Definition: aln_stats.hpp:178
Options for different alignment manager operations.
void SetAnchorId(const TAlnSeqIdIRef &anchor_id)
Set anchor id.
EMergeAlgo m_MergeAlgo
TMergeFlags m_MergeFlags
const TAlnSeqIdIRef & GetAnchorId(void) const
Get anchor id.
EDirection m_Direction
EMergeAlgo
Alignment merging algorithm.
EDirection
Row direction flags.
EMergeFlags
Additional merge flags.
Query-anchored alignment can be 2 or multi-dimentional.
const TPairwiseAlnVector & GetPairwiseAlns(void) const
The vector of pairwise alns.
vector< CRef< CPairwiseAln > > TPairwiseAlnVector
TDim GetAnchorRow(void) const
Which is the anchor row?
bool SplitStrands(void)
Split rows with mixed dir into separate rows returns true if the operation was performed.
CArgAllow_Integers –.
Definition: ncbiargs.hpp:1751
CArgDescriptions –.
Definition: ncbiargs.hpp:541
CArgs –.
Definition: ncbiargs.hpp:379
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
Definition: gbloader.cpp:366
CScope –.
Definition: scope.hpp:92
void Validate(bool full_test=false) const
Definition: Seq_align.cpp:649
Sparse alignment.
Definition: sparse_aln.hpp:51
TRng GetAlnRange(void) const
Get whole alignment range.
Definition: sparse_aln.cpp:238
CAnchoredAln::TDim TDim
Synonym of TNumrow.
Definition: sparse_aln.hpp:56
virtual IAlnSegmentIterator * CreateSegmentIterator(TNumrow row, const TSignedRange &range, IAlnSegmentIterator::EFlags flags) const
Create segment iterator.
Definition: sparse_aln.cpp:710
string & GetAlnSeqString(TNumrow row, string &buffer, const TSignedRange &rq_aln_rng, bool force_translation=false) const
Fetch alignment sequence data.
Definition: sparse_aln.cpp:552
TSignedSeqPos GetSeqPosFromAlnPos(TNumrow for_row, TSeqPos aln_pos, ESearchDirection dir=eNone, bool try_reverse_dir=true) const
Definition: sparse_aln.cpp:385
TDim GetDim(void) const
Alignment dimension (number of sequence rows in the alignment)
Definition: sparse_aln.cpp:69
TSignedRange GetSeqAlnRange(TNumrow row) const
Get sequence range in alignment coords (strand ignored).
Definition: sparse_aln.cpp:285
const objects::CSeq_id & GetSeqId(TNumrow row) const
Get seq-id for the row.
Definition: sparse_aln.cpp:264
CStopWatch –.
Definition: ncbitime.hpp:1937
@ eRight
Towards higher aln coord (always to the right)
@ eLeft
Towards lower aln coord (always to the left)
@ eSkipInserts
Iterate segments where at least some rows are aligned (including gap segments)
Alignment segment interface.
virtual const TSignedRange & GetRange(void) const =0
Get the selected row range.
@ fGap
Both anchor row and the selected row are not included in the segment (some other row is present and t...
virtual TSegTypeFlags GetType(void) const =0
Get current segment type.
virtual const TSignedRange & GetAlnRange(void) const =0
Get alignment range for the segment.
Include a standard set of the NCBI C++ Toolkit most basic headers.
static void Init(void)
Definition: cursor6.c:76
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
Definition: ncbiapp.cpp:819
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define CNcbiApplication
@ eInputFile
Name of file (must exist and be readable)
Definition: ncbiargs.hpp:595
@ eBoolean
{'true', 't', 'false', 'f'}, case-insensitive
Definition: ncbiargs.hpp:590
@ eString
An arbitrary string.
Definition: ncbiargs.hpp:589
@ eOutputFile
Name of file (must be writable)
Definition: ncbiargs.hpp:596
@ eInteger
Convertible into an integer number (int or Int8)
Definition: ncbiargs.hpp:592
@ fText
Open file in text mode.
Definition: ncbiargs.hpp:264
@ fBinary
Open file in binary mode.
Definition: ncbiargs.hpp:263
@ eDS_Default
Try standard log file (app.name + ".log") in /log/, use stderr on failure.
Definition: ncbidiag.hpp:1790
@ eSerial_AsnText
ASN.1 text.
Definition: serialdef.hpp:73
@ eSerial_AsnBinary
ASN.1 binary.
Definition: serialdef.hpp:74
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
Definition: objostr.cpp:126
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
Definition: objistr.cpp:195
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
Definition: scope.cpp:504
void Run(void)
Enter the main loop.
@ eSSP_Millisecond
Definition: ncbitime.hpp:1511
void CONNECT_Init(const IRWRegistry *reg=0, CRWLock *lock=0, TConnectInitFlags flag=eConnectInit_OwnNothing, FSSLSetup ssl=0)
Init [X]CONNECT library with the specified "reg" and "lock" (ownership for either or both can be deta...
TTo GetTo(void) const
Get the To member data.
Definition: Range_.hpp:269
TFrom GetFrom(void) const
Get the From member data.
Definition: Range_.hpp:222
Magic spell ;-) needed for some weird compilers... very empiric.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
#define GetArgs
Avoid preprocessor name clash with the NCBI C Toolkit.
Definition: ncbiapp_api.hpp:54
Defines command line argument related classes.
Defines unified interface to application:
std::istream & in(std::istream &in_, double &x_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
Definition: njn_matrix.hpp:613
The Object manager core.
vector< CRef< CAnchoredAln > > TAnchoredAlnVec
Collection of anchored alignments.
#define row(bind, expected)
Definition: string_bind.c:73
CScope & GetScope()
Modified on Sat May 25 14:19:32 2024 by modify_doxy.py rev. 669887