GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"MOTHUR_FILES=\"\\\"../release\\\"\"",
- "VERSION=\"\\\"1.18.1\\\"\"",
- "RELEASE_DATE=\"\\\"4/15/2011\\\"\"",
+ "VERSION=\"\\\"1.19.0\\\"\"",
+ "RELEASE_DATE=\"\\\"5/9/2011\\\"\"",
);
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_MODEL_TUNING = "";
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
- "VERSION=\"\\\"1.18.1\\\"\"",
- "RELEASE_DATE=\"\\\"4/15/2011\\\"\"",
+ "VERSION=\"\\\"1.19.0\\\"\"",
+ "RELEASE_DATE=\"\\\"5/9/2011\\\"\"",
);
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
m->openInputFile(fastafile, in);
string name;
- ofstream out;
- string newFastaName = outputDir + m->getRootName(m->getSimpleName(fastafile)) + "numsAdded.fasta";
- m->openOutputFile(newFastaName, out);
- int count = 1;
- string lastName = "";
+ //ofstream out;
+ //string newFastaName = outputDir + m->getRootName(m->getSimpleName(fastafile)) + "numsAdded.fasta";
+ //m->openOutputFile(newFastaName, out);
+ //int count = 1;
+ //string lastName = "";
while(!in.eof()){
Sequence currSeq(in);
name = currSeq.getName();
- if (lastName == "") { lastName = name; }
- if (name != lastName) { count = 1; }
- lastName = name;
+ //if (lastName == "") { lastName = name; }
+ //if (name != lastName) { count = 1; }
+ // lastName = name;
- Sequence newSeq(name+"_"+toString(count), currSeq.getAligned());
- newSeq.printSequence(out);
+ //Sequence newSeq(name+"_"+toString(count), currSeq.getAligned());
+ //newSeq.printSequence(out);
if (name != "") { names.push_back(name); }
m->gobble(in);
- count++;
+ //count++;
}
in.close();
- out.close();
+ //out.close();
return 0;
string line = "";
- while (!fileHandle.eof()) {
+ while (fileHandle) {
//get next character
char c = fileHandle.get();
//are you at the end of the line
- if ((c == '\n') || (c == '\r') || (c == '\f')){ break; }
+ if ((c == '\n') || (c == '\r') || (c == '\f') || (c == EOF)){ break; }
else { line += c; }
}
int end = windowSize;
int start = 0;
-
+
if(seqLength < windowSize) { return 0; }
while(start < seqLength){
if(end == -1){ end = seqLength; }
+ //failed first window
+ if (end < windowSize) { return 0; }
+
sequence.setUnaligned(rawSequence.substr(0,end));
trimQScores(-1, end);
for (int i = 0; i < numGroups; i++) {
string options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(processors) + ", cutoff=" + toString(distCutoff);
+ if (outputDir != "") { options += ", outputdir=" + outputDir; }
Command* command = new DistanceCommand(options);
int currentSeqsDiffs = 0;
Sequence currSeq(inFASTA); m->gobble(inFASTA);
-
+
QualityScores currQual;
if(qFileName != ""){
currQual = QualityScores(qFile); m->gobble(qFile);
else if(qRollAverage != 0) { success = currQual.stripQualRollingAverage(currSeq, qRollAverage); }
else if(qWindowAverage != 0){ success = currQual.stripQualWindowAverage(currSeq, qWindowStep, qWindowSize, qWindowAverage); }
else { success = 1; }
-
+
//you don't want to trim, if it fails above then scrap it
if ((!qtrim) && (origLength != currSeq.getNumBases())) { success = 0; }