8 * Created by Sarah Westcott on 5/15/09.
9 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
14 #include "command.hpp"
15 #include "database.hpp"
16 #include "alignment.hpp"
17 #include "alignmentdb.h"
19 class AlignCommand : public Command {
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"; }
33 void help() { m->mothurOut(getHelpString()); }
37 unsigned long int start;
38 unsigned long int end;
39 linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {}
41 vector<int> processIDS; //processid
42 vector<linePair*> lines;
45 AlignmentDB* templateDB;
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);
54 int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector<unsigned long int>&);
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;
63 bool abort, flip, calledHelp;