Repository 'blup_calculator'
hg clone https://toolshed.g2.bx.psu.edu/repos/dereeper/blup_calculator

Changeset 0:45d215f2be74 (2018-12-29)
Next changeset 1:c1c85170db1b (2018-12-30)
Commit message:
Uploaded
added:
blupcal.R
blupcal.sh
blupcal.xml
blupcal_wrapper.R
test-data/blup.output
test-data/pheno_input.tab.txt
b
diff -r 000000000000 -r 45d215f2be74 blupcal.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/blupcal.R Sat Dec 29 18:44:05 2018 -0500
[
b'@@ -0,0 +1,326 @@\n+# Calculation of BLUE/BLUP\r\n+# Umesh Rosyara, CIMMYT\r\n+blupcal<- function(data,  \r\n+                   Replication = "Rep", \r\n+                   Genotype    = "Entry", \r\n+                   y           = "y", \r\n+                   design      = "rcbd",\r\n+                   Block       = NULL,\r\n+                   summarizeby = NULL, \r\n+                   groupvar1   = NULL, \r\n+                   groupvar2   = NULL) {\r\n+\r\n+  suppressMessages(library(arm))\r\n+  # so that it would not throw messages at the stderr channel of Galaxy\r\n+  library(lme4, quietly = TRUE)\r\n+\r\n+  # Basic summary of the variables eused  \r\n+  print(paste("Replication variable = ", Replication))\r\n+  print(paste("block variable = ", Block))  \r\n+  print(paste("Genotype variable = ", Genotype))\r\n+  print(paste("summarizeby (included in the model) = ", summarizeby))\r\n+  print(paste("groupvariable 1 (included in the model) = ", groupvar1))\r\n+  print(paste("groupvariable 2 (included in the model) = ", groupvar2))\r\n+  print(paste("design = ", design))\r\n+  print(paste("y = ", y))\r\n+\r\n+  # Summary of data\r\n+  print("*************************************")\r\n+  print("*************************************")\r\n+  print(summary(data))\r\n+  print("*************************************")\r\n+  print("*************************************")\r\n+\r\n+  data_list <- list()\r\n+  if (length(summarizeby) != 0) {\r\n+    data$summarizeby <- as.factor(data[,summarizeby])\r\n+    data_list = split(data, f = data$summarizeby)\r\n+  } else {\r\n+    data$summarizeby <- "none"\r\n+    data_list[[1]] <- data\r\n+  }\r\n+\r\n+  all_results <- list()\r\n+\r\n+  for (i in 1: length(data_list)) {\r\n+    data1 <- data_list[[i]]\r\n+\r\n+    data1$Rep <- as.factor(data1[, Replication])\r\n+    cat("\\ndata1$Rep:\\n")\r\n+    print(data1$Rep)\r\n+\r\n+    data1$Entry <- as.factor(data1[, Genotype])\r\n+    cat("\\ndata1$Entry:\\n")\r\n+    print(data1$Entry)\r\n+\r\n+    if (design == "lattice") {\r\n+      data1$Subblock <- as.factor(data1[, Block])\r\n+    }\r\n+\r\n+    data1$y <- as.numeric(data1[, y])\r\n+    cat("\\ndata1$y:\\n")\r\n+    print(data1$y)\r\n+\r\n+    if (length(groupvar1) != 0) {\r\n+      data1$groupvar1 <- as.factor(data1[, groupvar1])\r\n+      cat("\\ndata1$groupvar1:\\n") \r\n+      print(data1$groupvar1) \r\n+    }\r\n+\r\n+    if (length(groupvar2) != 0) {\r\n+      data1$groupvar2 <- as.factor(data1[, groupvar2])\r\n+      cat("\\ndata1$groupvar2:\\n") \r\n+      print(data1$groupvar2) \r\n+    }\r\n+\r\n+    if (design == "rcbd") {\r\n+      if (length(groupvar1) != 0) {\r\n+        if (length(groupvar2) != 0) {\r\n+          fm1 <- lmer(y ~ 1 + \r\n+                          (1|Entry) + \r\n+                          (1|groupvar1) + \r\n+                          (1|groupvar2) + \r\n+                          (1|Entry:groupvar1) + \r\n+                          (1|Entry:groupvar2) + \r\n+                          (1|Entry:groupvar1:groupvar2) + \r\n+                          (1|Rep), \r\n+                      data1)\r\n+          fm2 <- lmer(y ~ (-1) + \r\n+                          Entry + \r\n+                          (1|groupvar1) + \r\n+                          (1|groupvar2) + \r\n+                          (1|Entry:groupvar1) + \r\n+                          (1|Entry:groupvar2) + \r\n+                          (1|Entry:groupvar1:groupvar2) + \r\n+                          (1|Rep), \r\n+                      data1)\r\n+        }\r\n+        if (length(groupvar2) == 0) {\r\n+          fm1 <- lmer(y ~ 1 + \r\n+                          (1|Entry) + \r\n+                          (1|groupvar1) + \r\n+                          (1|Entry:groupvar1) + \r\n+                          (1|Rep), \r\n+                      data1)\r\n+          fm2 <- lmer(y ~ (-1) + \r\n+                          Entry + \r\n+                          (1|groupvar1) + \r\n+                          (1|Entry:groupvar1) + \r\n+                          (1|Rep), \r\n+                      data1) \r\n+        }\r\n+      }\r\n+      if (length(groupvar1) == 0) {\r\n+        if (length(groupvar2) != 0) {\r\n+          fm1 <- lmer(y ~ 1 + \r\n+     '..b'   # PEV reliability\r\n+    pevReliability <- 1 - (PEV / Vg)\r\n+    names(pevReliability) <- "PEV reliability"\r\n+\r\n+    blupdf = data.frame(genotype = rownames(ranef(fm1)$Entry), \r\n+                        blup = blup,\r\n+                        BLUP_PEV = PEV,  \r\n+                        BLUP_pevReliability = pevReliability)\r\n+\r\n+    ######## \r\n+    # BLUE \r\n+    ######## \r\n+    blue <- fixef(fm2)\r\n+\r\n+    bluedf <- data.frame(genotype = substr(names(blue), 6, nchar(names(blue))), \r\n+                         blue = blue)\r\n+\r\n+    ######### \r\n+    # MEANS \r\n+    ######### \r\n+    means <- with(data1, tapply(y, Entry, mean, na.rm = TRUE))\r\n+\r\n+    meandf <- data.frame(genotype = names(means), \r\n+                         means = means)\r\n+    \r\n+    resultdf1 <- merge(meandf, bluedf, by = "genotype")\r\n+    resultdf <- merge(resultdf1, blupdf, by = "genotype")\r\n+\r\n+    if (length(summarizeby) != 0) {\r\n+      results <- data.frame(row.names      = NULL, \r\n+                            genotype       = resultdf$genotype, \r\n+                            blue           = resultdf$blue, \r\n+                            blup           = resultdf$blup,\r\n+                            BLUP_PEV       = resultdf$BLUP_PEV,  \r\n+                            pevReliability = resultdf$BLUP_pevReliability, \r\n+                            means          = resultdf$means, \r\n+                            group          = levels(data$summarizeby)[i])\r\n+      names(results) <- c(Genotype, \r\n+                          paste(y, "_blue", sep = ""), \r\n+                          paste(y, "_blup", sep = ""), \r\n+                          paste(y, "_PEV", sep = ""), \r\n+                          paste(y, "_pevReliability", sep = ""), \r\n+                          paste(y, "_means", sep = ""), \r\n+                          summarizeby)\r\n+    } else {\r\n+      results <- data.frame(row.names      = NULL, \r\n+                            genotype       = resultdf$genotype, \r\n+                            blue           = resultdf$blue, \r\n+                            blup           = resultdf$blup, \r\n+                            BLUP_PEV       = resultdf$BLUP_PEV,  \r\n+                            pevReliability = resultdf$BLUP_pevReliability, \r\n+                            means          = resultdf$means)\r\n+      names(results) <- c(Genotype, \r\n+                          paste(y, "_blue", sep = ""), \r\n+                          paste(y, "_blup", sep = ""), \r\n+                          paste(y, "_PEV", sep = ""), \r\n+                          paste(y, "_pevReliability", sep = ""), \r\n+                          paste(y, "_means", sep = ""))\r\n+    }\r\n+\r\n+    all_results[[i]] <- results \r\n+  }\r\n+  outdf <- do.call("rbind", all_results)\r\n+  class(outdf) <- c("blupcal", class(outdf))\r\n+  return(outdf)\r\n+}\r\n+\r\n+# plot function of blupcal module \r\n+plot2.blupcal <- function(outdf) {\r\n+  hist_with_box <- function(data, main = main, hist.col, box.col) {\r\n+    histpar <- hist(data, plot = FALSE)\r\n+    hist(data, col = hist.col, main = main, ylim = c(0, max(histpar$density) + max(histpar$density) * 0.3), prob = TRUE)\r\n+    m = mean(data, na.rm = TRUE)\r\n+    std = sd(data, na.rm = TRUE)\r\n+    curve(dnorm(x, mean = m, sd = std), col = "yellow", lwd = 2, add = TRUE, yaxt = "n")\r\n+    boxout <- boxplot(data, plot = FALSE)\r\n+    points(boxout$out, y = rep(max(histpar$density) * 0.3, length(boxout$out)), col = "red", pch = 1)\r\n+    texts <- paste("mean = ", round(mean(data, na.rm = TRUE), 2), " sd = ", round(sd(data, na.rm = TRUE), 2), " n = ", length(data))\r\n+    text(min(histpar$breaks), max(histpar$density) + max(histpar$density) * 0.2, labels = texts, pos = 4)\r\n+  }\r\n+  par(mfrow = c(3,1), mar = c(3.1, 3.1, 1.1, 2.1))\r\n+  hist_with_box(outdf[,2], main = names(outdf)[2], hist.col = "green4", box.col = "green1")\r\n+  hist_with_box(outdf[,3], main = names(outdf)[3], hist.col = "blue4", box.col = "blue1")\r\n+  hist_with_box(outdf[,4], main = names(outdf)[4], hist.col = "gray20", box.col = "gray60")\r\n+}\r\n'
b
diff -r 000000000000 -r 45d215f2be74 blupcal.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/blupcal.sh Sat Dec 29 18:44:05 2018 -0500
[
@@ -0,0 +1,56 @@
+#!/bin/bash
+tool_directory=$1
+galaxy_tabular_file=$2
+galaxy_replication_vector_column_index=$3
+galaxy_genotype_vector_column_index=$4
+galaxy_first_y_vector_column_index=$5
+galaxy_last_y_vector_column_index=$6
+galaxy_design=$7
+galaxy_summarize_by=$8
+galaxy_summarize_by_vector_column_index=$9
+galaxy_group_variable_1=${10}
+galaxy_group_variable_1_vector_column_index=${11}
+galaxy_group_variable_2=${12}
+galaxy_group_variable_2_vector_column_index=${13}
+galaxy_output_file_path=${14}
+block_vector_column_index=${15}
+
+directory=`dirname $0`
+mkdir tmpdir$$
+
+
+counter=$galaxy_first_y_vector_column_index
+
+previous="tmpdir$$/output"
+echo '' >$previous
+while [ $counter -le $galaxy_last_y_vector_column_index ]
+do
+Rscript --vanilla $directory/blupcal_wrapper.R --tool_directory $tool_directory --tabular_file $galaxy_tabular_file --replication_vector_column_index $galaxy_replication_vector_column_index --genotype_vector_column_index $galaxy_genotype_vector_column_index --y_vector_column_index $counter  --design $galaxy_design --summarize_by $galaxy_summarize_by --summarize_by_vector_column_index $galaxy_summarize_by_vector_column_index --group_variable_1 $galaxy_group_variable_1 --group_variable_1_vector_column_index $galaxy_group_variable_1_vector_column_index --group_variable_2 $galaxy_group_variable_2 --group_variable_2_vector_column_index $galaxy_group_variable_2_vector_column_index --output_file_path tmpdir$$/output.$counter --block_vector_column_index $block_vector_column_index
+#cat tmpdir$$/output.$counter >>$galaxy_output_file_path
+if [ "$counter" -gt "$galaxy_first_y_vector_column_index" ];then
+if [[ "$galaxy_summarize_by" == "true" ]];then 
+cut -f 3-7 tmpdir$$/output.$counter >>tmpdir$$/output.$counter.cut
+fi
+if [[ "$galaxy_summarize_by" == "false" ]];then
+cut -f 2-6 tmpdir$$/output.$counter >>tmpdir$$/output.$counter.cut
+fi
+mv tmpdir$$/output.$counter.cut tmpdir$$/output.$counter
+fi
+if [ "$counter" -gt "$galaxy_first_y_vector_column_index" ];then
+paste $previous tmpdir$$/output.$counter >>tmpdir$$/output.$counter.$counter
+fi
+if [ "$counter" -eq "$galaxy_first_y_vector_column_index" ];then
+cp tmpdir$$/output.$counter tmpdir$$/output.$counter.$counter
+fi
+previous="tmpdir$$/output.$counter.$counter"
+cp -rf tmpdir$$/output.$counter.$counter $galaxy_output_file_path
+#paste $galaxy_output_file_path tmpdir$$/output.$counter >>$galaxy_output_file_path
+#cut -f 3-7 tmpdir$$/output.$counter >tmpdir$$/output.$counter.cut
+((counter++))
+done
+
+
+echo $galaxy_summarize_by
+
+
+
b
diff -r 000000000000 -r 45d215f2be74 blupcal.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/blupcal.xml Sat Dec 29 18:44:05 2018 -0500
b
@@ -0,0 +1,185 @@
+<tool id="blup_and_blue_multiple2" name="BLUP/BLUE" version="1.11.0">
+  <description>calculator (multiple traits)</description>
+  <requirements>
+  <requirement type="package" version="1.1_18_1">r-lme4</requirement> 
+  <requirement type="package" version="1.20.2">r-getopt</requirement>
+  </requirements> 
+  <command interpreter="bash">
+./blupcal.sh $__tool_directory__ $galaxy_tabular_file $galaxy_replication_vector_column_index $galaxy_genotype_vector_column_index $galaxy_first_y_vector_column_index $galaxy_last_y_vector_column_index $galaxy_design_conditional.galaxy_design 
+ $galaxy_summarize_by
+ $galaxy_summarize_by_vector_column_index
+ $galaxy_group_variable_1
+ $galaxy_group_variable_1_vector_column_index
+ $galaxy_group_variable_2
+ $galaxy_group_variable_2_vector_column_index
+ $galaxy_output_file_path
+#if $galaxy_design_conditional.galaxy_design == "lattice":
+ $galaxy_design_conditional.galaxy_block_vector_column_index
+#else:
+ NULL
+#end if
+</command>
+  <inputs>
+    <param name="galaxy_tabular_file" 
+           type="data" 
+           format="tab,tabular" 
+           label="Encoded Data"
+           help="(required) Must be the TAB as both column delimiter and file type" />
+    <conditional name="galaxy_design_conditional">
+      <param name="galaxy_design" 
+             type="select" 
+             label="Design"
+             help="(required) Must choose one of the two design options available: Lattice or RCBD">
+        <option value="lattice">Lattice</option>
+        <option value="rcbd" 
+                selected="true">RCBD</option>
+      </param>
+      <when value="lattice">
+        <param name="galaxy_block_vector_column_index" 
+               type="data_column" 
+               data_ref="galaxy_tabular_file" 
+               use_header_names="true" 
+               label="Block within Replication" 
+               help="(required) Must be the block-vector column name"
+               value="4" />
+      </when>
+      <when value="rcbd">
+      </when>
+    </conditional>
+    <param name="galaxy_replication_vector_column_index" 
+           type="data_column" 
+           data_ref="galaxy_tabular_file" 
+           use_header_names="true" 
+           label="Replication Column" 
+           help="(required) Must be the replication-vector column name"
+           value="1" />
+    <param name="galaxy_genotype_vector_column_index" 
+           type="data_column" 
+           data_ref="galaxy_tabular_file" 
+           use_header_names="true" 
+           label="Genotype Column" 
+           help="(required) Must be the genotype-vector column name"
+           value="2" /> 
+    <param name="galaxy_first_y_vector_column_index" 
+           type="data_column" 
+           data_ref="galaxy_tabular_file" 
+           use_header_names="true" 
+           label="First Y Column" 
+           help="(required) Must be the first y-vector column name"
+           value="3" />
+    <param name="galaxy_last_y_vector_column_index" 
+           type="data_column" 
+           data_ref="galaxy_tabular_file" 
+           use_header_names="true" 
+           label="Last Y Column" 
+           help="(required) Must be the last y-vector column name"
+           value="3" />
+    <param name="galaxy_summarize_by" 
+           type="boolean"
+           checked="false" 
+           truevalue="true" 
+           falsevalue="false" 
+           label="Summarize By"
+           help="(optional) It can be summarized by a column chosen" />
+    <param name="galaxy_summarize_by_vector_column_index" 
+           type="data_column" 
+           data_ref="galaxy_tabular_file" 
+           use_header_names="true" 
+           label="Summarize By Column" 
+           help="Must be the summarized-vector column name" 
+           value="5" />
+    <param name="galaxy_group_variable_1"
+           type="boolean" 
+           checked="false" 
+           truevalue="true" 
+           falsevalue="false" 
+           label="Variable 1, Factor"
+           help="(optional) It can choose any column as the group variable 1" />
+    <param name="galaxy_group_variable_1_vector_column_index" 
+           type="data_column" 
+           data_ref="galaxy_tabular_file" 
+           use_header_names="true" 
+           label="Variable 1, Factor Column" 
+           help="Must be the group-variable-1-vector column name"
+           value="6" />
+    <param name="galaxy_group_variable_2"
+           type="boolean" 
+           checked="false" 
+           truevalue="true" 
+           falsevalue="false" 
+           label="Variable 2, Factor" 
+           help="(optional) It can choose any column as the group variable 2" />
+    <param name="galaxy_group_variable_2_vector_column_index" 
+           type="data_column" 
+           data_ref="galaxy_tabular_file" 
+           use_header_names="true" 
+           label="Variable 2, Factor Column" 
+           help="Must be the group-variable-2-vector column name"
+           value="7" />
+  </inputs>
+  <outputs>
+    <data name="galaxy_output_file_path" 
+          format="tab" 
+          label="BLUP output data" />
+  </outputs>
+  <tests>
+  <test>
+<param name="galaxy_tabular_file" value="pheno_input.tab.txt" /> 
+<param name="galaxy_replication_vector_column_index" value="1" />
+<param name="galaxy_genotype_vector_column_index" value="18" />
+<param name="galaxy_first_y_vector_column_index" value="13" />
+<param name="galaxy_last_y_vector_column_index" value="14" />
+<param name="galaxy_summarize_by" value="true" />
+<param name="galaxy_summarize_by_vector_column_index" value="3" />
+<output name="galaxy_output_file_path" file="blup.output"  compare="sim_size" >
+<assert_contents> 
+    <has_n_columns n="12" />
+</assert_contents>
+</output>
+  </test>
+  </tests>
+  <help>
+**What it does**
+
+This function calculates BLUP, BLUE and means for Y variable based on the model specified by the user.
+
+The required variables for RCBD are Genotype and Replication and for lattice required variables are Genotype, Replication (main block) and Block within Replication (sub block or block). User can add additional two X variables (eg. Location, Season etc) in the model and are treated as factor ( even supplied as numerical variable).
+If you want to calculate BLUP / BLUE by a grouping variable (eg. Management), then this will calculate BLUP / BLUE for each level of the variable.
+
+**Model**
+
+for RCBD design
+
+without additional factors (variable 1 and variable 2)
+
+*Y =  Genotype + Replication + error*   RCBD
+
+*Y = Genotype + Replication + Block within Replication + error*  Lattice
+
+
+With variable 1
+
+*Y =  Variable 1 + Genotype + Variable 1 : Genotype + Replication + error*   RCBD
+
+*Y = Variable 1 + Genotype + Replication + Variable 1 : Genotype + Block within Replication + error*  Lattice
+
+
+With variable 1 and variable 2
+
+*Y =  Variable 2 + Variable 1 + Genotype + Variable 1 : Genotype + Variable 1: Variable 2 + Variable 1:Variable 2: Genotype + Replication + error*   RCBD
+*Y =  Variable 2 + Variable 1 + Genotype + Variable 1 : Genotype + Variable 1: Variable 2 + Variable 1:Variable 2: Genotype + Replication +  Block within Replication + error*   RCBD
+
+**Model details**
+
+- Genotype is treated as Fixed for BLUE calculation and random for BLUP calculation.
+- Replication, Block within Replication are treated as random both BLUP and BLUE calculations.
+- Variable 1, Genotype : Variable 1  are treated as random both BLUP and BLUE calculations.
+- Variable 2, Genotype : Variable 2, Variable 1 : Variable 2, Genotype : Variable 1 : Variable 2  are treated as random effects for both BLUP and BLUE calculations.
+
+
+**Citation**
+Douglas Bates, Martin Maechler, Ben Bolker, Steve Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48.
+
+**Author(s)**
+  </help>
+</tool>
b
diff -r 000000000000 -r 45d215f2be74 blupcal_wrapper.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/blupcal_wrapper.R Sat Dec 29 18:44:05 2018 -0500
[
@@ -0,0 +1,186 @@
+#!/usr/bin/Rscript
+
+options(show.error.messages = F, 
+        error = function() {
+                  cat(geterrmessage(), file = stderr())
+                  q("no", 1, F) } )
+loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
+library("getopt")
+
+options(stringAsfactors = FALSE, useFancyQuotes = FALSE)
+options(warn = -1)
+args <- commandArgs(trailingOnly = TRUE)
+option_specification <- matrix(c(
+ "tool_directory",                       "a", 1, "character"
+,"tabular_file",                         "b", 1, "character"
+,"replication_vector_column_index",      "c", 1, "integer"
+,"genotype_vector_column_index",         "d", 1, "integer"
+,"y_vector_column_index",                "e", 1, "integer"
+,"design",                               "f", 1, "character"
+,"block_vector_column_index",            "g", 1, "integer"
+,"summarize_by",                         "h", 1, "character"
+,"summarize_by_vector_column_index",     "i", 1, "integer"
+,"group_variable_1",                     "j", 1, "character"
+,"group_variable_1_vector_column_index", "k", 1, "integer"
+,"group_variable_2",                     "l", 1, "character"
+,"group_variable_2_vector_column_index", "m", 1, "integer"
+,"output_file_path",                     "n", 1, "character"
+,"png_plots_file_path",                  "o", 1, "character"
+,"png_histograms_file_path",             "p", 1, "character"
+,"pdf_plots_file_path",                  "q", 1, "character"
+,"pdf_histograms_file_path",             "r", 1, "character"
+), byrow = TRUE, ncol = 4)
+options <- getopt(option_specification)
+
+cat("\nTool Directory: ", options$tool_directory)
+cat("\nTabular File: ", options$tabular_file)
+cat("\nReplication Vector Column Index: ", options$replication_vector_column_index)
+cat("\nGenotype Vector Column Index: ", options$genotype_vector_column_index)
+cat("\nY Vector Column Index: ", options$y_vector_column_index)
+cat("\nDesign: ", options$design)
+cat("\nBlock Vector Column Index: ", options$block_vector_column_index)
+cat("\nSummarize By: ", options$summarize_by)
+cat("\nSummarize By Vector Column Index: ", options$summarize_by_vector_column_index)
+cat("\nGroup Variable #1: ", options$group_variable_1)
+cat("\nGroup Variable #1 Vector Column Index: ", options$group_variable_1_vector_column_index)
+cat("\nGroup Variable #2: ", options$group_variable_2)
+cat("\nGroup Variable #2 Vector Column Index: ", options$group_variable_2_vector_column_index)
+cat("\nOutput file path: ", options$output_file_path)
+cat("\nPNG plots file path: ", options$png_plots_file_path)
+cat("\nPNG histograms file path: ", options$png_histograms_file_path)
+cat("\nPDF plots file path: ", options$pdf_plots_file_path)
+cat("\nPDF histograms file path: ", options$pdf_histograms_file_path)
+cat("\n\n")
+
+tabular_data <- read.table(file             = options$tabular_file, 
+                           header           = TRUE,
+                           sep              = "\t", 
+                           stringsAsFactors = FALSE, 
+                           strip.white      = TRUE, 
+                           na.strings       = ".")
+#tabular_data
+
+column_names <- colnames(tabular_data)
+cat("Column names:\n")
+column_names
+cat("\n\n")
+
+# Replication 
+replication_vector_header <- column_names[options$replication_vector_column_index]
+cat("\nreplication vector header: ", replication_vector_header)
+
+# Genotype 
+genotype_vector_header <- column_names[options$genotype_vector_column_index]
+cat("\ngenotype vector header: ", genotype_vector_header)
+
+# Y 
+y_vector_header <- column_names[options$y_vector_column_index]
+cat("\ny vector header: ", y_vector_header)
+
+# Design 
+design <- options$design
+cat("\ndesign: ", design)
+
+# Block 
+if (design == "rcbd") {
+  block_vector_header <- NULL
+} else {
+  block_vector_header <- column_names[options$block_vector_column_index]
+}
+cat("\nblock vector header: ", block_vector_header)
+
+# Summarize By 
+if (options$summarize_by == "false") {
+  summarize_by_vector_header <- NULL
+} else {
+  summarize_by_vector_header <- column_names[options$summarize_by_vector_column_index]
+}
+cat("\nsummarize by vector header: ", summarize_by_vector_header)
+
+# Group Variable #1 
+if (options$group_variable_1 == "false") {
+  group_variable_1_vector_header <- NULL
+} else {
+  group_variable_1_vector_header <- column_names[options$group_variable_1_vector_column_index]
+} 
+cat("\ngroup variable 1 vector header: ", group_variable_1_vector_header) 
+
+# Group Variable #2 
+if (options$group_variable_2 == "false") {
+  group_variable_2_vector_header <- NULL
+} else {
+  group_variable_2_vector_header <- column_names[options$group_variable_2_vector_column_index]
+} 
+cat("\ngroup variable 2 vector header: ", group_variable_2_vector_header)
+
+cat("\n\n")
+
+source(paste(options$tool_directory, "/blupcal.R", sep = ""))
+
+fit <- blupcal(data        = tabular_data,
+               Replication = replication_vector_header, 
+               Genotype    = genotype_vector_header, 
+               y           = y_vector_header, 
+               design      = design,
+               Block       = block_vector_header, 
+               summarizeby = summarize_by_vector_header, 
+               groupvar1   = group_variable_1_vector_header, 
+               groupvar2   = group_variable_2_vector_header)
+
+cat("\n\n") 
+
+output_file_path <- options$output_file_path
+
+cat("\nfit: ")
+cat("\n")
+fit
+cat("\n")
+
+#fit$gid <- as.numeric(levels(fit$gid))[fit$gid]
+if (options$summarize_by == "false") {
+  fit_view <- fit
+} else {
+  fit_view <- fit[c(1, 7, 2, 3, 4, 5, 6)]
+}
+
+formatted_table <- lapply(fit_view, function(.col) {
+                                      if (is.numeric(.col)) { 
+                                        return(as.numeric(sprintf("%.3f", .col))) 
+                                      } else { 
+                                        return(.col)
+                                      }
+                                    })

+write.table(formatted_table,
+            file = output_file_path, 
+            sep = "\t",
+            row.names = FALSE, 
+            quote = FALSE)
+
+png_plots_file_path <-options$png_plots_file_path
+if (!(is.null(png_plots_file_path))) {
+  png(png_plots_file_path)
+  plot(fit)
+  dev.off()
+}
+
+png_histograms_file_path <-options$png_histograms_file_path
+if (!(is.null(png_histograms_file_path))) {
+  png(png_histograms_file_path)
+  plot2.blupcal(fit)
+  dev.off()
+}
+
+pdf_plots_file_path <-options$pdf_plots_file_path
+if (!(is.null(pdf_plots_file_path))) {
+  pdf(pdf_plots_file_path)
+  plot(fit)
+  dev.off()
+}
+
+pdf_histograms_file_path <-options$pdf_histograms_file_path
+if (!(is.null(pdf_histograms_file_path))) {
+  pdf(pdf_histograms_file_path)
+  plot2.blupcal(fit)
+  dev.off()
+} 
b
diff -r 000000000000 -r 45d215f2be74 test-data/blup.output
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/blup.output Sat Dec 29 18:44:05 2018 -0500
b
b'@@ -0,0 +1,381 @@\n+Sample.Name.in.GBS.Data\tSeason\tGY_blue\tGY_blup\tGY_PEV\tGY_pevReliability\tGY_means\tAD_blue\tAD_blup\tAD_PEV\tAD_pevReliability\tAD_means\n+MARS-WEMA_270039\tMain\t6.715\t6.936\t0.072\t0.298\t6.715\t63\t62.664\t0.216\t0.465\t63\n+MARS-WEMA_270040\tMain\t5.959\t6.709\t0.072\t0.298\t5.959\t62.625\t62.489\t0.216\t0.465\t62.625\n+MARS-WEMA_270041\tMain\t6.925\t6.999\t0.072\t0.298\t6.925\t62.75\t62.547\t0.216\t0.465\t62.75\n+MARS-WEMA_270042\tMain\t7.576\t7.194\t0.072\t0.298\t7.576\t63.5\t62.898\t0.216\t0.465\t63.5\n+MARS-WEMA_270043\tMain\t8.101\t7.352\t0.072\t0.298\t8.101\t61.25\t61.847\t0.216\t0.465\t61.25\n+MARS-WEMA_270044\tMain\t7.335\t7.122\t0.072\t0.298\t7.335\t61.25\t61.847\t0.216\t0.465\t61.25\n+MARS-WEMA_270045\tMain\t8.015\t7.326\t0.072\t0.298\t8.015\t62.875\t62.606\t0.216\t0.465\t62.875\n+MARS-WEMA_270046\tMain\t7.234\t7.091\t0.072\t0.298\t7.234\t60.625\t61.555\t0.216\t0.465\t60.625\n+MARS-WEMA_270047\tMain\t6.87\t6.982\t0.072\t0.298\t6.87\t62.75\t62.547\t0.216\t0.465\t62.75\n+MARS-WEMA_270048\tMain\t7.43\t7.15\t0.072\t0.298\t7.43\t63\t62.664\t0.216\t0.465\t63\n+MARS-WEMA_270049\tMain\t7.178\t7.075\t0.072\t0.298\t7.178\t62\t62.197\t0.216\t0.465\t62\n+MARS-WEMA_270050\tMain\t6.555\t6.888\t0.072\t0.298\t6.555\t62.375\t62.372\t0.216\t0.465\t62.375\n+MARS-WEMA_270051\tMain\t6.491\t6.869\t0.072\t0.298\t6.491\t62\t62.197\t0.216\t0.465\t62\n+MARS-WEMA_270052\tMain\t6.811\t6.965\t0.072\t0.298\t6.811\t62.5\t62.431\t0.216\t0.465\t62.5\n+MARS-WEMA_270053\tMain\t7.82\t7.267\t0.072\t0.298\t7.82\t62.625\t62.489\t0.216\t0.465\t62.625\n+MARS-WEMA_270054\tMain\t6.384\t6.837\t0.072\t0.298\t6.384\t63\t62.664\t0.216\t0.465\t63\n+MARS-WEMA_270055\tMain\t6.818\t6.967\t0.072\t0.298\t6.817\t62.875\t62.606\t0.216\t0.465\t62.875\n+MARS-WEMA_270056\tMain\t7.374\t7.133\t0.072\t0.298\t7.374\t62.625\t62.489\t0.216\t0.465\t62.625\n+MARS-WEMA_270057\tMain\t7.186\t7.077\t0.072\t0.298\t7.186\t62.25\t62.314\t0.216\t0.465\t62.25\n+MARS-WEMA_270058\tMain\t7.781\t7.256\t0.072\t0.298\t7.781\t63.375\t62.839\t0.216\t0.465\t63.375\n+MARS-WEMA_270059\tMain\t7.153\t7.067\t0.072\t0.298\t7.152\t61.875\t62.139\t0.216\t0.465\t61.875\n+MARS-WEMA_270060\tMain\t7.476\t7.164\t0.072\t0.298\t7.476\t60.125\t61.321\t0.216\t0.465\t60.125\n+MARS-WEMA_270061\tMain\t6.475\t6.864\t0.072\t0.298\t6.475\t61.625\t62.022\t0.216\t0.465\t61.625\n+MARS-WEMA_270062\tMain\t6.335\t6.822\t0.072\t0.298\t6.335\t61.875\t62.139\t0.216\t0.465\t61.875\n+MARS-WEMA_270063\tMain\t6.911\t6.995\t0.072\t0.298\t6.911\t62.625\t62.489\t0.216\t0.465\t62.625\n+MARS-WEMA_270064\tMain\t6.066\t6.741\t0.072\t0.298\t6.066\t63\t62.664\t0.216\t0.465\t63\n+MARS-WEMA_270065\tMain\t7.945\t7.305\t0.072\t0.298\t7.945\t63.25\t62.781\t0.216\t0.465\t63.25\n+MARS-WEMA_270066\tMain\t7.45\t7.156\t0.072\t0.298\t7.45\t62.5\t62.431\t0.216\t0.465\t62.5\n+MARS-WEMA_270067\tMain\t7.884\t7.286\t0.072\t0.298\t7.884\t61.5\t61.963\t0.216\t0.465\t61.5\n+MARS-WEMA_270068\tMain\t7.71\t7.234\t0.072\t0.298\t7.71\t62.875\t62.606\t0.216\t0.465\t62.875\n+MARS-WEMA_270069\tMain\t7.196\t7.08\t0.072\t0.298\t7.196\t62.375\t62.372\t0.216\t0.465\t62.375\n+MARS-WEMA_270070\tMain\t7.03\t7.03\t0.072\t0.298\t7.03\t62.25\t62.314\t0.216\t0.465\t62.25\n+MARS-WEMA_270071\tMain\t6.438\t6.853\t0.072\t0.298\t6.438\t62.125\t62.255\t0.216\t0.465\t62.125\n+MARS-WEMA_270072\tMain\t6.26\t6.799\t0.072\t0.298\t6.26\t61.625\t62.022\t0.216\t0.465\t61.625\n+MARS-WEMA_270073\tMain\t7.239\t7.093\t0.072\t0.298\t7.239\t62.625\t62.489\t0.216\t0.465\t62.625\n+MARS-WEMA_270074\tMain\t7.158\t7.069\t0.072\t0.298\t7.157\t62.5\t62.431\t0.216\t0.465\t62.5\n+MARS-WEMA_270075\tMain\t7.761\t7.25\t0.072\t0.298\t7.761\t62.375\t62.372\t0.216\t0.465\t62.375\n+MARS-WEMA_270076\tMain\t5.774\t6.654\t0.072\t0.298\t5.774\t63.625\t62.956\t0.216\t0.465\t63.625\n+MARS-WEMA_270077\tMain\t7.505\t7.173\t0.072\t0.298\t7.505\t61.625\t62.022\t0.216\t0.465\t61.625\n+MARS-WEMA_270078\tMain\t6.258\t6.799\t0.072\t0.298\t6.258\t62.375\t62.372\t0.216\t0.465\t62.375\n+MARS-WEMA_270079\tMain\t7.466\t7.161\t0.072\t0.298\t7.466\t62.125\t62.255\t0.216\t0.465\t62.125\n+MARS-WEMA_270080\tMain\t7.578\t7.194\t0.072\t0.298\t7.578\t61.375\t61.905\t0.216\t0.465\t61.375\n+MARS-WEMA_270081\tMain\t7.333\t7.121\t0.072\t0.298\t7.332\t62.875\t62.606\t0.216\t0.465\t62.875\n+MARS-WEMA_270082\tMain\t7.784\t7.256\t0.072\t0.298\t7.784\t62.375\t62.372\t0.216\t0.465\t62.375\n+MARS-WEMA_270083\tMain\t7.028\t7.03\t0.072\t0.298\t7.027\t63.25\t62.781\t0.216\t0.465\t63.25\n+MARS-WEMA_270084\tMain\t6.131\t6.761\t0.072\t0.298\t6.131\t62.75\t62.547\t0.216\t0.465\t62.7'..b'333\t84.064\t0.353\t0.327\t83.333\n+MARS-WEMA_292957\tOff\t2.635\t2.689\t0.004\t0.045\t2.635\t83.667\t84.174\t0.353\t0.327\t83.667\n+MARS-WEMA_292958\tOff\t2.713\t2.693\t0.004\t0.045\t2.713\t83.667\t84.174\t0.353\t0.327\t83.667\n+MARS-WEMA_292959\tOff\t2.903\t2.701\t0.004\t0.045\t2.903\t83.833\t84.229\t0.353\t0.327\t83.833\n+MARS-WEMA_292960\tOff\t2.292\t2.674\t0.004\t0.045\t2.292\t84.833\t84.558\t0.353\t0.327\t84.833\n+MARS-WEMA_292961\tOff\t3.343\t2.721\t0.004\t0.045\t3.343\t85.333\t84.723\t0.353\t0.327\t85.333\n+MARS-WEMA_292962\tOff\t2.76\t2.695\t0.004\t0.045\t2.76\t85.167\t84.668\t0.353\t0.327\t85.167\n+MARS-WEMA_292963\tOff\t2.703\t2.692\t0.004\t0.045\t2.703\t82.5\t83.79\t0.353\t0.327\t82.5\n+MARS-WEMA_292964\tOff\t2.637\t2.689\t0.004\t0.045\t2.637\t84.667\t84.503\t0.353\t0.327\t84.667\n+MARS-WEMA_292965\tOff\t3.087\t2.709\t0.004\t0.045\t3.087\t84.167\t84.338\t0.353\t0.327\t84.167\n+MARS-WEMA_292966\tOff\t2.59\t2.687\t0.004\t0.045\t2.59\t84.333\t84.393\t0.353\t0.327\t84.333\n+MARS-WEMA_292967\tOff\t2.297\t2.674\t0.004\t0.045\t2.297\t84.833\t84.558\t0.353\t0.327\t84.833\n+MARS-WEMA_292968\tOff\t3.832\t2.743\t0.004\t0.045\t3.832\t83\t83.954\t0.353\t0.327\t83\n+MARS-WEMA_292969\tOff\t2.933\t2.703\t0.004\t0.045\t2.933\t81.5\t83.461\t0.353\t0.327\t81.5\n+MARS-WEMA_292970\tOff\t2.627\t2.689\t0.004\t0.045\t2.627\t83.667\t84.174\t0.353\t0.327\t83.667\n+MARS-WEMA_292971\tOff\t3.008\t2.706\t0.004\t0.045\t3.008\t85.5\t84.777\t0.353\t0.327\t85.5\n+MARS-WEMA_292972\tOff\t2.693\t2.692\t0.004\t0.045\t2.693\t84.667\t84.503\t0.353\t0.327\t84.667\n+MARS-WEMA_292973\tOff\t3.002\t2.706\t0.004\t0.045\t3.002\t85.333\t84.723\t0.353\t0.327\t85.333\n+MARS-WEMA_292974\tOff\t2.732\t2.693\t0.004\t0.045\t2.732\t83.167\t84.009\t0.353\t0.327\t83.167\n+MARS-WEMA_292975\tOff\t2.675\t2.691\t0.004\t0.045\t2.675\t86\t84.942\t0.353\t0.327\t86\n+MARS-WEMA_292976\tOff\t3.032\t2.707\t0.004\t0.045\t3.032\t83.667\t84.174\t0.353\t0.327\t83.667\n+MARS-WEMA_292977\tOff\t2.32\t2.675\t0.004\t0.045\t2.32\t85.833\t84.887\t0.353\t0.327\t85.833\n+MARS-WEMA_292978\tOff\t2.537\t2.685\t0.004\t0.045\t2.537\t83.5\t84.119\t0.353\t0.327\t83.5\n+MARS-WEMA_292979\tOff\t2.645\t2.69\t0.004\t0.045\t2.645\t83.5\t84.119\t0.353\t0.327\t83.5\n+MARS-WEMA_292980\tOff\t2.933\t2.703\t0.004\t0.045\t2.933\t84\t84.284\t0.353\t0.327\t84\n+MARS-WEMA_292981\tOff\t2.362\t2.677\t0.004\t0.045\t2.362\t85.333\t84.723\t0.353\t0.327\t85.333\n+MARS-WEMA_292982\tOff\t2.383\t2.678\t0.004\t0.045\t2.383\t87.333\t85.381\t0.353\t0.327\t87.333\n+MARS-WEMA_292983\tOff\t3.1\t2.71\t0.004\t0.045\t3.1\t85.667\t84.832\t0.353\t0.327\t85.667\n+MARS-WEMA_292984\tOff\t2.853\t2.699\t0.004\t0.045\t2.853\t84.167\t84.338\t0.353\t0.327\t84.167\n+MARS-WEMA_292985\tOff\t3.177\t2.714\t0.004\t0.045\t3.177\t84.333\t84.393\t0.353\t0.327\t84.333\n+MARS-WEMA_292986\tOff\t2.58\t2.687\t0.004\t0.045\t2.58\t85.167\t84.668\t0.353\t0.327\t85.167\n+MARS-WEMA_292987\tOff\t3.503\t2.728\t0.004\t0.045\t3.503\t83.5\t84.119\t0.353\t0.327\t83.5\n+MARS-WEMA_292988\tOff\t2.193\t2.669\t0.004\t0.045\t2.193\t86.5\t85.107\t0.353\t0.327\t86.5\n+MARS-WEMA_292989\tOff\t2.91\t2.702\t0.004\t0.045\t2.91\t86.167\t84.997\t0.353\t0.327\t86.167\n+MARS-WEMA_292990\tOff\t2.973\t2.704\t0.004\t0.045\t2.973\t82.833\t83.9\t0.353\t0.327\t82.833\n+MARS-WEMA_292991\tOff\t2.485\t2.682\t0.004\t0.045\t2.485\t84.333\t84.393\t0.353\t0.327\t84.333\n+MARS-WEMA_292992\tOff\t2.908\t2.701\t0.004\t0.045\t2.908\t81.833\t83.57\t0.353\t0.327\t81.833\n+MARS-WEMA_292993\tOff\t2.497\t2.683\t0.004\t0.045\t2.497\t88.667\t85.82\t0.353\t0.327\t88.667\n+MARS-WEMA_292994\tOff\t2.643\t2.689\t0.004\t0.045\t2.643\t83.333\t84.064\t0.353\t0.327\t83.333\n+MARS-WEMA_292995\tOff\t2.698\t2.692\t0.004\t0.045\t2.698\t83.5\t84.119\t0.353\t0.327\t83.5\n+MARS-WEMA_292996\tOff\t2.612\t2.688\t0.004\t0.045\t2.612\t83.667\t84.174\t0.353\t0.327\t83.667\n+MARS-WEMA_292997\tOff\t3.033\t2.707\t0.004\t0.045\t3.033\t84.5\t84.448\t0.353\t0.327\t84.5\n+MARS-WEMA_292998\tOff\t2.612\t2.688\t0.004\t0.045\t2.612\t84\t84.284\t0.353\t0.327\t84\n+MARS-WEMA_292999\tOff\t2.782\t2.696\t0.004\t0.045\t2.782\t85\t84.613\t0.353\t0.327\t85\n+MARS-WEMA_293000\tOff\t3.058\t2.708\t0.004\t0.045\t3.058\t84.833\t84.558\t0.353\t0.327\t84.833\n+MARS-WEMA_293001\tOff\t2.783\t2.696\t0.004\t0.045\t2.783\t84\t84.284\t0.353\t0.327\t84\n+MARS-WEMA_293002\tOff\t3.257\t2.717\t0.004\t0.045\t3.257\t84.333\t84.393\t0.353\t0.327\t84.333\n+MARS-WEMA_293003\tOff\t2.127\t2.666\t0.004\t0.045\t2.127\t83.5\t84.119\t0.353\t0.327\t83.5\n+MARS-WEMA_293004\tOff\t2.63\t2.689\t0.004\t0.045\t2.63\t82.667\t83.845\t0.353\t0.327\t82.667\n'
b
diff -r 000000000000 -r 45d215f2be74 test-data/pheno_input.tab.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/pheno_input.tab.txt Sat Dec 29 18:44:05 2018 -0500
b
b'@@ -0,0 +1,2661 @@\n+NameOfExperiment\tYear\tSeason\tNameOfLocation\tCountry\tCollaborator\tManagement\tLOC\tRep\tBlock\tPlot\tEntry\tGY\tAD\tPH\tEPP\tgid\tSample Name in GBS Data\tPedigree in GBS data\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t8\t93\t1\t8\t79\t217.5\t0.94\t49307\tMARS-WEMA_270039\tCZL04003/CZL00009-1\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t12\t150\t2\t8.35\t72\t203.5\t0.82\t49308\tMARS-WEMA_270040\tCZL04003/CZL00009-2\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t11\t141\t3\t7.68\t72\t192.5\t0.89\t49309\tMARS-WEMA_270041\tCZL04003/CZL00009-3\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t5\t64\t4\t9.86\t72\t215.5\t0.79\t49310\tMARS-WEMA_270042\tCZL04003/CZL00009-4\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t5\t57\t5\t10.7\t71\t213.5\t1.11\t49311\tMARS-WEMA_270043\tCZL04003/CZL00009-5\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t5\t55\t6\t11\t72\t221.5\t0.89\t49312\tMARS-WEMA_270044\tCZL04003/CZL00009-6\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t15\t191\t7\t10.3\t71\t245\t1\t49313\tMARS-WEMA_270045\tCZL04003/CZL00009-7\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t14\t176\t8\t8.45\t71\t221\t0.95\t49314\tMARS-WEMA_270046\tCZL04003/CZL00009-8\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t2\t23\t9\t6.18\t72\t235\t1.13\t49315\tMARS-WEMA_270047\tCZL04003/CZL00009-9\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t3\t38\t10\t8.02\t71\t265\t0.94\t49316\tMARS-WEMA_270048\tCZL04003/CZL00009-10\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t8\t103\t11\t10.57\t72\t220.5\t0.89\t49317\tMARS-WEMA_270049\tCZL04003/CZL00009-11\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t14\t175\t12\t9.53\t72\t228\t0.95\t49318\tMARS-WEMA_270050\tCZL04003/CZL00009-12\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t2\t22\t13\t2.04\t72\t205\t1\t49319\tMARS-WEMA_270051\tCZL04003/CZL00009-13\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t5\t65\t14\t8.06\t72\t223.5\t0.8\t49320\tMARS-WEMA_270052\tCZL04003/CZL00009-14\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t14\t177\t15\t10.05\t71\t219.5\t1.19\t49321\tMARS-WEMA_270053\tCZL04003/CZL00009-15\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t12\t149\t16\t4.4\t74\t206.1\t1.14\t49322\tMARS-WEMA_270054\tCZL04003/CZL00009-16\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t14\t182\t17\t8.38\t72\t235\t0.68\t49323\tMARS-WEMA_270055\tCZL04003/CZL00009-17\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t2\t18\t18\t10.7\t71\t241.6\t1.07\t49324\tMARS-WEMA_270056\tCZL04003/CZL00009-18\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t6\t69\t19\t9.5\t72\t211.5\t0.94\t49326\tMARS-WEMA_270057\tCZL04003/CZL00009-20\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t8\t102\t20\t11.2\t76\t242.5\t0.95\t49327\tMARS-WEMA_270058\tCZL04003/CZL00009-21\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t14\t172\t21\t10.21\t72\t207.5\t1.23\t49328\tMARS-WEMA_270059\tCZL04003/CZL00009-22\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t15\t186\t22\t10.56\t71\t207\t1.05\t49329\tMARS-WEMA_270060\tCZL04003/CZL00009-23\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t7\t89\t23\t7.27\t72\t199\t1\t49330\tMARS-WEMA_270061\tCZL04003/CZL00009-24\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t13\t168\t24\t8.55\t73\t229.5\t1\t49331\tMARS-WEMA_270062\tCZL04003/CZL00009-25\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t10\t119\t25\t11.56\t72\t227.5\t1.06\t49332\tMARS-WEMA_270063\tCZL04003/CZL00009-26\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t10\t125\t26\t7.68\t71\t228.5\t0.79\t49333\tMARS-WEMA_270064\tCZL04003/CZL00009-27\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t14\t178\t27\t10.84\t71\t225\t1.38\t49334\tMARS-WEMA_270065\tCZL04003/CZL00009-28\n+WET10B-EVALTC-09-1\t2010\tMain\tKakamega\tKenya\tS. Ajanga\tOptimal\t1\t1\t13\t169\t28\t11.97\t72\t231.5\t1.33\t49335\tMARS-WEMA'..b'\t2\t25\t325\t163\t4.47\t87\t108.8\t0.82\t49499\tMARS-WEMA_292977\tCZL04003/CZL00009-193\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t24\t302\t164\t5.6\t88\t114\t0.72\t49500\tMARS-WEMA_292978\tCZL04003/CZL00009-194\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t28\t354\t165\t5.52\t89\t122.8\t0.89\t49501\tMARS-WEMA_292979\tCZL04003/CZL00009-195\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t26\t326\t166\t5.53\t89\t124.4\t0.94\t49502\tMARS-WEMA_292980\tCZL04003/CZL00009-196\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t23\t294\t167\t4.11\t94\t123.4\t0.67\t49504\tMARS-WEMA_292981\tCZL04003/CZL00009-198\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t28\t364\t168\t5.21\t91\t123.4\t1\t49505\tMARS-WEMA_292982\tCZL04003/CZL00009-199\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t28\t352\t169\t6.77\t91\t112.4\t0.94\t49507\tMARS-WEMA_292983\tCZL04003/CZL00009-201\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t16\t205\t170\t4.4\t89\t118.8\t0.94\t49509\tMARS-WEMA_292984\tCZL04003/CZL00009-203\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t26\t335\t171\t5.56\t89\t127.4\t0.94\t49511\tMARS-WEMA_292985\tCZL04003/CZL00009-205\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t30\t379\t172\t4.92\t91\t124.6\t0.79\t49512\tMARS-WEMA_292986\tCZL04003/CZL00009-206\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t24\t309\t173\t6.04\t89\t126.4\t0.94\t49514\tMARS-WEMA_292987\tCZL04003/CZL00009-208\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t22\t282\t174\t4.37\t94\t112.4\t0.95\t49515\tMARS-WEMA_292988\tCZL04003/CZL00009-209\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t24\t301\t175\t5.57\t89\t121.8\t0.79\t49516\tMARS-WEMA_292989\tCZL04003/CZL00009-210\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t30\t384\t176\t5.61\t90\t123.8\t0.85\t49518\tMARS-WEMA_292990\tCZL04003/CZL00009-212\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t21\t265\t177\t5.5\t91\t122.2\t0.88\t49525\tMARS-WEMA_292991\tCZL04003/CZL00009-219\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t30\t380\t178\t4.86\t91\t120.6\t0.84\t49526\tMARS-WEMA_292992\tCZL04003/CZL00009-220\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t22\t278\t179\t4.62\t100\t100.2\t0.71\t49527\tMARS-WEMA_292993\tCZL04003/CZL00009-221\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t24\t310\t180\t5.89\t86\t125\t0.83\t49530\tMARS-WEMA_292994\tCZL04003/CZL00009-224\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t28\t363\t181\t5.42\t90\t125.4\t0.78\t49535\tMARS-WEMA_292995\tCZL04003/CZL00009-230\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t16\t199\t182\t3.59\t91\t103\t0.9\t49537\tMARS-WEMA_292996\tCZL04003/CZL00009-232\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t17\t219\t183\t4.35\t90\t122.2\t0.84\t49538\tMARS-WEMA_292997\tCZL04003/CZL00009-233\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t28\t353\t184\t5.4\t89\t118.6\t0.94\t49539\tMARS-WEMA_292998\tCZL04003/CZL00009-234\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t28\t358\t185\t4.46\t96\t124.8\t0.87\t49540\tMARS-WEMA_292999\tCZL04003/CZL00009-235\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t29\t371\t186\t5.81\t90\t121.8\t1\t49541\tMARS-WEMA_293000\tCZL04003/CZL00009-236\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t24\t300\t187\t4.77\t88\t100.2\t0.83\t49542\tMARS-WEMA_293001\tCZL04003/CZL00009-237\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t26\t332\t188\t5.72\t88\t125\t0.88\t49543\tMARS-WEMA_293002\tCZL04003/CZL00009-238\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t26\t328\t189\t4.06\t89\t112.4\t0.87\t49544\tMARS-WEMA_293003\tCZL04003/CZL00009-239\n+WET11A-EVALTC-09-8\t2010\tOff\tIsinya\tKenya\tM. Gunga\tManaged Drought\t8\t2\t19\t247\t190\t5\t91\t125.4\t0.84\t49545\tMARS-WEMA_293004\tCZL04003/CZL00009-240\n'