private static string ProcessDataReadFromFile(IDataWithAnnotationRows mdata, Parameters param)
        {
            Parameter <string> fp       = param.GetParam <string>("Input file");
            string             filename = fp.Value;

            string[] colNames;
            try {
                colNames = TabSep.GetColumnNames(filename, '\t');
            } catch (Exception) {
                return("Could not open file " + filename + ". It maybe open in another program.");
            }
            int nameIndex = GetNameIndex(colNames);

            if (nameIndex < 0)
            {
                return("Error: the file has to contain a column called 'Name'.");
            }
            if (colNames.Length < 2)
            {
                return("Error: the file does not contain a numerical column.");
            }
            string[] nameCol             = TabSep.GetColumn(colNames[nameIndex], filename, '\t');
            Dictionary <string, int> map = ArrayUtils.InverseMap(nameCol);

            for (int i = 0; i < colNames.Length; i++)
            {
                if (i == nameIndex)
                {
                    continue;
                }
                string   groupName = colNames[i];
                string[] groupCol  = TabSep.GetColumn(groupName, filename, '\t');
                double[] newCol    = new double[mdata.ColumnCount];
                for (int j = 0; j < newCol.Length; j++)
                {
                    string colName = mdata.ColumnNames[j];
                    if (!map.ContainsKey(colName))
                    {
                        newCol[j] = double.NaN;
                        continue;
                    }
                    int    ind   = map[colName];
                    string group = groupCol[ind] ?? "";
                    group = group.Trim();
                    if (string.IsNullOrEmpty(group))
                    {
                        newCol[j] = double.NaN;
                    }
                    else
                    {
                        if (!Parser.TryDouble(group, out newCol[j]))
                        {
                            newCol[j] = double.NaN;
                        }
                    }
                }
                mdata.AddNumericRow(groupName, groupName, newCol);
            }
            return(null);
        }
        private static void ProcessDataCreate(IDataWithAnnotationRows mdata, Parameters param)
        {
            string name = param.GetParam <string>("Row name").Value;

            double[] groupCol = new double[mdata.ColumnCount];
            for (int i = 0; i < mdata.ColumnCount; i++)
            {
                string ename = mdata.ColumnNames[i];
                double value = param.GetParam <double>(ename).Value;
                groupCol[i] = value;
            }
            mdata.AddNumericRow(name, name, groupCol);
        }
 private static void ProcessDataCreate(IDataWithAnnotationRows mdata, Parameters param)
 {
     string name = param.GetParam<string>("Row name").Value;
     double[] groupCol = new double[mdata.ColumnCount];
     for (int i = 0; i < mdata.ColumnCount; i++){
         string ename = mdata.ColumnNames[i];
         double value = param.GetParam<double>(ename).Value;
         groupCol[i] = value;
     }
     mdata.AddNumericRow(name, name, groupCol);
 }