objects = {
/* Begin PBXFileReference section */
+ 7E13BDD112BE3FEE004B8A53 /* reportfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = reportfile.h; sourceTree = "<group>"; };
+ 7E13BDD212BE3FEF004B8A53 /* reportfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = reportfile.cpp; sourceTree = "<group>"; };
7E4EBD43122018FB00D85E7B /* simpsoneven.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simpsoneven.h; sourceTree = "<group>"; };
7E4EBD44122018FB00D85E7B /* simpsoneven.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = simpsoneven.cpp; sourceTree = "<group>"; };
7E5B28DC121FEFCC0005339C /* shannoneven.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shannoneven.h; sourceTree = "<group>"; };
A7DA2174113FECD400BF472F /* validparameter.h */,
A7DA2175113FECD400BF472F /* venn.cpp */,
A7DA2176113FECD400BF472F /* venn.h */,
+ 7E13BDD112BE3FEE004B8A53 /* reportfile.h */,
+ 7E13BDD212BE3FEF004B8A53 /* reportfile.cpp */,
);
name = mothur;
sourceTree = "<group>";
if (m->control_pressed) { return 0; }
Sequence* candidateSeq = new Sequence(inFASTA); m->gobble(inFASTA);
-
+ report.setCandidate(candidateSeq);
+
int origNumBases = candidateSeq->getNumBases();
string originalUnaligned = candidateSeq->getUnaligned();
int numBasesNeeded = origNumBases * threshold;
accnosFile << candidateSeq->getName() << wasBetter << endl;
}
- report.setCandidate(candidateSeq);
report.setTemplate(templateSeq);
report.setSearchParameters(search, searchScore);
report.setAlignmentParameters(align, alignment);
istringstream iss (tempBuf,istringstream::in);
Sequence* candidateSeq = new Sequence(iss);
-
+ report.setCandidate(candidateSeq);
+
int origNumBases = candidateSeq->getNumBases();
string originalUnaligned = candidateSeq->getUnaligned();
int numBasesNeeded = origNumBases * threshold;
MPIWroteAccnos = true;
}
- report.setCandidate(candidateSeq);
report.setTemplate(templateSeq);
report.setSearchParameters(search, searchScore);
report.setAlignmentParameters(align, alignment);
seqLength = l;
int score;
- //string line;
- //m->getline(qFile, line);
- //istringstream nameStream(line);
-
qFile >> seqName;
+
while (!qFile.eof()) { char c = qFile.get(); if (c == 10 || c == 13 || c == -1){ break; } } // get rest of line
m->gobble(qFile);
if (seqName == "") { m->mothurOut("Error reading quality file, name blank at position, " + toString(qFile.tellg())); m->mothurOutEndLine(); }
}
/**************************************************************************************************/
-/**************************************************************************************************/
-
string QualityScores::getName(){
try {
qScores = hold;
}
if(start == -1){
- hold = vector<int>(qScores.begin(), qScores.begin()+end); //not sure if indexing is correct
- qScores = hold;
+ if(qScores.size() > end){
+ hold = vector<int>(qScores.begin(), qScores.begin()+end);
+ qScores = hold;
+ }
}
seqLength = qScores.size();
int end = windowSize;
int start = 0;
-
+ if(seqLength < windowSize) { return 0; }
+
while(start < seqLength){
double windowSum = 0.0000;
}
/**************************************************************************************************/
+
+void QualityScores::updateQScoreErrorMap(map<char, vector<int> >& qualErrorMap, string errorSeq, int start, int stop, int weight){
+ try {
+
+ for(int i=start-1;i<stop;i++){
+
+ if(errorSeq[i] == 'm') { qualErrorMap['m'][qScores[i]] += weight; }
+ else if(errorSeq[i] == 's') { qualErrorMap['s'][qScores[i]] += weight; }
+ else if(errorSeq[i] == 'i') { qualErrorMap['i'][qScores[i]] += weight; }
+ else if(errorSeq[i] == 'a') { qualErrorMap['a'][qScores[i]] += weight; }
+ else if(errorSeq[i] == 'd') { /* nothing */ }
+
+ }
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TrimSeqsCommand", "updateQScoreErrorMap");
+ exit(1);
+ }
+}
+
+/**************************************************************************************************/
bool stripQualRollingAverage(Sequence&, double);
bool stripQualWindowAverage(Sequence&, int, int, double);
bool cullQualAverage(Sequence&, double);
+ void updateQScoreErrorMap(map<char, vector<int> >&, string, int, int, int);
private:
double calculateAverage();
--- /dev/null
+/*
+ * reportfile.cpp
+ * Mothur
+ *
+ * Created by Pat Schloss on 12/19/10.
+ * Copyright 2010 Schloss Lab. All rights reserved.
+ *
+ */
+
+#include "reportfile.h"
+
+/**************************************************************************************************/
+
+ReportFile::ReportFile(){
+ try {
+ m = MothurOut::getInstance();
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ReportFile", "ReportFile");
+ exit(1);
+ }
+}
+
+/**************************************************************************************************/
+
+ReportFile::ReportFile(ifstream& repFile, string repFileName){
+ try {
+ m = MothurOut::getInstance();
+
+ m->openInputFile(repFileName, repFile);
+ m->getline(repFile);
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ReportFile", "ReportFile");
+ exit(1);
+ }
+}
+
+
+/**************************************************************************************************/
+
+ReportFile::ReportFile(ifstream& repFile){
+ try {
+
+ m = MothurOut::getInstance();
+
+ repFile >> queryName;
+ repFile >> queryLength;
+ repFile >> templateName;
+ repFile >> templateLength;
+ repFile >> searchMethod;
+ repFile >> searchScore;
+ repFile >> alignmentMethod;
+ repFile >> queryStart;
+ repFile >> queryEnd;
+ repFile >> templateStart;
+ repFile >> templateEnd;
+ repFile >> pairwiseAlignmentLength;
+ repFile >> gapsInQuery;
+ repFile >> gapsInTemplate;
+ repFile >> longestInsert;
+ repFile >> simBtwnQueryAndTemplate;
+
+ m->gobble(repFile);
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ReportFile", "ReportFile");
+ exit(1);
+ }
+
+}
+
+/**************************************************************************************************/
--- /dev/null
+#ifndef REPORTFILE
+#define REPORTFILE
+
+/*
+ * reportfile.h
+ * Mothur
+ *
+ * Created by Pat Schloss on 7/12/10.
+ * Copyright 2010 Schloss Lab. All rights reserved.
+ *
+ */
+
+
+#include "mothur.h"
+#include "mothurout.h"
+
+/**************************************************************************************************/
+
+class ReportFile {
+public:
+ ReportFile();
+ ReportFile(ifstream&);
+ ReportFile(ifstream&, string);
+
+ string getQueryName() { return queryName; }
+ string getTemplateName() { return templateName; }
+ string getSearchMethod() { return searchMethod; }
+ string getAlignmentMethod() { return alignmentMethod; }
+
+ int getQueryLength() { return queryLength; }
+ int getTemplateLength() { return templateLength; }
+ int getQueryStart() { return queryStart; }
+ int getQueryEnd() { return queryEnd; }
+ int getTemplateStart() { return templateStart; }
+ int getTemplateEnd() { return templateEnd; }
+ int getPairwiseAlignmentLength() { return pairwiseAlignmentLength; }
+ int getGapsInQuery() { return gapsInQuery; }
+ int getGapsInTemplate() { return gapsInTemplate; }
+ int getLongestInsert() { return longestInsert; }
+
+ float getSearchScore() { return searchScore; }
+ float getSimBtwnQueryAndTemplate() { return simBtwnQueryAndTemplate; }
+
+
+private:
+
+ MothurOut* m;
+
+ string queryName, templateName, searchMethod, alignmentMethod;
+ int queryLength, templateLength, queryStart, queryEnd, templateStart, templateEnd, pairwiseAlignmentLength, gapsInQuery, gapsInTemplate, longestInsert;
+ float searchScore, simBtwnQueryAndTemplate;
+
+};
+
+/**************************************************************************************************/
+
+#endif
*/
#include "seqerrorcommand.h"
+#include "reportfile.h"
+#include "qualityscores.h"
//**********************************************************************************************************************
vector<string> SeqErrorCommand::getValidParameters(){
try {
- string Array[] = {"query", "reference", "name", "threshold", "inputdir", "outputdir"};
+ string Array[] = {"query", "reference", "name", "qfile", "report", "threshold", "inputdir", "outputdir"};
vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
return myArray;
}
string temp;
//valid paramters for this command
- string AlignArray[] = {"query", "reference", "name", "threshold", "inputdir", "outputdir"};
+ string AlignArray[] = {"query", "reference", "name", "qfile", "report", "threshold", "inputdir", "outputdir"};
//need to implement name file option
}
it = parameters.find("name");
- //user has given a template file
+ //user has given a names file
if(it != parameters.end()){
path = m->hasPath(it->second);
//if the user has not given a path then, add inputdir. else leave path alone.
if (path == "") { parameters["name"] = inputDir + it->second; }
}
+
+ it = parameters.find("qfile");
+ //user has given a quality score file
+ if(it != parameters.end()){
+ path = m->hasPath(it->second);
+ //if the user has not given a path then, add inputdir. else leave path alone.
+ if (path == "") { parameters["qfile"] = inputDir + it->second; }
+ }
+
+ it = parameters.find("report");
+ //user has given a alignment report file
+ if(it != parameters.end()){
+ path = m->hasPath(it->second);
+ //if the user has not given a path then, add inputdir. else leave path alone.
+ if (path == "") { parameters["report"] = inputDir + it->second; }
+ }
}
//check for required parameters
if (referenceFileName == "not found") { m->mothurOut("reference is a required parameter for the seq.error command."); m->mothurOutEndLine(); abort = true; }
else if (referenceFileName == "not open") { abort = true; }
- //if the user changes the output directory command factory will send this info to us in the output parameter
+
+ //check for optional parameters
namesFileName = validParameter.validFile(parameters, "name", true);
if(namesFileName == "not found"){ namesFileName = ""; }
- cout << namesFileName << endl;
+
+ qualFileName = validParameter.validFile(parameters, "qfile", true);
+ if(qualFileName == "not found"){ qualFileName = ""; }
+
+ reportFileName = validParameter.validFile(parameters, "report", true);
+ if(reportFileName == "not found"){ reportFileName = ""; }
+
+ if((reportFileName != "" && qualFileName == "") || (reportFileName == "" && qualFileName != "")){
+ m->mothurOut("if you use either a qual file or a report file, you have to have both.");
+ m->mothurOutEndLine();
+ abort = true;
+ }
+
+
outputDir = validParameter.validFile(parameters, "outputdir", false);
if (outputDir == "not found"){
ifstream queryFile;
m->openInputFile(queryFileName, queryFile);
-
+
+ ifstream reportFile;
+ ifstream qualFile;
+
+ ReportFile report;
+ QualityScores quality;
+
+ if(qualFileName != "" && reportFileName != ""){
+ m->openInputFile(qualFileName, qualFile);
+ report = ReportFile(reportFile, reportFileName);
+ }
+
int totalBases = 0;
int totalMatches = 0;
int numSeqs = 0;
map<string, int>::iterator it;
+ map<char, vector<int> > qScoreErrorMap;
+ qScoreErrorMap['m'].assign(41, 0);
+ qScoreErrorMap['s'].assign(41, 0);
+ qScoreErrorMap['i'].assign(41, 0);
+ qScoreErrorMap['a'].assign(41, 0);
while(queryFile){
Compare minCompare;
-
Sequence query(queryFile);
for(int i=0;i<numRefs;i++){
if(currCompare.errorRate < minCompare.errorRate){
minCompare = currCompare;
}
-
}
if(namesFileName != ""){
it = weights.find(query.getName());
minCompare.weight = it->second;
}
- else {
- minCompare.weight = 1;
- }
+ else { minCompare.weight = 1; }
printErrorData(minCompare);
+ if(qualFileName != "" && reportFileName != ""){
+ report = ReportFile(reportFile);
+
+ int origLength = report.getQueryLength();
+ int startBase = report.getQueryStart();
+ int endBase = report.getQueryEnd();
+
+ quality = QualityScores(qualFile, origLength);
+ quality.updateQScoreErrorMap(qScoreErrorMap, minCompare.sequence, startBase, endBase, minCompare.weight);
+ }
+
if(minCompare.errorRate < threshold){
totalBases += (minCompare.total * minCompare.weight);
totalMatches += minCompare.matches * minCompare.weight;
numSeqs++;
}
+
}
queryFile.close();
int total = 0;
+ if(qualFileName != "" && reportFileName != ""){
+ string errorQualityFileName = queryFileName.substr(0,queryFileName.find_last_of('.')) + ".error.quality";
+ ofstream errorQualityFile;
+ m->openOutputFile(errorQualityFileName, errorQualityFile);
+ outputNames.push_back(errorQualityFileName); outputTypes["error.quality"].push_back(errorQualityFileName);
+
+ errorQualityFile << "qscore\tmatches\tsubstitutions\tinsertions\tambiguous" << endl;
+ for(int i=0;i<41;i++){
+ errorQualityFile << i << '\t' << qScoreErrorMap['m'][i] << '\t' << qScoreErrorMap['s'][i] << '\t' << qScoreErrorMap['i'][i] << '\t'<< qScoreErrorMap['a'][i] << endl;
+ }
+ }
string errorCountFileName = queryFileName.substr(0,queryFileName.find_last_of('.')) + ".error.count";
ofstream errorCountFile;
void printErrorHeader();
void printErrorData(Compare);
- string queryFileName, referenceFileName, namesFileName, errorSummaryFileName, errorSeqFileName, outputDir;
+ string queryFileName, referenceFileName, qualFileName, reportFileName, namesFileName, errorSummaryFileName, errorSeqFileName, outputDir;
double threshold;
int numRefs;
ofstream errorSummaryFile, errorSeqFile;
aligned = temp;
}
-/**************************************************************************************************/
+
+//********************************************************************************************************************
+
+void Sequence::trim(int length){
+
+ if(numBases > length){
+ unaligned = unaligned.substr(0,length);
+ numBases = length;
+ }
+
+}
+
+///**************************************************************************************************/
void setAligned(string);
void setLength();
void reverseComplement();
+ void trim(int);
string convert2ints();
string getName();
vector<string> TrimSeqsCommand::getValidParameters(){
try {
string Array[] = {"fasta", "flip", "oligos", "maxambig", "maxhomop", "group","minlength", "maxlength", "qfile",
- "qthreshold", "qwindowaverage", "qstepsize", "qwindowsize", "qaverage", "rollaverage", "allfiles", "qtrim","tdiffs", "pdiffs", "bdiffs", "processors", "outputdir","inputdir"};
+ "qthreshold", "qwindowaverage", "qstepsize", "qwindowsize", "qaverage", "rollaverage",
+ "keepfirst", "removelast",
+ "allfiles", "qtrim","tdiffs", "pdiffs", "bdiffs", "processors", "outputdir","inputdir"};
vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
return myArray;
}
else {
//valid paramters for this command
- string AlignArray[] = {"fasta", "flip", "group","oligos", "maxambig", "maxhomop", "minlength", "maxlength", "qfile",
- "qthreshold", "qwindowaverage", "qstepsize", "qwindowsize", "qaverage", "rollaverage", "allfiles", "qtrim","tdiffs", "pdiffs", "bdiffs", "processors", "outputdir","inputdir"};
+ string AlignArray[] = { "fasta", "flip", "oligos", "maxambig", "maxhomop", "group","minlength", "maxlength", "qfile",
+ "qthreshold", "qwindowaverage", "qstepsize", "qwindowsize", "qaverage", "rollaverage",
+ "keepfirst", "removelast",
+ "allfiles", "qtrim","tdiffs", "pdiffs", "bdiffs", "processors", "outputdir","inputdir"};
vector<string> myArray (AlignArray, AlignArray+(sizeof(AlignArray)/sizeof(string)));
temp = validParameter.validFile(parameters, "qwindowaverage", false);if (temp == "not found") { temp = "0"; }
convert(temp, qWindowAverage);
- temp = validParameter.validFile(parameters, "qwindowsize", false); if (temp == "not found") { temp = "100"; }
+ temp = validParameter.validFile(parameters, "qwindowsize", false); if (temp == "not found") { temp = "50"; }
convert(temp, qWindowSize);
- temp = validParameter.validFile(parameters, "qstepsize", false); if (temp == "not found") { temp = "10"; }
+ temp = validParameter.validFile(parameters, "qstepsize", false); if (temp == "not found") { temp = "1"; }
convert(temp, qWindowStep);
temp = validParameter.validFile(parameters, "qaverage", false); if (temp == "not found") { temp = "0"; }
convert(temp, qAverage);
+
+ temp = validParameter.validFile(parameters, "keepfirst", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, keepFirst);
+
+ temp = validParameter.validFile(parameters, "removelast", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, removeLast);
temp = validParameter.validFile(parameters, "allfiles", false); if (temp == "not found") { temp = "F"; }
allFiles = m->isTrue(temp);
outputNames.push_back(groupFile); outputTypes["group"].push_back(groupFile);
getOligos(fastaFileNames, qualFileNames);
}
-
+
vector<unsigned long int> fastaFilePos;
vector<unsigned long int> qFilePos;
string trashCode = "";
int currentSeqsDiffs = 0;
- if(qFileName != ""){
- if(qThreshold != 0) { success = currQual.stripQualThreshold(currSeq, qThreshold); }
- else if(qAverage != 0) { success = currQual.cullQualAverage(currSeq, qAverage); }
- else if(qRollAverage != 0) { success = currQual.stripQualRollingAverage(currSeq, qRollAverage); }
- else if(qWindowAverage != 0){ success = currQual.stripQualWindowAverage(currSeq, qWindowStep, qWindowSize, qWindowAverage); }
-
- if (qtrim == 1 && (origSeq.length() != currSeq.getUnaligned().length())) {
- success = 0; //if you don't want to trim and the sequence does not meet quality requirements, move to scrap
- }
-
- if(!success) { trashCode += 'q'; }
- }
-
if(barcodes.size() != 0){
success = stripBarcode(currSeq, currQual, groupBar);
if(success > bdiffs) { trashCode += 'b'; }
else{ currentSeqsDiffs += success; }
}
-
+
if(numFPrimers != 0){
success = stripForward(currSeq, currQual, groupPrime);
if(success > pdiffs) { trashCode += 'f'; }
}
if (currentSeqsDiffs > tdiffs) { trashCode += 't'; }
-
+
if(numRPrimers != 0){
success = stripReverse(currSeq, currQual);
if(!success) { trashCode += 'r'; }
}
+
+ if(keepFirst != 0){
+ success = keepFirstTrim(currSeq, currQual);
+ }
+
+ if(removeLast != 0){
+ success = removeLastTrim(currSeq, currQual);
+ if(!success) { trashCode += 'l'; }
+ }
+
+
+ if(qFileName != ""){
+
+ if(qThreshold != 0) { success = currQual.stripQualThreshold(currSeq, qThreshold); }
+ else if(qAverage != 0) { success = currQual.cullQualAverage(currSeq, qAverage); }
+ else if(qRollAverage != 0) { success = currQual.stripQualRollingAverage(currSeq, qRollAverage); }
+ else if(qWindowAverage != 0){ success = currQual.stripQualWindowAverage(currSeq, qWindowStep, qWindowSize, qWindowAverage); }
+ else { success = 1; }
+
+// if (qtrim == 1 && (origSeq.length() != currSeq.getUnaligned().length())) {
+// success = 0; //if you don't want to trim and the sequence does not meet quality requirements, move to scrap
+// }
+
+ if(!success) { trashCode += 'q'; }
+ }
if(minLength > 0 || maxLength > 0){
success = cullLength(currSeq);
if(!success) { trashCode += 'n'; }
}
- if(flip){ currSeq.reverseComplement(); currQual.flipQScores(); } // should go last
+ if(flip){ // should go last
+ currSeq.reverseComplement();
+ currQual.flipQScores();
+ }
if(trashCode.length() == 0){
currSeq.setAligned(currSeq.getUnaligned());
seq.setUnaligned(rawSequence.substr(oligo.length()));
if(qual.getName() != ""){
qual.trimQScores(oligo.length(), -1);
-
}
success = 0;
break;
//***************************************************************************************************************
+bool TrimSeqsCommand::keepFirstTrim(Sequence& sequence, QualityScores& qscores){
+ try {
+ bool success = 1;
+ if(qscores.getName() != ""){
+ qscores.trimQScores(-1, keepFirst);
+ }
+ sequence.trim(keepFirst);
+ return success;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "keepFirstTrim", "countDiffs");
+ exit(1);
+ }
+
+}
+
+//***************************************************************************************************************
+
+bool TrimSeqsCommand::removeLastTrim(Sequence& sequence, QualityScores& qscores){
+ try {
+ bool success = 0;
+
+ int length = sequence.getNumBases() - removeLast;
+
+ if(length > 0){
+ if(qscores.getName() != ""){
+ qscores.trimQScores(-1, length);
+ }
+ sequence.trim(length);
+ success = 1;
+ }
+ else{
+ success = 0;
+ }
+
+ return success;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "removeLastTrim", "countDiffs");
+ exit(1);
+ }
+
+}
+
+//***************************************************************************************************************
+
bool TrimSeqsCommand::cullLength(Sequence& seq){
try {
}
}
-//***************************************************************************************************************
-
-//bool TrimSeqsCommand::stripQualThreshold(Sequence& seq, ifstream& qFile){
-// try {
-//
-// string rawSequence = seq.getUnaligned();
-// int seqLength = seq.getNumBases();
-// bool success = 0; //guilty until proven innocent
-// string name;
-//
-// qFile >> name;
-// if (name[0] == '>') { if(name.substr(1) != seq.getName()) { m->mothurOut("sequence name mismatch btwn fasta: " + seq.getName() + " and qual file: " + name); m->mothurOutEndLine(); } }
-//
-// while (!qFile.eof()) { char c = qFile.get(); if (c == 10 || c == 13){ break; } }
-//
-// int score;
-// int end = seqLength;
-//
-// for(int i=0;i<seqLength;i++){
-// qFile >> score;
-//
-// if(score < qThreshold){
-// end = i;
-// break;
-// }
-// }
-// for(int i=end+1;i<seqLength;i++){
-// qFile >> score;
-// }
-//
-// seq.setUnaligned(rawSequence.substr(0,end));
-//
-// return 1;
-// }
-// catch(exception& e) {
-// m->errorOut(e, "TrimSeqsCommand", "stripQualThreshold");
-// exit(1);
-// }
-//}
-
-//***************************************************************************************************************
-
-//bool TrimSeqsCommand::cullQualAverage(Sequence& seq, ifstream& qFile){
-// try {
-// string rawSequence = seq.getUnaligned();
-// int seqLength = seq.getNumBases();
-// bool success = 0; //guilty until proven innocent
-// string name;
-//
-// qFile >> name;
-// if (name[0] == '>') { if(name.substr(1) != seq.getName()) { m->mothurOut("sequence name mismatch btwn fasta: " + seq.getName() + " and qual file: " + name); m->mothurOutEndLine(); } }
-//
-// while (!qFile.eof()) { char c = qFile.get(); if (c == 10 || c == 13){ break; } }
-//
-// float score;
-// float average = 0;
-//
-// for(int i=0;i<seqLength;i++){
-// qFile >> score;
-// average += score;
-// }
-// average /= seqLength;
-//
-// if(average >= qAverage) { success = 1; }
-// else { success = 0; }
-//
-// return success;
-// }
-// catch(exception& e) {
-// m->errorOut(e, "TrimSeqsCommand", "cullQualAverage");
-// exit(1);
-// }
-//}
//***************************************************************************************************************
int stripBarcode(Sequence&, QualityScores&, int&);
int stripForward(Sequence&, QualityScores&, int&);
bool stripReverse(Sequence&, QualityScores&);
+ bool keepFirstTrim(Sequence&, QualityScores&);
+ bool removeLastTrim(Sequence&, QualityScores&);
+
bool cullLength(Sequence&);
bool cullHomoP(Sequence&);
bool cullAmbigs(Sequence&);
bool flip, allFiles, qtrim;
int numFPrimers, numRPrimers, maxAmbig, maxHomoP, minLength, maxLength, processors, tdiffs, bdiffs, pdiffs, comboStarts;
- int qWindowSize, qWindowStep;
+ int qWindowSize, qWindowStep, keepFirst, removeLast;
double qRollAverage, qThreshold, qWindowAverage, qAverage;
vector<string> revPrimer, outputNames;
set<string> filesToRemove;