NCBI C++ ToolKit
tabular_fmt.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GPIPE_COMMON___TABULAR_FORMAT__HPP
2 #define GPIPE_COMMON___TABULAR_FORMAT__HPP
3 
4 /* $Id: tabular_fmt.hpp 100243 2023-07-12 14:29:16Z mozese2 $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Mike DiCuccio, Wratko Hlavina, Eyal Mozes
30  *
31  * File Description:
32  * Sample for the command-line arguments' processing ("ncbiargs.[ch]pp"):
33  *
34  */
35 
36 #include <objmgr/util/sequence.hpp>
38 
41 
43 
46  class CTaxon1;
48 
49 /////////////////////////////////////////////////////////////////////////////
50 ///
51 /// Simple tabular alignment formatter
52 /// This is a replacement for the BLAST tabular formatter that supports a set
53 /// of custom gpipe extensions and also provides for better performance
54 ///
55 
57 {
58 public:
59  class IFormatter : public CObject
60  {
61  public:
62  virtual ~IFormatter() {}
63  void SetScoreLookup(objects::CScoreLookup *scores)
64  { m_Scores = scores; }
65  virtual void SetGencoll(CConstRef<objects::CGC_Assembly> /*gencoll*/)
66  {}
67  virtual void PrintHelpText(CNcbiOstream& ostr) const = 0;
68  virtual void PrintHeader(CNcbiOstream& ostr) const = 0;
69  virtual void Print(CNcbiOstream& ostr,
70  const objects::CSeq_align& align) = 0;
71 
72  protected:
73  objects::CScoreLookup *m_Scores;
74  };
75 
77 
78  CTabularFormatter(CNcbiOstream& ostr, objects::CScoreLookup &scores,
79  const string &unavailable_string = "");
80  void SetFormat(const string& format);
81 
82  void SetGencoll(CConstRef<objects::CGC_Assembly> gencoll);
83 
84  void RegisterField(const string &field_name, IFormatter* field_formatter)
85  {
86  m_FormatterMap[field_name] = CIRef<IFormatter>(field_formatter);
87  }
88 
89  void WriteHeader();
90  void Format(const objects::CSeq_align& align);
91 
93  { return m_FormatterMap; }
94 
95  const list< CIRef<IFormatter> > &Formatters() const
96  { return m_Formatters; }
97 
98 private:
99  list< CIRef<IFormatter> > m_Formatters;
100  objects::CScoreLookup *m_Scores;
104 
105  static void s_RegisterStandardFields(CTabularFormatter &formatter);
106 };
107 
108 
109 /////////////////////////////////////////////////////////////////////////////
110 
111 
113 {
114 public:
116  void PrintHelpText(CNcbiOstream& ostr) const;
117  void PrintHeader(CNcbiOstream& ostr) const;
118  void Print(CNcbiOstream& ostr,
119  const objects::CSeq_align& align);
120 
121 private:
122  int m_Row;
123 };
124 
125 /////////////////////////////////////////////////////////////////////////////
126 
128 {
129 public:
130  CTabularFormatter_SeqId(int row, objects::sequence::EGetIdType id_type, bool tag_only = false, bool protein = false);
131  void PrintHelpText(CNcbiOstream& ostr) const;
132  void PrintHeader(CNcbiOstream& ostr) const;
133  void Print(CNcbiOstream& ostr,
134  const objects::CSeq_align& align);
135 
136 private:
137  int m_Row;
139  bool m_TagOnly;
140  bool m_Protein;
141 };
142 
143 /////////////////////////////////////////////////////////////////////////////
144 
146 {
147 public:
148  CTabularFormatter_AlignStart(int row, bool nominus=false);
149  void PrintHelpText(CNcbiOstream& ostr) const;
150  void PrintHeader(CNcbiOstream& ostr) const;
151  void Print(CNcbiOstream& ostr,
152  const objects::CSeq_align& align);
153 
154 private:
155  int m_Row;
156  bool m_NoMinus;
157 };
158 
159 /////////////////////////////////////////////////////////////////////////////
160 
162 {
163 public:
164  CTabularFormatter_AlignEnd(int row, bool nominus=false);
165  void PrintHelpText(CNcbiOstream& ostr) const;
166  void PrintHeader(CNcbiOstream& ostr) const;
167  void Print(CNcbiOstream& ostr,
168  const objects::CSeq_align& align);
169 
170 private:
171  int m_Row;
172  bool m_NoMinus;
173 };
174 
175 /////////////////////////////////////////////////////////////////////////////
176 
178 {
179 public:
181  void PrintHelpText(CNcbiOstream& ostr) const;
182  void PrintHeader(CNcbiOstream& ostr) const;
183  void Print(CNcbiOstream& ostr,
184  const objects::CSeq_align& align);
185 
186 private:
187  int m_Row;
188 };
189 
190 /////////////////////////////////////////////////////////////////////////////
191 
193 {
194 public:
196  void PrintHelpText(CNcbiOstream& ostr) const;
197  void PrintHeader(CNcbiOstream& ostr) const;
198  void Print(CNcbiOstream& ostr,
199  const objects::CSeq_align& align);
200 
201 private:
202  int m_Row;
203 };
204 
205 /////////////////////////////////////////////////////////////////////////////
206 
208 {
209 public:
210  void PrintHelpText(CNcbiOstream& ostr) const;
211  void PrintHeader(CNcbiOstream& ostr) const;
212  void Print(CNcbiOstream& ostr,
213  const objects::CSeq_align& align);
214 };
215 
216 /////////////////////////////////////////////////////////////////////////////
217 
219 {
220 public:
221  void PrintHelpText(CNcbiOstream& ostr) const;
222  void PrintHeader(CNcbiOstream& ostr) const;
223  void Print(CNcbiOstream& ostr,
224  const objects::CSeq_align& align);
225 };
226 
227 /////////////////////////////////////////////////////////////////////////////
228 
229 
231 {
232 public:
233  CTabularFormatter_PercentId(bool gapped = false);
234  void PrintHelpText(CNcbiOstream& ostr) const;
235  void PrintHeader(CNcbiOstream& ostr) const;
236  void Print(CNcbiOstream& ostr,
237  const objects::CSeq_align& align);
238 
239 private:
240  bool m_Gapped;
241 };
242 
243 /////////////////////////////////////////////////////////////////////////////
244 
246 {
247 public:
248  CTabularFormatter_PercentCoverage(int row, const string &header)
249  : m_Row(row)
250  , m_Header(header)
251  {}
252 
253  void PrintHelpText(CNcbiOstream& ostr) const;
254  void PrintHeader(CNcbiOstream& ostr) const;
255  void Print(CNcbiOstream& ostr,
256  const objects::CSeq_align& align);
257 
258 private:
259  int m_Row;
260  string m_Header;
261 };
262 
263 /////////////////////////////////////////////////////////////////////////////
264 
266 {
267 public:
268  void PrintHelpText(CNcbiOstream& ostr) const;
269  void PrintHeader(CNcbiOstream& ostr) const;
270  void Print(CNcbiOstream& ostr,
271  const objects::CSeq_align& align);
272 };
273 
274 /////////////////////////////////////////////////////////////////////////////
275 
277 {
278 public:
279  void PrintHelpText(CNcbiOstream& ostr) const;
280  void PrintHeader(CNcbiOstream& ostr) const;
281  void Print(CNcbiOstream& ostr,
282  const objects::CSeq_align& align);
283 };
284 
285 /////////////////////////////////////////////////////////////////////////////
286 
288 {
289 public:
290  void PrintHelpText(CNcbiOstream& ostr) const;
291  void PrintHeader(CNcbiOstream& ostr) const;
292  void Print(CNcbiOstream& ostr,
293  const objects::CSeq_align& align);
294 };
295 
296 /////////////////////////////////////////////////////////////////////////////
297 
299 {
300 public:
302  void PrintHelpText(CNcbiOstream& ostr) const;
303  void PrintHeader(CNcbiOstream& ostr) const;
304  void Print(CNcbiOstream& ostr,
305  const objects::CSeq_align& align);
306 private:
307  int m_Row;
308 };
309 
310 /////////////////////////////////////////////////////////////////////////////
311 
313 {
314 public:
316  void PrintHelpText(CNcbiOstream& ostr) const;
317  void PrintHeader(CNcbiOstream& ostr) const;
318  void Print(CNcbiOstream& ostr,
319  const objects::CSeq_align& align);
320 private:
321  int m_Row;
322 };
323 
324 /////////////////////////////////////////////////////////////////////////////
325 
327 {
328 public:
329  void PrintHelpText(CNcbiOstream& ostr) const;
330  void PrintHeader(CNcbiOstream& ostr) const;
331  void Print(CNcbiOstream& ostr,
332  const objects::CSeq_align& align);
333 };
334 
335 /////////////////////////////////////////////////////////////////////////////
336 
338 {
339 public:
340  void PrintHelpText(CNcbiOstream& ostr) const;
341  void PrintHeader(CNcbiOstream& ostr) const;
342  void Print(CNcbiOstream& ostr,
343  const objects::CSeq_align& align);
344 };
345 
346 /////////////////////////////////////////////////////////////////////////////
347 
349 {
350 public:
351  void PrintHelpText(CNcbiOstream& ostr) const;
352  void PrintHeader(CNcbiOstream& ostr) const;
353  void Print(CNcbiOstream& ostr,
354  const objects::CSeq_align& align);
355 };
356 
357 /////////////////////////////////////////////////////////////////////////////
358 
360 {
361 public:
362  void PrintHelpText(CNcbiOstream& ostr) const;
363  void PrintHeader(CNcbiOstream& ostr) const;
364  void Print(CNcbiOstream& ostr,
365  const objects::CSeq_align& align);
366 };
367 
368 /////////////////////////////////////////////////////////////////////////////
369 
371 {
372 public:
373  void PrintHelpText(CNcbiOstream& ostr) const;
374  void PrintHeader(CNcbiOstream& ostr) const;
375  void Print(CNcbiOstream& ostr,
376  const objects::CSeq_align& align);
377 };
378 
379 /////////////////////////////////////////////////////////////////////////////
380 
382 {
383 public:
384  void PrintHelpText(CNcbiOstream& ostr) const;
385  void PrintHeader(CNcbiOstream& ostr) const;
386  void Print(CNcbiOstream& ostr,
387  const objects::CSeq_align& align);
388 };
389 
390 /////////////////////////////////////////////////////////////////////////////
391 
392 /// formatter for dumping any score in an alignment
394 {
395 public:
396  CTabularFormatter_AnyScore(const string& score_name,
397  const string& col_name);
398  void PrintHelpText(CNcbiOstream& ostr) const;
399  void PrintHeader(CNcbiOstream& ostr) const;
400  void Print(CNcbiOstream& ostr,
401  const objects::CSeq_align& align);
402 
403 private:
404  string m_ScoreName;
405  string m_ColName;
406 };
407 
408 
409 /////////////////////////////////////////////////////////////////////////////
410 ///
411 /// formatter for dumping alignment identifiers
413 {
414 public:
415  void PrintHelpText(CNcbiOstream& ostr) const;
416  void PrintHeader(CNcbiOstream& ostr) const;
417  void Print(CNcbiOstream& ostr,
418  const objects::CSeq_align& align);
419 };
420 
421 
422 /////////////////////////////////////////////////////////////////////////////
423 ///
424 /// formatter for dumping alignment identifiers
426 {
427 public:
428  void PrintHelpText(CNcbiOstream& ostr) const;
429  void PrintHeader(CNcbiOstream& ostr) const;
430  void Print(CNcbiOstream& ostr,
431  const objects::CSeq_align& align);
432 };
433 
434 
435 /////////////////////////////////////////////////////////////////////////////
436 ///
437 /// formatter for dumping sequence deflines
439 {
440 public:
442  void PrintHelpText(CNcbiOstream& ostr) const;
443  void PrintHeader(CNcbiOstream& ostr) const;
444  void Print(CNcbiOstream& ostr,
445  const objects::CSeq_align& align);
446 
447 private:
448  int m_Row;
449  objects::sequence::CDeflineGenerator generator;
450 };
451 
452 
453 /////////////////////////////////////////////////////////////////////////////
454 ///
455 /// formatter for dumping sequence Prot-refs (protein only)
457 {
458 public:
460  void PrintHelpText(CNcbiOstream& ostr) const;
461  void PrintHeader(CNcbiOstream& ostr) const;
462  void Print(CNcbiOstream& ostr,
463  const objects::CSeq_align& align);
464 
465 private:
466  int m_Row;
467 };
468 
469 
470 /////////////////////////////////////////////////////////////////////////////
471 ///
472 /// formatter for dumping tax-ids
474 {
475 public:
477  void PrintHelpText(CNcbiOstream& ostr) const;
478  void PrintHeader(CNcbiOstream& ostr) const;
479  void Print(CNcbiOstream& ostr,
480  const objects::CSeq_align& align);
481 
482 private:
483  int m_Row;
484 };
485 
486 /////////////////////////////////////////////////////////////////////////////
487 ///
488 /// formatter for dumping content of sequence comment descriptors
490 {
491 public:
492  CTabularFormatter_Comment(int row, const string &prefix);
493  void PrintHelpText(CNcbiOstream& ostr) const;
494  void PrintHeader(CNcbiOstream& ostr) const;
495  void Print(CNcbiOstream& ostr,
496  const objects::CSeq_align& align);
497 
498 private:
499  int m_Row;
500  string m_Prefix;
501 };
502 
503 /////////////////////////////////////////////////////////////////////////////
504 ///
505 /// formatter for dumping organism names
507 {
508 public:
509  enum EField {
513  eKingdom
514  };
517  void PrintHelpText(CNcbiOstream& ostr) const;
518  void PrintHeader(CNcbiOstream& ostr) const;
519  void Print(CNcbiOstream& ostr,
520  const objects::CSeq_align& align);
521 
522 private:
523  int m_Row;
525  std::unique_ptr<objects::CTaxon1> m_Taxon1;
526 };
527 
528 /////////////////////////////////////////////////////////////////////////////
529 ///
530 /// formatter for dumping exons
532 {
533 public:
536  CTabularFormatter_ExonIntrons(unsigned sequence, EIntervalType interval,
537  EInfoType info)
538  : m_Sequence(sequence)
539  , m_Interval(interval)
540  , m_Info(info)
541  {}
542 
543  void PrintHelpText(CNcbiOstream& ostr) const;
544  void PrintHeader(CNcbiOstream& ostr) const;
545  void Print(CNcbiOstream& ostr,
546  const objects::CSeq_align& align);
547 
548 private:
549  unsigned m_Sequence;
552 };
553 
554 /////////////////////////////////////////////////////////////////////////////
555 // Size, in bp, of the largest gap in the Seq-align
557 {
558 public:
559  enum ERow { e_All = -1 };
561  void PrintHelpText(CNcbiOstream& ostr) const;
562  void PrintHeader(CNcbiOstream& ostr) const;
563  void Print(CNcbiOstream& ostr,
564  const objects::CSeq_align& align);
565 private:
566  TSeqPos x_CalcBiggestGap(const objects::CSeq_align& align);
567  int m_Row;
568 };
569 
570 /////////////////////////////////////////////////////////////////////////////
571 // Bioseq.descr.source.subtype.chromosome/name
573 {
574 public:
576  void PrintHelpText(CNcbiOstream& ostr) const;
577  void PrintHeader(CNcbiOstream& ostr) const;
578  void Print(CNcbiOstream& ostr,
579  const objects::CSeq_align& align);
580 private:
581  int m_Row;
582 };
583 
584 /////////////////////////////////////////////////////////////////////////////
585 // Bioseq.descr.source.subtype.clone/name
587 {
588 public:
590  void PrintHelpText(CNcbiOstream& ostr) const;
591  void PrintHeader(CNcbiOstream& ostr) const;
592  void Print(CNcbiOstream& ostr,
593  const objects::CSeq_align& align);
594 private:
595  int m_Row;
596 };
597 
598 /////////////////////////////////////////////////////////////////////////////
599 // Bioseq.descr.molinfo.tech
601 {
602 public:
604  void PrintHelpText(CNcbiOstream& ostr) const;
605  void PrintHeader(CNcbiOstream& ostr) const;
606  void Print(CNcbiOstream& ostr,
607  const objects::CSeq_align& align);
608 private:
609  int m_Row;
610 };
611 
612 /////////////////////////////////////////////////////////////////////////////
613 
615 {
616 public:
618  void PrintHelpText(CNcbiOstream& ostr) const;
619  void PrintHeader(CNcbiOstream& ostr) const;
620  void Print(CNcbiOstream& ostr,
621  const objects::CSeq_align& align);
622 
623 private:
624  int m_Row;
625  void x_RecurseStrands(const objects::CSeq_align& align, bool& Plus, bool& Minus);
626 };
627 
628 /////////////////////////////////////////////////////////////////////////////
629 
631 {
632 public:
633  CTabularFormatter_FixedText(const string& col_name, const string& text);
634  void PrintHelpText(CNcbiOstream& ostr) const;
635  void PrintHeader(CNcbiOstream& ostr) const;
636  void Print(CNcbiOstream& ostr,
637  const objects::CSeq_align& align);
638 
639 private:
640  string m_ColName;
641  string m_Text;
642 };
643 
644 /////////////////////////////////////////////////////////////////////////////
645 ///
646 /// formatter for Shannon's entropy
647 
649 {
650 public:
652  : m_Row(row)
653  {
654  }
655 
656  void PrintHelpText(CNcbiOstream& ostr) const;
657  void PrintHeader(CNcbiOstream& ostr) const;
658  void Print(CNcbiOstream& ostr,
659  const objects::CSeq_align& align);
660 
661 private:
662  size_t m_Row;
663 };
664 
665 
666 /////////////////////////////////////////////////////////////////////////////
667 ///
668 /// formatter for BLAST seg %
669 
671 {
672 public:
674  : m_Row(row)
675  {
676  }
677 
678  void PrintHelpText(CNcbiOstream& ostr) const;
679  void PrintHeader(CNcbiOstream& ostr) const;
680  void Print(CNcbiOstream& ostr,
681  const objects::CSeq_align& align);
682 
683 private:
684  size_t m_Row;
685 };
686 
687 
688 /////////////////////////////////////////////////////////////////////////////
689 
691 {
692 public:
693  void PrintHelpText(CNcbiOstream& ostr) const;
694  void PrintHeader(CNcbiOstream& ostr) const;
695  void Print(CNcbiOstream& ostr,
696  const objects::CSeq_align& align);
697 };
698 
699 
700 /////////////////////////////////////////////////////////////////////////////
701 /// formatter for dumping cigar of alignments
703 {
704 public:
706  void PrintHelpText(CNcbiOstream& ostr) const;
707  void PrintHeader(CNcbiOstream& ostr) const;
708  void Print(CNcbiOstream& ostr,
709  const objects::CSeq_align& align);
710 
711 private:
712 
713 };
714 
715 
716 /////////////////////////////////////////////////////////////////////////////
717 // CGC_AssemblyUnit.desc.name
719 {
720 public:
723 
725 
726  virtual void SetGencoll(CConstRef<objects::CGC_Assembly> gencoll);
727 
728  void PrintHelpText(CNcbiOstream& ostr) const;
729  void PrintHeader(CNcbiOstream& ostr) const;
730  void Print(CNcbiOstream& ostr,
731  const objects::CSeq_align& align);
732 private:
733  int m_Row;
737 };
738 
739 /////////////////////////////////////////////////////////////////////////////
740 // CGC_Sequence.patch_type
742 {
743 public:
745  void PrintHelpText(CNcbiOstream& ostr) const;
746  void PrintHeader(CNcbiOstream& ostr) const;
747  void Print(CNcbiOstream& ostr,
748  const objects::CSeq_align& align);
749 private:
750  int m_Row;
752 };
753 
754 /////////////////////////////////////////////////////////////////////////////
755 // CGC_Sequence.patch_type
757 {
758 public:
760  void PrintHelpText(CNcbiOstream& ostr) const;
761  void PrintHeader(CNcbiOstream& ostr) const;
762  void Print(CNcbiOstream& ostr,
763  const objects::CSeq_align& align);
764 private:
765  int m_Row;
767 };
768 
769 
770 
771 
773 {
774 public:
776  void PrintHelpText(CNcbiOstream& ostr) const;
777  void PrintHeader(CNcbiOstream& ostr) const;
778  void Print(CNcbiOstream& ostr,
779  const objects::CSeq_align& align);
780 
781 private:
782 
783 };
784 
785 
787 {
788 public:
790  CTabularFormatter_Indels(EIndelType indel_type, int coordinate_row);
791  void PrintHelpText(CNcbiOstream& ostr) const;
792  void PrintHeader(CNcbiOstream& ostr) const;
793  void Print(CNcbiOstream& ostr,
794  const objects::CSeq_align& align);
795 
796 private:
799 };
800 
802 {
803 public:
805  void PrintHelpText(CNcbiOstream& ostr) const;
806  void PrintHeader(CNcbiOstream& ostr) const;
807  void Print(CNcbiOstream& ostr,
808  const objects::CSeq_align& align);
809 
810 private:
811  int m_Row;
812 };
813 
815 {
816 public:
818  void PrintHelpText(CNcbiOstream& ostr) const;
819  void PrintHeader(CNcbiOstream& ostr) const;
820  void Print(CNcbiOstream& ostr,
821  const objects::CSeq_align& align);
822 
823 private:
825 };
826 
828 {
829 public:
831  void PrintHelpText(CNcbiOstream& ostr) const;
832  void PrintHeader(CNcbiOstream& ostr) const;
833  void Print(CNcbiOstream& ostr,
834  const objects::CSeq_align& align);
835 
836 private:
838 };
839 
840 
841 /////////////////////////////////////////////////////////////////////////////
842 
844 
845 
846 #endif // GPIPE_COMMON___TABULAR_FORMAT__HPP
CObject –.
Definition: ncbiobj.hpp:180
virtual void PrintHelpText(CNcbiOstream &ostr) const =0
virtual void PrintHeader(CNcbiOstream &ostr) const =0
virtual void SetGencoll(CConstRef< objects::CGC_Assembly >)
Definition: tabular_fmt.hpp:65
objects::CScoreLookup * m_Scores
Definition: tabular_fmt.hpp:73
void SetScoreLookup(objects::CScoreLookup *scores)
Definition: tabular_fmt.hpp:63
virtual void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)=0
CTabularFormatter_AlignEnd(int row, bool nominus=false)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
formatter for dumping alignment identifiers
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_AlignStart(int row, bool nominus=false)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
Definition: tabular_fmt.cpp:91
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
Definition: tabular_fmt.cpp:98
void PrintHeader(CNcbiOstream &ostr) const
Definition: tabular_fmt.cpp:79
formatter for dumping any score in an alignment
CTabularFormatter_AnyScore(const string &score_name, const string &col_name)
formatter for dumping any score in an alignment
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_AssemblyInfo(int row, EAssemblyType type, EInfo info)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
CConstRef< objects::CGC_Assembly > m_Gencoll
virtual void SetGencoll(CConstRef< objects::CGC_Assembly > gencoll)
formatter for dumping alignment identifiers
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
TSeqPos x_CalcBiggestGap(const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
formatter for dumping cigar of alignments
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
formatter for dumping content of sequence comment descriptors
CTabularFormatter_Comment(int row, const string &prefix)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
formatter for dumping sequence deflines
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
objects::sequence::CDeflineGenerator generator
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void x_RecurseStrands(const objects::CSeq_align &align, bool &Plus, bool &Minus)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
formatter for Shannon's entropy
CTabularFormatter_Entropy(size_t row)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
formatter for dumping exons
CTabularFormatter_ExonIntrons(unsigned sequence, EIntervalType interval, EInfoType info)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_FixedText(const string &col_name, const string &text)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_Indels(EIndelType indel_type, int coordinate_row)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CConstRef< objects::CGC_Assembly > m_Gencoll
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_NearestGap(int row, CConstRef< objects::CGC_Assembly > gencoll)
formatter for dumping organism names
std::unique_ptr< objects::CTaxon1 > m_Taxon1
CTabularFormatter_OrgName(int row, EField field=eFullTaxName)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CConstRef< objects::CGC_Assembly > m_Gencoll
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_PatchType(int row, CConstRef< objects::CGC_Assembly > gencoll)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_PercentCoverage(int row, const string &header)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_PercentId(bool gapped=false)
void PrintHeader(CNcbiOstream &ostr) const
formatter for dumping sequence Prot-refs (protein only)
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
formatter for BLAST seg %
CTabularFormatter_SegPercent(size_t row)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_SeqId(int row, objects::sequence::EGetIdType id_type, bool tag_only=false, bool protein=false)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
objects::sequence::EGetIdType m_GetIdType
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
formatter for dumping tax-ids
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
Simple tabular alignment formatter This is a replacement for the BLAST tabular formatter that support...
Definition: tabular_fmt.hpp:57
void RegisterField(const string &field_name, IFormatter *field_formatter)
Definition: tabular_fmt.hpp:84
objects::CScoreLookup * m_Scores
const list< CIRef< IFormatter > > & Formatters() const
Definition: tabular_fmt.hpp:95
string m_UnavailableString
map< string, CIRef< IFormatter > > TFormatterMap
Definition: tabular_fmt.hpp:76
CNcbiOstream & m_Ostr
list< CIRef< IFormatter > > m_Formatters
Definition: tabular_fmt.hpp:99
TFormatterMap m_FormatterMap
const TFormatterMap & AvailableFormatters() const
Definition: tabular_fmt.hpp:92
Definition: map.hpp:338
API (CDeflineGenerator) for computing sequences' titles ("definitions").
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
int EGetIdType
Definition: sequence.hpp:126
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
static void text(MDB_val *v)
Definition: mdb_dump.c:62
static MDB_envinfo info
Definition: mdb_load.c:37
static Format format
Definition: njn_ioutil.cpp:53
Format
Definition: njn_ioutil.hpp:52
#define row(bind, expected)
Definition: string_bind.c:73
Definition: type.c:6
Modified on Wed Sep 04 15:01:47 2024 by modify_doxy.py rev. 669887