//***************************************************************************************************************
-Ccode::Ccode(string filename, string temp) { fastafile = filename; templateFile = temp; }
+Ccode::Ccode(string filename, string temp, string o) { fastafile = filename; templateFile = temp; outputDir = o; }
//***************************************************************************************************************
Ccode::~Ccode() {
mothurOutEndLine();
- string mapInfo = getRootName(fastafile) + "mapinfo";
+ string mapInfo = outputDir + getRootName(getSimpleName(fastafile)) + "mapinfo";
ofstream out2;
openOutputFile(mapInfo, out2);
}
//***************************************************************************************************************
-void Ccode::getChimeras() {
+int Ccode::getChimeras() {
try {
//read in query sequences and subject sequences
int numSeqs = querySeqs.size();
+ if (unaligned) { mothurOut("Your sequences need to be aligned when you use the bellerophon ccode."); mothurOutEndLine(); return 1; }
+
closest.resize(numSeqs);
refCombo.resize(numSeqs, 0);
for (int i = 0; i < lines.size(); i++) { delete lines[i]; }
delete distCalc;
delete decalc;
-
+
+ return 0;
}
catch(exception& e) {
errorOut(e, "Ccode", "getChimeras");