]> git.donarmstrong.com Git - mothur.git/blob - pairwiseseqscommand.h
working on citations
[mothur.git] / pairwiseseqscommand.h
1 #ifndef PAIRWISESEQSCOMMAND_H
2 #define PAIRWISESEQSCOMMAND_H
3
4 /*
5  *  pairwiseseqscommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 10/20/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "database.hpp"
16 #include "alignment.hpp"
17 #include "validcalculator.h"
18 #include "dist.h"
19 #include "sequencedb.h"
20
21 class PairwiseSeqsCommand : public Command {
22         
23 public:
24         PairwiseSeqsCommand(string);    
25         PairwiseSeqsCommand();
26         ~PairwiseSeqsCommand() {}
27         
28         vector<string> setParameters();
29         string getCommandName()                 { return "pairwise.seqs";               }
30         string getCommandCategory()             { return "Sequence Processing"; }
31         string getHelpString(); 
32         string getCitation() { return "Needleman SB, Wunsch CD (1970). A general method applicable to the search for similarities in the amino acid sequence of two proteins. J Mol Biol 48: 443-53. [ for needleman ]\nGotoh O (1982). An improved algorithm for matching biological sequences. J Mol Biol 162: 705-8. [ for gotoh ] \nhttp://www.mothur.org/wiki/Pairwise.seqs"; }
33         
34         int execute(); 
35         void help() { m->mothurOut(getHelpString()); }  
36         
37 private:
38         struct distlinePair {
39                 int start;
40                 int end;
41         };
42         
43         vector<int> processIDS;   //end line, processid
44         vector<distlinePair> lines;
45         
46         Alignment* alignment;
47         Dist* distCalculator;
48         SequenceDB alignDB;
49         
50         void createProcesses(string);
51         int driver(int, int, string, float);
52         int driver(int, int, string, string);
53         
54         #ifdef USE_MPI 
55         int driverMPI(int, int, MPI_File&, float);
56         int driverMPI(int, int, string, unsigned long int&);
57         int driverMPI(int, int, string, unsigned long int&, string);
58         #endif
59         
60         string fastaFileName, align, calc, outputDir, output;
61         float match, misMatch, gapOpen, gapExtend, cutoff;
62         int processors;
63         vector<string> fastaFileNames, Estimators;
64         vector<string> outputNames;
65         
66         bool abort, countends, compress;
67 };
68
69 #endif
70