X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=heatmapcommand.cpp;h=d160525c70174131e8d32ac9803f5bcc756cb80f;hb=cbaa068e77aeb15bb06f0695a36d8f757977ed64;hp=57c4c86b44bf2ccf9368c2c8c26acc1e67d360af;hpb=55386dddad84cc1140d736cabaf4dd0ae16f2e01;p=mothur.git diff --git a/heatmapcommand.cpp b/heatmapcommand.cpp index 57c4c86..d160525 100644 --- a/heatmapcommand.cpp +++ b/heatmapcommand.cpp @@ -61,6 +61,28 @@ string HeatMapCommand::getHelpString(){ } } +//********************************************************************************************************************** + +string HeatMapCommand::getOutputFileNameTag(string type, string inputName=""){ + try { + string outputFileName = ""; + map >::iterator it; + + //is this a type this command creates + it = outputTypes.find(type); + if (it == outputTypes.end()) { m->mothurOut("[ERROR]: this command doesn't create a " + type + " output file.\n"); } + else { + if (type == "svg") { outputFileName = "svg"; } + else { m->mothurOut("[ERROR]: No definition for type " + type + " output file tag.\n"); m->control_pressed = true; } + } + return outputFileName; + } + catch(exception& e) { + m->errorOut(e, "HeatMapCommand", "getOutputFileNameTag"); + exit(1); + } +} + //********************************************************************************************************************** HeatMapCommand::HeatMapCommand(){ try { @@ -226,10 +248,10 @@ HeatMapCommand::HeatMapCommand(string option) { } string temp = validParameter.validFile(parameters, "numotu", false); if (temp == "not found") { temp = "0"; } - convert(temp, numOTU); + m->mothurConvert(temp, numOTU); temp = validParameter.validFile(parameters, "fontsize", false); if (temp == "not found") { temp = "24"; } - convert(temp, fontSize); + m->mothurConvert(temp, fontSize); sorted = validParameter.validFile(parameters, "sorted", false); if (sorted == "not found") {