1 #ifndef TRIMSEQSCOMMAND_H
2 #define TRIMSEQSCOMMAND_H
8 * Created by Pat Schloss on 6/6/09.
9 * Copyright 2009 Patrick D. Schloss. All rights reserved.
14 #include "command.hpp"
15 #include "sequence.hpp"
16 #include "qualityscores.h"
19 class TrimSeqsCommand : public Command {
21 TrimSeqsCommand(string);
25 vector<string> setParameters();
26 string getCommandName() { return "trim.seqs"; }
27 string getCommandCategory() { return "Sequence Processing"; }
28 string getHelpString();
29 string getCitation() { return "http://www.mothur.org/wiki/Trim.seqs"; }
30 string getDescription() { return "provides the preprocessing features needed to screen and sort pyrosequences"; }
33 void help() { m->mothurOut(getHelpString()); }
40 unsigned long long start;
41 unsigned long long end;
42 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
45 bool getOligos(vector<vector<string> >&, vector<vector<string> >&, vector<vector<string> >&);
46 bool keepFirstTrim(Sequence&, QualityScores&);
47 bool removeLastTrim(Sequence&, QualityScores&);
48 bool cullLength(Sequence&);
49 bool cullHomoP(Sequence&);
50 bool cullAmbigs(Sequence&);
52 bool abort, createGroup;
53 string fastaFile, oligoFile, qFileName, groupfile, nameFile, outputDir;
55 bool flip, allFiles, qtrim;
56 int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts;
57 int qWindowSize, qWindowStep, keepFirst, removeLast;
58 double qRollAverage, qThreshold, qWindowAverage, qAverage;
59 vector<string> revPrimer, outputNames;
60 set<string> filesToRemove;
61 map<string, int> barcodes;
62 vector<string> groupVector;
63 map<string, int> primers;
64 map<string, int> combos;
65 map<string, int> groupToIndex;
66 vector<string> primerNameVector; //needed here?
67 vector<string> barcodeNameVector; //needed here?
68 map<string, int> groupCounts;
69 map<string, string> nameMap;
71 vector<int> processIDS; //processid
72 vector<linePair*> lines;
73 vector<linePair*> qLines;
75 int driverCreateTrim(string, string, string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, vector<vector<string> >, linePair*, linePair*);
76 int createProcessesCreateTrim(string, string, string, string, string, string, string, string, string, vector<vector<string> >, vector<vector<string> >, vector<vector<string> >);
77 int setLines(string, string, vector<unsigned long long>&, vector<unsigned long long>&);