public static List <BiasTestResult> GetStrandResultsFromFile(string biasFile)
        {
            var results = new List <BiasTestResult>();

            if (File.Exists(biasFile))
            {
                using (StreamReader sr = new StreamReader(biasFile))
                {
                    while (true)
                    {
                        string line = sr.ReadLine();

                        if (string.IsNullOrEmpty(line))
                        {
                            break;
                        }

                        var result = BiasTestResult.ResultFromLine(line);

                        if (result != null)
                        {
                            results.Add(result);
                        }
                    }
                }
            }

            return(results);
        }
        public static BiasTestResult ResultFromLine(string line)
        {
            var result = new BiasTestResult();

            string[] splat = line.Split('\t');

            //header line
            if (splat[0] == _headerString[0])
            {
                return(null);
            }

            if (splat.Length < _headerString.Length)
            {
                throw new System.Exception("Check strand bias file format matches the unit test.");
            }

            for (int i = 0; i < _headerString.Length; i++)
            {
                string value     = splat[i];
                string colHeader = _headerString[i];

                switch (colHeader)
                {
                case "Position":
                    result.Position = int.Parse(value);
                    break;

                case "Reference":
                    result.ReferenceAllele = value;
                    break;

                case "Alternate":
                    result.AlternateAllele = value;
                    break;

                case "Overall_Support":
                    result.OverallSupport = int.Parse(value);
                    break;

                case "Overall_Coverage":
                    result.OverallCoverage = int.Parse(value);
                    break;

                case "Forward_Support":
                    result.FinalFRSupport[0] = int.Parse(value);
                    break;

                case "Reverse_Support":
                    result.FinalFRSupport[1] = int.Parse(value);
                    break;

                case "Forward_Coverage":
                    result.FinalFRCoverage[0] = int.Parse(value);
                    break;

                case "Reverse_Coverage":
                    result.FinalFRCoverage[1] = int.Parse(value);
                    break;

                case "RawSupportCountByReadType_0":
                    result.RawFRSSupport[0] = int.Parse(value);
                    break;

                case "RawSupportCountByReadType_1":
                    result.RawFRSSupport[1] = int.Parse(value);
                    break;

                case "RawSupportCountByReadType_2":
                    result.RawFRSSupport[2] = int.Parse(value);
                    break;

                case "RawCoverageCountByReadType_0":
                    result.RawFRSCoverage[0] = int.Parse(value);
                    break;

                case "RawCoverageCountByReadType_1":
                    result.RawFRSCoverage[1] = int.Parse(value);
                    break;

                case "RawCoverageCountByReadType_2":
                    result.RawFRSCoverage[2] = int.Parse(value);
                    break;

                case "BiasAcceptable?":
                    result.HasStrandBias = !(bool.Parse(value));
                    break;

                default:
                    break;
                }
            }

            return(result);
        }