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

Go to the SVN repository for this file.

1 #ifndef CU_SEQTREE_ASNIZER_HPP
2 #define CU_SEQTREE_ASNIZER_HPP
3 
7 
10 BEGIN_SCOPE(cd_utils)
11 
13 {
15  it(sit), asnNode(casnNode){}
18 };
19 
22 {
23 public:
24  static bool convertToTreeOption(const CRef< CAlgorithm_type>& alg, TreeOptions& treeOption);
25  static bool convertToAlgType(const TreeOptions& options, CRef< CAlgorithm_type >& alg);
26 
27  // The first version fills in footprint and child membership fields in the asnSeqTree
28  // from the data in the AlignmentCollection. The second version, simply constructs
29  // a CSequence_tree with the topology of the seqTree that contains dummy footprint information
30  // and no child membership data (Seq-ids for leaf nodes are of type e_Gi if the parsed name is
31  // numeric, or type e_Local if the parsed name is non-numeric.
32  static bool convertToAsnSeqTree(const AlignmentCollection& ac, const SeqTree& seqTree, CSequence_tree& asnSeqTree);
33  static bool convertToAsnSeqTree(const SeqTree& seqTree, CSequence_tree& asnSeqTree);
34 
35  static bool convertToSeqTree(CSequence_tree& asnSeqTree, SeqTree& seqTree, SeqLocToSeqItemMap& liMap);
36  static bool addAsnSeqTreeNode(const AlignmentCollection& ac, const SeqTree& seqTree, SeqTreeIterator cursor, CSeqTree_node& asnNode);
37  static bool addChildNode(SeqTree& seqTree, SeqTreeIterator parentNode, CSeqTree_node& asnNode, SeqLocToSeqItemMap& liMap);
38  static void fillAsnSeqTreeNode(const AlignmentCollection& ac, const SeqTreeIterator& cursor, CSeqTree_node& asnNode);
39  static void fillSeqItem(const CSeqTree_node& node, SeqItem& seqItem);
40 
41  static bool resolveRowId(const AlignmentCollection& ac, SeqLocToSeqItemMap& liMap);
42  static bool refillAsnMembership(const AlignmentCollection& ac, SeqLocToSeqItemMap& liMap);
43  //serialize
44  static bool readAlgType(CNcbiIstream& is, CRef< CAlgorithm_type >& alg);
45  static bool writeAlgType(CNcbiOstream& os, const CRef< CAlgorithm_type >& alg);
46 
47  /*
48  static bool readAsnSeqTree(const CNcbiIstream& is, CRef< CSequence_tree >& alg);
49  static bool writeAlgType(CNcbiOstream& os, const CRef< CSequence_tree >& alg);
50  */
51 private:
52 
54 
55  static bool addAsnSeqTreeNode(const SeqTree& seqTree, SeqTreeIterator cursor, CSeqTree_node& asnNode);
56  static void fillAsnSeqTreeNode(const SeqTreeIterator& cursor, CSeqTree_node& asnNode);
57 
58 };
59 
60 END_SCOPE(cd_utils)
62 #endif
63 
CSeqTree_node –.
CSequence_tree –.
Definition: map.hpp:338
USING_SCOPE(objects)
map< const CSeq_interval *, TreeNodePair > SeqLocToSeqItemMap
#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
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
Definition: ncbistre.hpp:146
#define NCBI_CDUTILS_EXPORT
Definition: ncbi_export.h:376
TreeNodePair(SeqTreeIterator sit, CSeqTree_node *casnNode)
CSeqTree_node * asnNode
SeqTreeIterator it
Modified on Fri Sep 20 14:57:22 2024 by modify_doxy.py rev. 669887