Mac binaries
[jabaws.git] / website / archive / binaries / mac / src / clustalw / src / Clustal.h
1 /**
2  * Author: Mark Larkin
3  *
4  * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
5  */
6 /**
7  * The class Clustal is the main class in the program. It is used by the interactive
8  * menu, command line parser and clustal x to perform the algorithmic part of the
9  * program. 
10  */
11 #ifndef CLUSTAL_H
12 #define CLUSTAL_H
13
14 #include <string>
15 #include "general/clustalw.h"
16 #include "general/utils.h"
17 #include "general/userparams.h"
18 #include "fileInput/FileReader.h"
19 #include "alignment/Alignment.h"
20 #include "alignment/AlignmentOutput.h"
21
22 using namespace std;
23
24 namespace clustalw
25 {
26
27 class Clustal
28 {
29     public:
30         /* Functions */
31         Clustal();
32         void align(string* phylipName, bool createOutput = true);
33         void sequencesAlignToProfile(string* phylipName);
34         void profileAlign(string* p1TreeName, string* p2TreeName);
35         void doGuideTreeOnly(string* phylipName);
36         void doAlignUseOldTree(string* phylipName);        
37         void getHelp(string helpPointer, bool printTitle = false);
38         void getHelp(char helpPointer, bool printTitle = false);
39         void getFullHelp();
40         int sequenceInput(bool append, string *offendingSeq);
41         int profile1Input(string profile1Name = "");
42         int profile2Input(string profile2Name = "");
43         int commandLineReadSeq(int firstSeq);
44         void outputNow();
45         void phylogeneticTree(string* phylip_name, string* clustal_name, string* dist_name,
46                               string* nexus_name, string pimName);
47         void bootstrapTree(string* phylip_name, string* clustal_name, string* nexus_name);
48         Alignment* getAlignmentPtr(){return &alignmentObj;} 
49         void QTcalcLowScoreSegments(LowScoreSegParams* params);
50         void QTcalcWeightsForLowScoreSeg(LowScoreSegParams* params);
51         void QTremoveShortSegments(LowScoreSegParams* params);
52         void QTSetFileNamesForOutput(AlignmentFileNames fileNames);
53         bool QTRealignSelectedRange(AlignmentFileNames fileNames, int beginPos, int endPos,
54                                     bool realignEndGapPen);
55         void test();
56         /* Attributes */
57
58     private:
59         /* Functions */
60         void initInterface();
61         void calcGapPenaltyMask(int prfLength, vector<char>* mask, vector<char>* gapMask);
62         bool useExistingGuideTree(int type, string* phylipName, const string& path);
63         void promptForNewGuideTreeName(int type, string* treeName, const string& path);
64         //bool removeFirstIterate(Alignment* alnPtr, DistMatrix* distMat);
65         /* Attributes */
66         enum{Sequences, Profile1, Profile2};
67         string sequencesMsg, profile1Msg, profile2Msg;
68         string newProfile1TreePrompt, newProfile2TreePrompt;
69         
70         Alignment alignmentObj;
71         string helpFileName;
72         int newSeq;
73         bool checkTree;
74         AlignmentFileNames QTFileNames;
75 };
76 }
77 #endif