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

Go to the SVN repository for this file.

1 /* $Id: read_blast_result.cpp 92162 2020-12-22 17:39:42Z 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: Azat Badretdin
27 *
28 * File Description:
29 * Reads ASN file and database search results for the sequences of that file
30 * detects and fixes frameshifts, detects partial sequences, strand errors
31 * missing RNA annotations, overlaps
32 *
33 * ===========================================================================
34 */
35 #include <ncbi_pch.hpp>
36 #include "read_blast_result.hpp"
37 
38 
40 {
41  // Create command-line argument descriptions class
42  unique_ptr<CArgDescriptions> arg_desc(new CArgDescriptions);
43 
44  // Specify USAGE context
45  arg_desc->SetUsageContext
46  (GetArguments().GetProgramBasename(),
47  "Microbial Genome Submission Check Tool (subcheck) is for the validation of "
48  "genome records prior to submission to GenBank. It utilizes a series of "
49  "self-consistency checks as well as comparison of submitted annotations to "
50  "computed annotations. Some of specified computed annotations could be "
51  "pre-computed using BLAST and its modifications and tRNAscanSE. Currently "
52  "there is no specific tool for predicting rRNA annotations. Please use the "
53  "format specified in documentation"
54  );
55 
56  // Describe the expected command-line arguments
57  arg_desc->AddKey
58  ("in", "input_asn",
59  "input file in the ASN.1 format, must be either Seq-entry or Seq-submit",
61 
62  arg_desc->AddOptionalKey
63  ("out", "output_asn",
64  "output file in the ASN.1 format, of the same type (Seq-entry or Seq-submit)",
66 
67  arg_desc->AddFlag
68  ("kfs",
69  "keep frameshifted sequences and make misc_features at the same time. Needs editing after run!");
70 
71  arg_desc->AddOptionalKey
72  ("inblast", "blast_res_proteins",
73  "input file which contains the standard BLAST output results (ran with -IT option) "
74  "for all query proteins "
75  "sequences specified in the input genome against a protein database (recommended: bact_prot "
76  "database of Refseq proteins supplied with the distributed standalone version of this tool)",
78 
79  arg_desc->AddOptionalKey
80  ("inblastcdd", "blast_res_cdd",
81  "input file which contains the standard BLAST output results for all query proteins "
82  "sequences specified in input_asn against the CDD database",
84 
85  arg_desc->AddOptionalKey
86  ("intrna", "input_trna",
87  "input tRNAscan predictions in default output format, default value is <-in parameter>.nfsa.tRNA",
89 
90  arg_desc->AddOptionalKey
91  ("inrrna", "input_rrna",
92  "input ribosomal RNA predictions (5S, 16S, 23S), see the manual for format, default value is <-in parameter>.nfsa.rRNA",
94 
95  arg_desc->AddOptionalKey(
96  "parentacc", "parent_genome_accession",
97  "Refseq accession of the genome which protein annotations need to be excluded from BLAST output results",
99 
100  arg_desc->AddOptionalKey(
101  "inparents", "InputParentsFile",
102  "contains a list of all protein accessions/GIs for each Refseq accession/GI",
104 
105  arg_desc->AddOptionalKey(
106  "intagmap", "InputTagMap",
107  "use the file to map tags in BLAST",
109 
110  arg_desc->AddDefaultKey("infmt", "InputFormat", "format of input file",
112  arg_desc->SetConstraint
113  ("infmt", &(*new CArgAllow_Strings, "asn", "asnb", "xml"));
114 
115  arg_desc->AddOptionalKey
116  ("outTbl", "OutputTblFile",
117  "name of file to write additional TBL output (/dev/null by default)",
119 
120  arg_desc->AddOptionalKey
121  ("outPartial", "OutputFilePartial",
122  "name of the output file for reporting \"partial hit\" problems",
124 
125  arg_desc->AddOptionalKey
126  ("outOverlap", "OutputFileOverlap",
127  "name of the output file for reporting overlap problems",
129 
130  arg_desc->AddOptionalKey
131  ("outRnaOverlap", "OutputFileRnaOverlap",
132  "name of the output file for reporting RNA overlap problems",
134 
135  arg_desc->AddOptionalKey
136  ("outCompleteOverlap", "OutputFileCompleteOverlap",
137  "name of the output file for reporting complete overlap problems",
139 
140  arg_desc->AddOptionalKey
141  ("outOther", "OutputFileOther",
142  "name of the output file for reporting other problems",
144 
145  arg_desc->AddDefaultKey("outfmt", "OutputFormat", "format of output file",
147  arg_desc->SetConstraint
148  ("outfmt", &(*new CArgAllow_Strings, "asn", "asnb", "xml"));
149 
150 // put output control keys here, except file names
151  arg_desc->AddDefaultKey(
152  "verbosity", "Verbosity",
153  "Verbosity level threshold",
155 
156 // put numerical algorithm related tuning parameters here
157  arg_desc->AddDefaultKey(
158  "small_tails_threshold", "small_tails_threshold",
159  "the sum of the left and right tails outside the aligned region for "
160  "the given sum less than this threshold will make it \"small tails\"",
162 
163  arg_desc->AddDefaultKey(
164  "n_best_hit", "n_best_hit",
165  "number of BLAST best hits imported for each sequence",
167 
168  arg_desc->AddDefaultKey(
169  "m_eThreshold", "m_eThreshold",
170  "only CDD hits below this threshold will be used for partial hit definition",
171  CArgDescriptions::eDouble, "1e-6");
172 
173  arg_desc->AddDefaultKey(
174  "m_entireThreshold", "m_entireThreshold",
175  "at least this part of the query needs to be in the alignment to be considered for partial hit candidate",
177 
178  arg_desc->AddDefaultKey(
179  "m_partThreshold", "m_partThreshold",
180  "if aligned region with CDD is less than this threshold, this hit will be considered for partial hit candidate",
182 
183  arg_desc->AddDefaultKey(
184  "m_rna_overlapThreshold", "m_rna_overlapThreshold",
185  "if protein and RNA annotations overlapping more than that threshold, it will be reported",
187 
188  arg_desc->AddDefaultKey(
189  "m_cds_overlapThreshold", "m_cds_overlapThreshold",
190  "if CDS annotations overlapping more than that threshold, it will be reported",
192 
193  arg_desc->AddDefaultKey(
194  "m_trnascan_scoreThreshold", "m_trnascan_scoreThreshold",
195  "tRNA-scan predictions below that threshold are ignored",
197 
198  arg_desc->AddDefaultKey(
199  "m_shortProteinThreshold", "m_shortProteinThreshold",
200  "proteins shorter than that will be reported and removed",
202 
203 
204  // Setup arg.descriptions for this application
205  SetupArgDescriptions(arg_desc.release());
206 
207 // verbosity
209 
210 // core data type
212 
213 //
214  m_usemap=false;
215  m_tagmap.clear();
216  while(!m_saved_verbosity.empty()) m_saved_verbosity.pop();
217 }
218 
219 
221 {
222 // Get arguments
223  const CArgs& args = GetArgs();
224 
225 
226 // verbosity
227  m_verbosity_threshold=args["verbosity"].AsInteger();
228 
229 // algorithm control
230  m_small_tails_threshold = args["small_tails_threshold"].AsDouble();
231  m_n_best_hit = args["n_best_hit"].AsInteger();
232  m_eThreshold = args["m_eThreshold"].AsDouble();
233  m_entireThreshold = args["m_entireThreshold"].AsDouble();
234  m_partThreshold = args["m_partThreshold"].AsDouble();
235  m_rna_overlapThreshold = args["m_rna_overlapThreshold"].AsInteger();
236  m_cds_overlapThreshold = args["m_cds_overlapThreshold"].AsInteger();
237  m_trnascan_scoreThreshold = args["m_trnascan_scoreThreshold"].AsDouble();
238  m_shortProteinThreshold = args["m_shortProteinThreshold"].AsInteger();
239 
240 // output control
241  // m_align_dir = args["aligndir"].AsString();
242  string base = args["in"].AsString();
243 
244  if(PrintDetails())
245  {
246  string scratch;
247  NcbiCerr << args.Print(scratch) << NcbiEndl;
248  }
249 
250  // Read original annotation
251  {{
252  m_coreDataType = getCoreDataType(args["in"].AsInputFile());
253  unique_ptr<CObjectIStream> in
254  (CObjectIStream::Open(s_GetFormat(args["infmt"].AsString()),
255  args["in"].AsInputFile()));
256  if(IsSubmit())
257  {
258  *in >> m_Submit;
259  (*m_Submit.SetData().SetEntrys().begin())->Parentize();
260  }
261  else if(IsEntry() )
262  {
263  *in >> m_Entry;
264  m_Entry.Parentize();
265  }
266  else if(IsTbl() )
267  {
268  NcbiCerr << "WARNING: tbl file will be read but nothing more will be done." << NcbiEndl;
269  if(!m_tbl.Read(args["in"].AsInputFile()))
270  {
271  NcbiCerr << "FATAL: tbl file does not have any records or have been corrupted" << NcbiEndl;
272  throw;
273  };
274  NcbiCerr << "INFO: tbl file is ok" << NcbiEndl;
275  throw;
276  }
277  else
278  {
279  NcbiCerr << "FATAL: only tbl, Seq-submit or Seq-entry formats are accepted at this time. Seq-set has to be present as well" << NcbiEndl;
280  throw;
281  }
282  GetGenomeLen();
284 
285  }}
286 
287 
289 
290  if(PrintDetails() ) NcbiCerr << NcbiEndl << "Execution started" << NcbiEndl << NcbiEndl;
291 
292 
293  PushVerbosity();
294  // m_verbosity_threshold=300;
296  // m_verbosity_threshold=-1;
297  PopVerbosity();
298  // Write the entry
299  if( args["out"].HasValue() && false)
300  { {
301  unique_ptr<CObjectOStream> out
302  (CObjectOStream::Open(s_GetFormat(args["outfmt"].AsString()),
303  args["out"].AsOutputFile()));
304  if(IsSubmit())
305  *out << m_Submit;
306  else
307  *out << m_Entry;
308  }}
309 
310 
311  if(args["intagmap"].HasValue())
312  {
313  PushVerbosity();
314  m_usemap = ReadTagMap(args["intagmap"].AsString().c_str())!=0;
315  PopVerbosity();
316  }
317 
318  // go through the blast file and annotate the sequences as we go
319  if(args["parentacc"].HasValue())
320  {
321  if(!ReadPreviousAcc(args["parentacc"].AsString(), m_previous_genome))
322  {
323  m_previous_genome.push_back(atol(args["parentacc"].AsString().c_str()));
324  }
325  if(args["inparents"].HasValue())
326  {
327  PushVerbosity();
328  ReadParents(args["inparents"].AsInputFile(), m_previous_genome);
329  PopVerbosity();
330  }
331  }
332  if(args["inblast"].HasValue())
333  {
334  map<string, blastStr> blastMap;
335  PushVerbosity();
336  if(! ReadBlast(args["inblast"].AsString().c_str(), blastMap))
337  {
338  NcbiCerr << "FATAL: ReadBlast returned bad" << NcbiEndl;
339  throw;
340  }
341  StoreBlast(blastMap);
342  PopVerbosity();
343  }
344 
345  if(args["inblastcdd"].HasValue())
346  {
347  map<string, blastStr> cddMap;
348  PushVerbosity();
349  ReadBlast(args["inblastcdd"].AsString().c_str(), cddMap);
350  ProcessCDD(cddMap);
351  PopVerbosity();
352  }
353 
354  // Read TRNA
355  string tRNA_file;
356  if(args["intrna"].HasValue())
357  {
358  tRNA_file = args["intrna"].AsString();
359  }
360  else
361  {
362  tRNA_file = base;
363  tRNA_file += ".nfsa.tRNA";
364  }
365  int ntrna = ReadTRNA2(tRNA_file); // to m_extRNAtable2
366  NcbiCerr << "Read TRNAs: " << ntrna << NcbiEndl;
367 
368  // end Read TRNA
369 
370  // Read RRNA
371  string rRNA_file ;
372  if(args["inrrna"].HasValue())
373  {
374  rRNA_file =args["inrrna"].AsString();
375  }
376  else
377  {
378  rRNA_file = base;
379  rRNA_file += ".nfsa.rRNA";
380  }
381  int nrrna = ReadRRNA2(rRNA_file); // to m_extRNAtable2
382  NcbiCerr << "Read RRNAs: " << nrrna << NcbiEndl;
383 
384  // end Read TRNA
386 
387  PushVerbosity();
388  SortSeqs(); // also marks CD regions
389  PopVerbosity();
390 
391  PushVerbosity();
392  AnalyzeSeqs(); // also marks CD regions
393  PopVerbosity();
394 
395  PushVerbosity();
396  AnalyzeSeqsViaBioseqs(true, false); // also marks CD regions
397  PopVerbosity();
398 
399  NcbiCerr << "Checking missing RNA..." << NcbiEndl;
400  PushVerbosity();
401  simple_overlaps(); //
402  PopVerbosity();
403 
404  NcbiCerr << "Checking short proteins..." << NcbiEndl;
405  PushVerbosity();
406  short_proteins(); //
407  PopVerbosity();
408 
409 
410 
411  NcbiCerr << "Dumping FASTA file for subsequent HTML blast output..." << NcbiEndl;
412  PushVerbosity();
414  PopVerbosity();
415 
416  bool report_and_forget = false;
417  PushVerbosity();
418  {
419  string sout = args["outPartial"].HasValue() ?
420  args["outPartial"].AsString() :
421  base + ".partial.problems.log";
422  CNcbiOfstream out( sout.c_str() );
423  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
424  << ePartial
425  << "(ePartial)"
426  << NcbiEndl;
427  reportProblems(report_and_forget, m_diag, out, ePartial);
428  }
429  PopVerbosity();
430 
431  PushVerbosity();
432  {
433  string sout = args["outOverlap"].HasValue() ?
434  args["outOverlap"].AsString() :
435  base + ".overlap.problems.log";
436  CNcbiOfstream out( sout.c_str() );
437  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
438  << eOverlap
439  << "(eOverlap)"
440  << NcbiEndl;
441  reportProblems(report_and_forget, m_diag, out, eOverlap);
442  }
443  PopVerbosity();
444 
445  PushVerbosity();
446  {
447  string sout = args["outRnaOverlap"].HasValue() ?
448  args["outRnaOverlap"].AsString() :
449  base + ".rna.overlap.problems.log";
450  CNcbiOfstream out( sout.c_str() );
451  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
452  << eRnaOverlap
453  << "(eRnaOverlap)"
454  << NcbiEndl;
455  reportProblems(report_and_forget, m_diag, out, eRnaOverlap);
456  }
457  PopVerbosity();
458 
459 
460  PushVerbosity();
461  {
462  string sout = args["outCompleteOverlap"].HasValue() ?
463  args["outCompleteOverlap"].AsString() :
464  base + ".complete.overlap.problems.log";
465  CNcbiOfstream out( sout.c_str() );
466  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
468  << "(eCompleteOverlap)"
469  << NcbiEndl;
470  reportProblems(report_and_forget, m_diag, out, eCompleteOverlap);
471  }
472  PopVerbosity();
473 
474  PushVerbosity();
475  {
476  string sout = base + ".overlap.resolved.problems.log";
477  CNcbiOfstream out( sout.c_str() );
478  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
479  << eRemoveOverlap
480  << "(eRemoveOverlap)"
481  << NcbiEndl;
482  reportProblems(report_and_forget, m_diag, out, eRemoveOverlap);
483  }
484  PopVerbosity();
485 
486  PushVerbosity();
487  {
488  string sout = base + ".tRNA.missing.log";
489  CNcbiOfstream out( sout.c_str() );
490  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
491  << eTRNAMissing
492  << "(eTRNAMissing)"
493  << NcbiEndl;
494  reportProblems(report_and_forget, m_diag, out, eTRNAMissing);
495  reportProblems(report_and_forget, m_diag, out, eTRNAAbsent);
496  }
497  PopVerbosity();
498 
499 
500  PushVerbosity();
501  {
502  string sout = base + ".tRNA.bad.strand.log";
503  CNcbiOfstream out( sout.c_str() );
504  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
505  << eTRNABadStrand
506  << "(eTRNABadStrand)"
507  << NcbiEndl;
508  reportProblems(report_and_forget, m_diag, out, eTRNABadStrand);
509  }
510  PopVerbosity();
511 
512  PushVerbosity();
513  {
514  string sout = base + ".tRNA.undef.strand.log";
515  CNcbiOfstream out( sout.c_str() );
516  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
518  << "(eTRNAUndefStrand)"
519  << NcbiEndl;
520  reportProblems(report_and_forget, m_diag, out, eTRNAUndefStrand);
521  }
522  PopVerbosity();
523 
524  PushVerbosity();
525  {
526  string sout = base + ".tRNA.complete.mismatch.log";
527  CNcbiOfstream out( sout.c_str() );
528  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
530  << "(eTRNAComMismatch)"
531  << NcbiEndl;
532  reportProblems(report_and_forget, m_diag, out, eTRNAComMismatch);
533  }
534  PopVerbosity();
535 
536  PushVerbosity();
537  {
538  string sout = base + ".tRNA.mismatch.log";
539  CNcbiOfstream out( sout.c_str() );
540  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
541  << eTRNAMismatch
542  << "(eTRNAMismatch)"
543  << NcbiEndl;
544  reportProblems(report_and_forget, m_diag, out, eTRNAMismatch);
545  }
546  PopVerbosity();
547 
548  PushVerbosity();
549  {
550  string sout = base + ".short.annotation.log";
551  CNcbiOfstream out( sout.c_str() );
552  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
553  << eShortProtein
554  << "(eShortProtein)"
555  << NcbiEndl;
556  reportProblems(report_and_forget, m_diag, out, eShortProtein);
557  }
558  PopVerbosity();
559 
560 
561 
562 
563 
564  PushVerbosity();
565  {
566  string sout = args["outOther"].HasValue() ?
567  args["outOther"].AsString() :
568  base + ".frameshifts.problems.log";
569  CNcbiOfstream out( sout.c_str() );
570  if(PrintDetails()) NcbiCerr << "Run: before reportProblems: routine start: "
571  << eRelFrameShift
572  << "(eRelFrameShift)"
573  << NcbiEndl;
574  reportProblems(report_and_forget, m_diag, out, eRelFrameShift);
575  }
576  PopVerbosity();
577 
578  PushVerbosity();
579  LocMap loc_map;
580  map<string,string> problem_names;
581  CollectFrameshiftedSeqs(problem_names);
582  // m_verbosity_threshold = 300; // debuggging only
583  RemoveProblems(problem_names, loc_map); //
584  RemoveProblems(problem_names, loc_map); // second run to do whatever was not picked up by the first run
585  PopVerbosity();
586 
587  PushVerbosity();
588  FixStrands(); //
589  PopVerbosity();
590 
591  PushVerbosity();
592  int nremoved = RemoveInterim(); //
593  if(PrintDetails()) NcbiCerr << "RemoveInterimAligns: top: removed = " << nremoved << NcbiEndl;
594  int nremoved2 = RemoveInterim(); //
595  if(PrintDetails()) NcbiCerr << "RemoveInterimAligns: top: removed2 = " << nremoved2 << NcbiEndl;
596  if(nremoved2)
597  {
598  if(PrintDetails()) NcbiCerr << "RemoveInterimAligns: ERROR: second take still has removeds" << NcbiEndl;
599  }
600  PopVerbosity();
601 
602 
603  // Write the entry
604  if( args["out"].HasValue() )
605  {{
606  args["out"].AsOutputFile().seekp(0);
607  unique_ptr<CObjectOStream> out
608  (CObjectOStream::Open(s_GetFormat(args["outfmt"].AsString()),
609  args["out"].AsOutputFile()));
610  if(IsSubmit())
611  *out << m_Submit;
612  else
613  *out << m_Entry;
614  }}
615 
616 
617 
618  // Exit successfully
619  return 0;
620 }
621 
622 
623 
CArgAllow_Strings –.
Definition: ncbiargs.hpp:1641
CArgDescriptions –.
Definition: ncbiargs.hpp:541
CArgs –.
Definition: ncbiargs.hpp:379
void printGeneralInfo(ostream &out=NcbiCerr)
int CollectFrameshiftedSeqs(map< string, string > &problem_names)
Definition: problems.cpp:890
static int m_verbosity_threshold
static bool PrintDetails(int current_verbosity=m_current_verbosity)
map< string, string > m_tagmap
void CheckUniqLocusTag()
Definition: shortcuts.cpp:47
static stack< int > m_saved_verbosity
static int m_n_best_hit
list< long > m_previous_genome
int AnalyzeSeqs(void)
Definition: analyze.cpp:151
int ProcessCDD(map< string, blastStr > &blastMap)
Definition: read_blast.cpp:545
int ReadRRNA2(const string &file)
Definition: read_rrna.cpp:35
static double m_trnascan_scoreThreshold
int simple_overlaps(void)
Definition: missing.cpp:149
int FixStrands(void)
Definition: problems.cpp:250
static int m_current_verbosity
bool ReadPreviousAcc(const string &file, list< long > &input_acc)
int RemoveProblems(map< string, string > &problem_seqs, LocMap &loc_map)
Definition: problems.cpp:319
virtual void Init(void)
Initialize the application.
int short_proteins(void)
static int m_cds_overlapThreshold
int CopyInfoFromGenesToProteins(void)
===========================================================================
Definition: copy_loc.cpp:33
int ReadBlast(const char *file, map< string, blastStr > &blastMap)
Definition: read_blast.cpp:39
static double m_entireThreshold
static int m_rna_overlapThreshold
static ECoreDataType getCoreDataType(istream &in)
virtual int Run(void)
Run the application.
int StoreBlast(map< string, blastStr > &blastMap)
Definition: read_blast.cpp:374
int AnalyzeSeqsViaBioseqs(bool in_pool_prot, bool against_prot)
Definition: analyze.cpp:35
TSimpleSeqs m_extRNAtable2
int ReadTagMap(const char *file)
int ReadParents(CNcbiIstream &in, const list< long > &nacc)
static bool less_simple_seq(const TSimpleSeq &first, const TSimpleSeq &second)
static int m_shortProteinThreshold
static void PopVerbosity(void)
ECoreDataType m_coreDataType
void GetGenomeLen()
Definition: shortcuts.cpp:36
void reportProblems(const bool report_and_forget, diagMap &diag, ostream &out, const CBioseq::TAnnot &annots, const EProblem type)
Definition: problems.cpp:36
int RemoveInterim(void)
Definition: problems.cpp:713
static double m_small_tails_threshold
static double m_partThreshold
static double m_eThreshold
void dump_fasta_for_pretty_blast(diagMap &diag)
int ReadTRNA2(const string &file)
Definition: read_trna.cpp:35
static void PushVerbosity(void)
CSeq_submit m_Submit
void Parentize(void)
Definition: Seq_entry.cpp:71
bool Read(istream &in)
Definition: tbl.cpp:40
void clear()
Definition: map.hpp:169
Definition: map.hpp:338
std::ofstream out("events_result.xml")
main entry point for tests
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
Definition: ncbiapp.cpp:285
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
Definition: ncbiapp.cpp:1175
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
string & Print(string &str) const
Print (append) all arguments to the string "str" and return "str".
Definition: ncbiargs.cpp:1876
@ fPreOpen
Open file right away; for eInputFile, eOutputFile, eIOFile.
Definition: ncbiargs.hpp:618
@ eInputFile
Name of file (must exist and be readable)
Definition: ncbiargs.hpp:595
@ eDouble
Convertible into a floating point number (double)
Definition: ncbiargs.hpp:594
@ 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
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
@ eOverlap
CSeq_locs overlap.
#define NcbiEndl
Definition: ncbistre.hpp:548
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
Definition: ncbistre.hpp:500
#define NcbiCerr
Definition: ncbistre.hpp:544
void SetData(TData &value)
Assign a value to Data data member.
std::istream & in(std::istream &in_, double &x_)
ESerialDataFormat s_GetFormat(const string &name)
Definition: bss_info.cpp:337
@ eTRNAComMismatch
@ eTRNABadStrand
@ eShortProtein
@ eTRNAMismatch
@ eTRNAUndefStrand
@ eRemoveOverlap
@ eRnaOverlap
@ eTRNAAbsent
@ eCompleteOverlap
@ eTRNAMissing
@ eRelFrameShift
Modified on Wed Mar 27 11:21:13 2024 by modify_doxy.py rev. 669887