outputFiles = (
"$(TARGET_BUILD_DIR)/$(INPUT_FILE_BASE).o",
);
- script = "/usr/local/bin/gfortran -g -m64 -c ${PROJECT_DIR}/${INPUT_FILE_NAME} -o ${TARGET_BUILD_DIR}/${INPUT_FILE_BASE}.o";
+ script = "/usr/local/gfortran/bin/gfortran -g -m64 -c ${PROJECT_DIR}/${INPUT_FILE_NAME} -o ${TARGET_BUILD_DIR}/${INPUT_FILE_BASE}.o";
};
/* End PBXBuildRule section */
if (m->control_pressed) { break; }
Sequence* candidateSeq = new Sequence(inFASTA); m->gobble(inFASTA);
+ cout << candidateSeq->getAligned() << endl;
report.setCandidate(candidateSeq);
int origNumBases = candidateSeq->getNumBases();
//add this bins taxonomy to summary
if (basis == "sequence") {
for(int j = 0; j < names.size(); j++) {
- int numReps = 1;
- if (countfile != "") { numReps = ct->getNumSeqs(names[j]); }
- for(int k = 0; k < numReps; k++) { taxaSum->addSeqToTree(names[j], noConfidenceConTax); }
+ //int numReps = 1;
+ //if (countfile != "") { numReps = ct->getNumSeqs(names[j]); }
+ //for(int k = 0; k < numReps; k++) { taxaSum->addSeqToTree(names[j], noConfidenceConTax); }
+ taxaSum->addSeqToTree(names[j], noConfidenceConTax);
}
}else { //otu
map<string, bool> containsGroup;
if (m->control_pressed) { return 0; }
- string names = lists[0].get(i);
-
- //parse bin
- while (names.find_first_of(',') != -1) {
- string name = names.substr(0,names.find_first_of(','));
- names = names.substr(names.find_first_of(',')+1, names.length());
- littleBins[name] = i;
- }
-
- //get last name
- littleBins[names] = i;
- }
+ string bin = lists[0].get(i);
+ vector<string> names; m->splitAtComma(bin, names);
+ for (int j = 0; j < names.size(); j++) { littleBins[names[j]] = i; }
+ }
ofstream out;
map<string, string> variables;
if (m->control_pressed) { outputTypes.clear(); out.close(); m->mothurRemove(outputFileName); return 0; }
- string names = lists[1].get(i);
+ string binnames = lists[1].get(i);
+ vector<string> names; m->splitAtComma(binnames, names);
+
//output column 1
- if (output == "name") { out << names << '\t'; }
- else { out << i << '\t'; }
+ if (output == "name") { out << binnames << '\t'; }
+ else { out << (i+1) << '\t'; }
map<int, int> bins; //bin numbers in little that are in this bin in big
map<int, int>::iterator it;
//parse bin
- while (names.find_first_of(',') != -1) {
- string name = names.substr(0,names.find_first_of(','));
- names = names.substr(names.find_first_of(',')+1, names.length());
- bins[littleBins[name]] = littleBins[name];
- }
-
- //get last name
- bins[littleBins[names]] = littleBins[names];
+ for (int j = 0; j < names.size(); j++) { bins[littleBins[names[j]]] = littleBins[names[j]]; }
string col2 = "";
for (it = bins.begin(); it != bins.end(); it++) {
m = MothurOut::getInstance();
int score;
- seqName = getSequenceName(qFile);
+ seqName = getSequenceName(qFile); m->gobble(qFile);
if (m->debug) { m->mothurOut("[DEBUG]: name = '" + seqName + "'\n."); }
if (!m->control_pressed) {
- string qScoreString = m->getline(qFile);
+ string qScoreString = m->getline(qFile); m->gobble(qFile);
if (m->debug) { m->mothurOut("[DEBUG]: scores = '" + qScoreString + "'\n."); }
while(qFile.peek() != '>' && qFile.peek() != EOF){
if (m->control_pressed) { break; }
- string temp = m->getline(qFile);
+ string temp = m->getline(qFile); m->gobble(qFile);
if (m->debug) { m->mothurOut("[DEBUG]: scores = '" + temp + "'\n."); }
qScoreString += ' ' + temp;
}
- //cout << "done reading " << endl;
+ //cout << "done reading " << endl;
istringstream qScoreStringStream(qScoreString);
int count = 0;
while(!qScoreStringStream.eof()){
}
seqLength = qScores.size();
- //cout << "seqlength = " << seqLength << '\t' << count << endl;
+ //cout << "seqlength = " << seqLength << endl;
}
catch(exception& e) {
bool abort;
string fastafile, namefile, groupfile, alignreport, outputDir, qualfile, taxonomy, countfile, contigsreport, summaryfile;
- int startPos, endPos, maxAmbig, maxHomoP, minLength, maxLength, processors, criteria, minOverlap, oStart, oEnd, mismatches, maxN, maxInsert;
- float minSim, minScore;
+ int startPos, endPos, maxAmbig, maxHomoP, minLength, maxLength, processors, minOverlap, oStart, oEnd, mismatches, maxN, maxInsert;
+ float minSim, minScore, criteria;
vector<string> outputNames;
vector<string> optimize;
map<string, int> nameMap;
int size = startPosition.size();
//find means
- double meanStartPosition, meanEndPosition, meanSeqLength, meanAmbigBases, meanLongHomoPolymer;
+ unsigned long long meanStartPosition, meanEndPosition, meanSeqLength, meanAmbigBases, meanLongHomoPolymer;
meanStartPosition = 0; meanEndPosition = 0; meanSeqLength = 0; meanAmbigBases = 0; meanLongHomoPolymer = 0;
for (int i = 0; i < size; i++) {
meanStartPosition += startPosition[i];
meanLongHomoPolymer += longHomoPolymer[i];
}
- //this is an int divide so the remainder is lost
- meanStartPosition /= (float) size; meanEndPosition /= (float) size; meanLongHomoPolymer /= (float) size; meanSeqLength /= (float) size; meanAmbigBases /= (float) size;
+ double meanstartPosition, meanendPosition, meanseqLength, meanambigBases, meanlongHomoPolymer;
+
+ meanstartPosition /= (double) size; meanendPosition /= (double) size; meanlongHomoPolymer /= (double) size; meanseqLength /= (double) size; meanambigBases /= (double) size;
int ptile0_25 = int(size * 0.025);
int ptile25 = int(size * 0.250);
m->mothurOut("75%-tile:\t" + toString(startPosition[ptile75]) + "\t" + toString(endPosition[ptile75]) + "\t" + toString(seqLength[ptile75]) + "\t" + toString(ambigBases[ptile75]) + "\t" + toString(longHomoPolymer[ptile75]) + "\t" + toString(ptile75+1)); m->mothurOutEndLine();
m->mothurOut("97.5%-tile:\t" + toString(startPosition[ptile97_5]) + "\t" + toString(endPosition[ptile97_5]) + "\t" + toString(seqLength[ptile97_5]) + "\t" + toString(ambigBases[ptile97_5]) + "\t" + toString(longHomoPolymer[ptile97_5]) + "\t" + toString(ptile97_5+1)); m->mothurOutEndLine();
m->mothurOut("Maximum:\t" + toString(startPosition[ptile100]) + "\t" + toString(endPosition[ptile100]) + "\t" + toString(seqLength[ptile100]) + "\t" + toString(ambigBases[ptile100]) + "\t" + toString(longHomoPolymer[ptile100]) + "\t" + toString(ptile100+1)); m->mothurOutEndLine();
- m->mothurOut("Mean:\t" + toString(meanStartPosition) + "\t" + toString(meanEndPosition) + "\t" + toString(meanSeqLength) + "\t" + toString(meanAmbigBases) + "\t" + toString(meanLongHomoPolymer)); m->mothurOutEndLine();
+ m->mothurOut("Mean:\t" + toString(meanstartPosition) + "\t" + toString(meanendPosition) + "\t" + toString(meanseqLength) + "\t" + toString(meanambigBases) + "\t" + toString(meanlongHomoPolymer)); m->mothurOutEndLine();
if ((namefile == "") && (countfile == "")) { m->mothurOut("# of Seqs:\t" + toString(numSeqs)); m->mothurOutEndLine(); }
else { m->mothurOut("# of unique seqs:\t" + toString(numSeqs)); m->mothurOutEndLine(); m->mothurOut("total # of seqs:\t" + toString(startPosition.size())); m->mothurOutEndLine(); }
}
//for each sequence this sequence represents
- for (int i = 0; i < num; i++) {
+ for (int j = 0; j < num; j++) {
startPosition.push_back(current.getStartPos());
endPosition.push_back(current.getEndPos());
seqLength.push_back(current.getNumBases());