All Classes Namespaces Functions Pages
halAlignment.h
/*
* Copyright (C) 2012 by Glenn Hickey (hickey@soe.ucsc.edu)
*
* Released under the MIT license, see LICENSE.txt
*/
#ifndef _HALALIGNMENT_H
#define _HALALIGNMENT_H
#include <string>
#include <vector>
#include "halDefs.h"
namespace hal {
class Alignment
{
public:
virtual void createNew(const std::string& alignmentPath) = 0;
virtual void open(const std::string& alignmentPath,
bool readOnly) = 0;
virtual void open(const std::string& alignmentPath) const = 0;
virtual void close() = 0;
virtual void close() const = 0;
virtual void setOptionsFromParser(CLParserConstPtr parser) const = 0;
virtual Genome* addLeafGenome(const std::string& name,
const std::string& parentName,
double branchLength) = 0;
virtual Genome* addRootGenome(const std::string& name,
double branchLength = 0) = 0;
virtual void removeGenome(const std::string& name) = 0;
virtual const Genome* openGenome(const std::string& name) const = 0;
virtual Genome* openGenome(const std::string& name) = 0;
virtual void closeGenome(const Genome* genome) const = 0;
virtual std::string getRootName() const = 0;
virtual std::string getParentName(const std::string& name) const = 0;
virtual double getBranchLength(const std::string& parentName,
const std::string& childName) const = 0;
virtual void updateBranchLength(const std::string& parentName,
const std::string& childName,
double length) = 0;
virtual std::vector<std::string>
getChildNames(const std::string& name) const= 0;
virtual std::vector<std::string>
getLeafNamesBelow(const std::string& name) const = 0;
virtual hal_size_t getNumGenomes() const = 0;
virtual MetaData* getMetaData() = 0;
virtual const MetaData* getMetaData() const = 0;
virtual std::string getNewickTree() const = 0;
virtual std::string getVersion() const = 0;
protected:
friend class counted_ptr<Alignment>;
friend class counted_ptr<const Alignment>;
virtual ~Alignment() = 0;
};
inline Alignment::~Alignment() {}
}
#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