X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=removelineagecommand.cpp;fp=removelineagecommand.cpp;h=9fec2496068950b4863448fe500b17cbc957670a;hb=16abd6271c455bd01b34ff89a2e3641bef0fa128;hp=f55158fc259ace27c87d5a4fcca10e7c55539f13;hpb=896a4f281982a3c2889f6ce6d73be997072aceae;p=mothur.git diff --git a/removelineagecommand.cpp b/removelineagecommand.cpp index f55158f..9fec249 100644 --- a/removelineagecommand.cpp +++ b/removelineagecommand.cpp @@ -169,12 +169,12 @@ RemoveLineageCommand::RemoveLineageCommand(string option) { //check for required parameters fastafile = validParameter.validFile(parameters, "fasta", true); - if (fastafile == "not open") { abort = true; } + if (fastafile == "not open") { fastafile = ""; abort = true; } else if (fastafile == "not found") { fastafile = ""; } else { m->setFastaFile(fastafile); } namefile = validParameter.validFile(parameters, "name", true); - if (namefile == "not open") { abort = true; } + if (namefile == "not open") { namefile = ""; abort = true; } else if (namefile == "not found") { namefile = ""; } else { m->setNameFile(namefile); } @@ -193,7 +193,7 @@ RemoveLineageCommand::RemoveLineageCommand(string option) { else { m->setListFile(listfile); } taxfile = validParameter.validFile(parameters, "taxonomy", true); - if (taxfile == "not open") { abort = true; } + if (taxfile == "not open") { taxfile = ""; abort = true; } else if (taxfile == "not found") { taxfile = m->getTaxonomyFile(); if (taxfile != "") { m->mothurOut("Using " + taxfile + " as input file for the taxonomy parameter."); m->mothurOutEndLine(); } @@ -220,7 +220,12 @@ RemoveLineageCommand::RemoveLineageCommand(string option) { if ((fastafile == "") && (namefile == "") && (groupfile == "") && (alignfile == "") && (listfile == "") && (taxfile == "")) { m->mothurOut("You must provide one of the following: fasta, name, group, alignreport, taxonomy or listfile."); m->mothurOutEndLine(); abort = true; } if ((usedDups != "") && (namefile == "")) { m->mothurOut("You may only use dups with the name option."); m->mothurOutEndLine(); abort = true; } - + + if ((namefile == "") && ((fastafile != "") || (taxfile != ""))){ + vector files; files.push_back(fastafile); files.push_back(taxfile); + parser.getNameFile(files); + } + } }