]> git.donarmstrong.com Git - mothur.git/blob - aligncommand.h
added command descriptions
[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         string getDescription()         { return "align sequences"; }
32         
33         int execute(); 
34         void help() { m->mothurOut(getHelpString()); }  
35         
36 private:
37         struct linePair {
38                 unsigned long int start;
39                 unsigned long int end;
40                 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
41         };
42         vector<int> processIDS;   //processid
43         vector<linePair*> lines;
44         bool MPIWroteAccnos;
45         
46         AlignmentDB* templateDB;
47         Alignment* alignment;
48         
49         int driver(linePair*, string, string, string, string);
50         int createProcesses(string, string, string, string);
51         void appendAlignFiles(string, string); 
52         void appendReportFiles(string, string);
53         
54         #ifdef USE_MPI
55         int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
56         #endif
57         
58         string candidateFileName, templateFileName, distanceFileName, search, align, outputDir;
59         float match, misMatch, gapOpen, gapExtend, threshold;
60         int processors, kmerSize;
61         vector<string> candidateFileNames;
62         vector<string> outputNames;
63         
64         bool abort, flip, calledHelp;
65
66 };
67
68 #endif