//***************************************************************************************************************
-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);
class Ccode : public Chimera {
public:
- Ccode(string, string);
+ Ccode(string, string, string);
~Ccode();
int getChimeras();
if (method == "bellerophon") { chimera = new Bellerophon(fastafile, outputDir); }
else if (method == "pintail") { chimera = new Pintail(fastafile, templatefile, outputDir); }
- else if (method == "ccode") { chimera = new Ccode(fastafile, templatefile); }
+ else if (method == "ccode") { chimera = new Ccode(fastafile, templatefile, outputDir); }
else if (method == "chimeracheck") { chimera = new ChimeraCheckRDP(fastafile, templatefile, outputDir); }
else if (method == "chimeraslayer") { chimera = new ChimeraSlayer(fastafile, templatefile); }
else { mothurOut("Not a valid method."); mothurOutEndLine(); return 0; }
outTax << candidateSeq->getName() << '\t' << taxonomy << endl;
}else{
outTax << candidateSeq->getName() << '\t' << classify->getSimpleTax() << endl;
- cout << classify->getSimpleTax() << endl;
}
outTaxSimple << candidateSeq->getName() << '\t' << classify->getSimpleTax() << endl;
delete command; //delete the old command
//user has opted to redirect output from dir where input files are located to some other place
- if (outputDir != "") { optionString += ", outputdir=" + outputDir; }
+ if (outputDir != "") {
+ if (optionString != "") { optionString += ", outputdir=" + outputDir; }
+ else { optionString += "outputdir=" + outputDir; }
+ }
//user has opted to redirect input from dir where mothur.exe is located to some other place
- if (inputDir != "") { optionString += ", inputdir=" + inputDir; }
-
+ if (inputDir != "") {
+ if (optionString != "") { optionString += ", inputdir=" + inputDir; }
+ else { optionString += "inputdir=" + inputDir; }
+ }
if(commandName == "read.dist") { command = new ReadDistCommand(optionString); }
else if(commandName == "read.otu") { command = new ReadOtuCommand(optionString); }