X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=chopseqscommand.cpp;fp=chopseqscommand.cpp;h=a09ff65856ae39c1e8fbb1a662ed8bacd8860694;hb=348de0f8b17d84ede77081dcf67bd6ef43496677;hp=1ebb1f4b631f21d02596aa3e1e528d27cb3587df;hpb=5e031adc86a1fc125c4abb3d4048f209d52f9b6d;p=mothur.git diff --git a/chopseqscommand.cpp b/chopseqscommand.cpp index 1ebb1f4..a09ff65 100644 --- a/chopseqscommand.cpp +++ b/chopseqscommand.cpp @@ -133,7 +133,7 @@ ChopSeqsCommand::ChopSeqsCommand(string option) { void ChopSeqsCommand::help(){ try { - m->mothurOut("The chop.seqs command reads a fasta file and outputs a .chop.fasta containing the trimmed sequences.\n"); + m->mothurOut("The chop.seqs command reads a fasta file and outputs a .chop.fasta containing the trimmed sequences. Note: If a sequence is completely 'chopped', an accnos file will be created with the names of the sequences removed. \n"); m->mothurOut("The chop.seqs command parameters are fasta, numbases, countgaps and keep. fasta and numbases are required required.\n"); m->mothurOut("The chop.seqs command should be in the following format: chop.seqs(fasta=yourFasta, numbases=yourNum, keep=yourKeep).\n"); m->mothurOut("The numbases parameter allows you to specify the number of bases you want to keep.\n"); @@ -202,6 +202,21 @@ int ChopSeqsCommand::execute(){ m->mothurOutEndLine(); + //set fasta file as new current fastafile + string current = ""; + itTypes = outputTypes.find("fasta"); + if (itTypes != outputTypes.end()) { + if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setFastaFile(current); } + } + + if (wroteAccnos) { //set accnos file as new current accnosfile + itTypes = outputTypes.find("accnos"); + if (itTypes != outputTypes.end()) { + if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setAccnosFile(current); } + } + } + + return 0; }