]> git.donarmstrong.com Git - mothur.git/blobdiff - unifracunweightedcommand.cpp
worked on hcluster. made .single command run using a sharedfile. and various other...
[mothur.git] / unifracunweightedcommand.cpp
index b551e5f20f7a4ed326dbb1d40b7ce9913826a2b3..1512284544b0e7d4cb7ba6ddac4663bf60d6d777 100644 (file)
@@ -298,7 +298,11 @@ void UnifracUnweightedCommand::createPhylipFile(int i) {
                //output to file
                for (int r=0; r<globaldata->Groups.size(); r++) { 
                        //output name
-                       out << globaldata->Groups[r] << '\t';
+                       string name = globaldata->Groups[r];
+                       if (name.length() < 10) { //pad with spaces to make compatible
+                               while (name.length() < 10) {  name += " ";  }
+                       }
+                       out << name << '\t';
                        
                        //output distances
                        for (int l = 0; l < r; l++) {   out  << dists[r][l] << '\t';  }