]> git.donarmstrong.com Git - mothur.git/blob - aligncommand.h
working on citations
[mothur.git] / aligncommand.h
1 #ifndef ALIGNCOMMAND_H
2 #define ALIGNCOMMAND_H
3
4 /*
5  *  aligncommand.h
6  *  Mothur
7  *
8  *  Created by Sarah Westcott on 5/15/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "command.hpp"
15 #include "database.hpp"
16 #include "alignment.hpp"
17 #include "alignmentdb.h"
18
19 class AlignCommand : public Command {
20         
21 public:
22         AlignCommand(string);   
23         AlignCommand();
24         ~AlignCommand();
25         
26         vector<string> setParameters();
27         string getCommandName()                 { return "align.seqs";                  }
28         string getCommandCategory()             { return "Sequence Processing"; }
29         string getHelpString(); 
30         string getCitation() { return "DeSantis TZ, Jr., Hugenholtz P, Keller K, Brodie EL, Larsen N, Piceno YM, Phan R, Andersen GL (2006). NAST: a multiple sequence alignment server for comparative analysis of 16S rRNA genes. Nucleic Acids Res 34: W394-9.\nSchloss PD (2009). A high-throughput DNA sequence aligner for microbial ecology studies. PLoS ONE 4: e8230.\nSchloss PD (2010). The effects of alignment quality, distance calculation method, sequence filtering, and region on the analysis of 16S rRNA gene-based studies. PLoS Comput Biol 6: e1000844.\nhttp://www.mothur.org/wiki/Align.seqs http://www.mothur.org/wiki/Align.seqs"; }
31         
32         int execute(); 
33         void help() { m->mothurOut(getHelpString()); }  
34         
35 private:
36         struct linePair {
37                 unsigned long int start;
38                 unsigned long int end;
39                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
40         };
41         vector<int> processIDS;   //processid
42         vector<linePair*> lines;
43         bool MPIWroteAccnos;
44         
45         AlignmentDB* templateDB;
46         Alignment* alignment;
47         
48         int driver(linePair*, string, string, string, string);
49         int createProcesses(string, string, string, string);
50         void appendAlignFiles(string, string); 
51         void appendReportFiles(string, string);
52         
53         #ifdef USE_MPI
54         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
55         #endif
56         
57         string candidateFileName, templateFileName, distanceFileName, search, align, outputDir;
58         float match, misMatch, gapOpen, gapExtend, threshold;
59         int processors, kmerSize;
60         vector<string> candidateFileNames;
61         vector<string> outputNames;
62         
63         bool abort, flip, calledHelp;
64
65 };
66
67 #endif