halapi hierarchichalalignmentformatapi

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Pages
halAlignment.h
1 /*
2 * Copyright (C) 2012 by Glenn Hickey (hickey@soe.ucsc.edu)
3 *
4 * Released under the MIT license, see LICENSE.txt
5 */
6
7 #ifndef _HALALIGNMENT_H
8 #define _HALALIGNMENT_H
9
10 #include <string>
11 #include <vector>
12 #include "halDefs.h"
13
14 namespace hal {
15
21 class Alignment
22 {
23 public:
24
27 virtual void createNew(const std::string& alignmentPath) = 0;
28
32 virtual void open(const std::string& alignmentPath,
33 bool readOnly) = 0;
34
37 virtual void open(const std::string& alignmentPath) const = 0;
38
40 virtual void close() = 0;
41
43 virtual void close() const = 0;
44
47 virtual void setOptionsFromParser(CLParserConstPtr parser) const = 0;
48
53 virtual Genome* addLeafGenome(const std::string& name,
54 const std::string& parentName,
55 double branchLength) = 0;
56
62 virtual Genome* addRootGenome(const std::string& name,
63 double branchLength = 0) = 0;
64
67 virtual void removeGenome(const std::string& name) = 0;
68
71 virtual const Genome* openGenome(const std::string& name) const = 0;
72
75 virtual Genome* openGenome(const std::string& name) = 0;
76
80 virtual void closeGenome(const Genome* genome) const = 0;
81
83 virtual std::string getRootName() const = 0;
84
87 virtual std::string getParentName(const std::string& name) const = 0;
88
92 virtual double getBranchLength(const std::string& parentName,
93 const std::string& childName) const = 0;
94
98 virtual void updateBranchLength(const std::string& parentName,
99 const std::string& childName,
100 double length) = 0;
101
104 virtual std::vector<std::string>
105 getChildNames(const std::string& name) const= 0;
106
109 virtual std::vector<std::string>
110 getLeafNamesBelow(const std::string& name) const = 0;
111
114 virtual hal_size_t getNumGenomes() const = 0;
115
117 virtual MetaData* getMetaData() = 0;
118
120 virtual const MetaData* getMetaData() const = 0;
121
123 virtual std::string getNewickTree() const = 0;
124
126 virtual std::string getVersion() const = 0;
127
128 protected:
129 friend class counted_ptr<Alignment>;
130 friend class counted_ptr<const Alignment>;
132 virtual ~Alignment() = 0;
133 };
134
135 inline Alignment::~Alignment() {}
136 }
137 #endif
hal::Alignment::getLeafNamesBelow
virtual std::vector< std::string > getLeafNamesBelow(const std::string &name) const =0
hal::Alignment::~Alignment
virtual ~Alignment()=0
Definition: halAlignment.h:135
hal::Alignment::getRootName
virtual std::string getRootName() const =0
hal::Genome
Definition: halGenome.h:24
hal::Alignment::addLeafGenome
virtual Genome * addLeafGenome(const std::string &name, const std::string &parentName, double branchLength)=0
hal::Alignment::removeGenome
virtual void removeGenome(const std::string &name)=0
hal::Alignment::open
virtual void open(const std::string &alignmentPath, bool readOnly)=0
hal::Alignment::createNew
virtual void createNew(const std::string &alignmentPath)=0
hal::MetaData
Definition: halMetaData.h:21
hal::Alignment::close
virtual void close()=0
hal::Alignment::getMetaData
virtual MetaData * getMetaData()=0
hal::Alignment::addRootGenome
virtual Genome * addRootGenome(const std::string &name, double branchLength=0)=0
hal::Alignment::getBranchLength
virtual double getBranchLength(const std::string &parentName, const std::string &childName) const =0
hal::Alignment::getNewickTree
virtual std::string getNewickTree() const =0
hal::Alignment::updateBranchLength
virtual void updateBranchLength(const std::string &parentName, const std::string &childName, double length)=0
hal::Alignment::getNumGenomes
virtual hal_size_t getNumGenomes() const =0
hal::Alignment::closeGenome
virtual void closeGenome(const Genome *genome) const =0
hal::Alignment::openGenome
virtual const Genome * openGenome(const std::string &name) const =0
hal::Alignment::getChildNames
virtual std::vector< std::string > getChildNames(const std::string &name) const =0
hal::Alignment::getVersion
virtual std::string getVersion() const =0
hal::Alignment
Definition: halAlignment.h:21
hal::Alignment::getParentName
virtual std::string getParentName(const std::string &name) const =0
hal::Alignment::setOptionsFromParser
virtual void setOptionsFromParser(CLParserConstPtr parser) const =0