]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.cpp
1.18.1
[mothur.git] / mothurout.cpp
index 59e4fdcc080fe91e946dbc7d3b2a66d9e1dc02a0..8fde2fd105d2b100715cc244a6d9a16bbd9eb353 100644 (file)
@@ -46,6 +46,40 @@ void MothurOut::printCurrentFiles()  {
                exit(1);
        }
 }
+/*********************************************************************************************/
+bool MothurOut::hasCurrentFiles()  {
+       try {
+               bool hasCurrent = false;
+               
+               if (accnosfile != "")           {  return true;                 }
+               if (columnfile != "")           {  return true;                 }
+               if (designfile != "")           {  return true;                 }
+               if (fastafile != "")            {  return true;                 }
+               if (groupfile != "")            {  return true;                 }
+               if (listfile != "")                     {  return true;                 }
+               if (namefile != "")                     {  return true;                 }
+               if (oligosfile != "")           {  return true;                 }
+               if (orderfile != "")            {  return true;                 }
+               if (ordergroupfile != "")       {  return true;                 }
+               if (phylipfile != "")           {  return true;                 }
+               if (qualfile != "")                     {  return true;                 }
+               if (rabundfile != "")           {  return true;                 }
+               if (relabundfile != "")         {  return true;                 }
+               if (sabundfile != "")           {  return true;                 }
+               if (sfffile != "")                      {  return true;                 }
+               if (sharedfile != "")           {  return true;                 }
+               if (taxonomyfile != "")         {  return true;                 }
+               if (treefile != "")                     {  return true;                 }
+               
+               return hasCurrent;
+               
+       }
+       catch(exception& e) {
+               errorOut(e, "MothurOut", "hasCurrentFiles");
+               exit(1);
+       }
+}
+
 /*********************************************************************************************/
 void MothurOut::clearCurrentFiles()  {
        try {
@@ -1731,6 +1765,23 @@ bool MothurOut::checkReleaseVersion(ifstream& file, string version) {
        }
 }
 /**************************************************************************************************/
+bool MothurOut::isContainingOnlyDigits(string input) {
+       try{
+               
+               //are you a digit in ascii code
+               for (int i = 0;i < input.length(); i++){
+                       if( input[i]>47 && input[i]<58){}
+                       else { return false; }
+               }
+               
+               return true;
+       }
+       catch(exception& e) {
+               errorOut(e, "MothurOut", "isContainingOnlyDigits");             
+               exit(1);
+       }
+}
+/**************************************************************************************************/