File: fromInstructionFile.h

package info (click to toggle)
fastml 3.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,772 kB
  • sloc: cpp: 48,522; perl: 3,588; ansic: 819; makefile: 386; python: 83; sh: 55
file content (60 lines) | stat: -rw-r--r-- 2,162 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// $Id: fromInstructionFile.h 962 2006-11-07 15:13:34Z privmane $

#ifndef ____FROM_INSTRUCTION__FILE
#define ____FROM_INSTRUCTION__FILE

#include "definitions.h"
#include "tree.h"
#include "stochasticProcess.h"
#include "alphabet.h"
#include "sequenceContainer.h"
#include "someUtil.h"

#include <string>
#include <iostream>
#include <vector>
#include <map>
using namespace std;



class fromInstructionFile {
public:
	explicit fromInstructionFile(const string& instructionFileName);
	void readInstructionFile(const string& str);
	const string&searchStringInLines(const string& key) const;
	bool doesWordExistInLines(const string& key) const;
	const string& searchStringInLines(const string& key, const int index) const;
	bool getIntValueConnectedWithWord(const string& wordToSearch, int & res);
	
	
	
	void setLogFile();
	void getStartingStochasticProcess(vector<stochasticProcess>& spPtrVec,VVdouble* freqs=NULL);
	void getOneStartingStochasticProcess(stochasticProcess& sp, Vdouble * freqs = NULL);
	void getOneStartingGammaParameter(stochasticProcess& sp);
	bool getStartingEvolTrees(vector<tree>& vtree);// true if thelist tree1 file1, tree2 file2 is found.
	bool getStartingEvolTrees(vector<tree>& vtree, vector<char>& constraintsOfT0);// true if thelist tree1 file1, tree2 file2 is found.
	tree* getOneStartingEvolTree(vector<char>* constraintsOfT0);// ALOCATE NEW TREE AND NEW CONSTRAINT VECTOR.
	void getStartingSequenceData(vector<sequenceContainer>& sdPtrVec,
		const vector<alphabet* >& _alphabets);
	void getOneStartingSequenceData(sequenceContainer& sdPtrVec,
		const alphabet* _alphabets);
	void getAlphabets(vector<alphabet* >& _alphabets);// alocate with new
					// have to be deleted by the users!
	alphabet* getOneAlphabet();
	bool useGamma() {
		return doesWordExistInLines("gamma");
	}
	void getStartingGammaParameters(vector<stochasticProcess>& spPtrVec);
	void getStartingGlobalRates(vector<stochasticProcess>& spPtrVec);
	string getOutFile();
protected:

    map<string, string> _lines;
	const int _maxNumOfFiles;// = 1000;
	void getStartingGammaParameter(vector<stochasticProcess>& spPtrVec);
//	tree getStartingEvolTree();

};
#endif