//public static KeepSpecificRows GetInstance() //{ // List<KeepSpecificRow> keepList = new List<KeepSpecificRow>(); // //// this is the list of associations that have q < 0.01 in Gag Within gene. // //keepList.Add(KeepSpecificRow.GetInstance(2134, "P", 2146, "L")); // //keepList.Add(KeepSpecificRow.GetInstance(2134, "L", 2146, "P")); // //keepList.Add(KeepSpecificRow.GetInstance(2146, "P", 2134, "L")); // //keepList.Add(KeepSpecificRow.GetInstance(2146, "L", 2134, "P")); // //keepList.Add(KeepSpecificRow.GetInstance(1957, "I", 1990, "L")); // //keepList.Add(KeepSpecificRow.GetInstance(1990, "L", 1957, "I")); // //keepList.Add(KeepSpecificRow.GetInstance(2215, "K", 2227, "D")); // //keepList.Add(KeepSpecificRow.GetInstance(1579, "K", 1306, "A")); // //keepList.Add(KeepSpecificRow.GetInstance(1957, "V", 1990, "I")); // //keepList.Add(KeepSpecificRow.GetInstance(1306, "A", 1579, "K")); // //keepList.Add(KeepSpecificRow.GetInstance(1591, "M", 1579, "K")); // //keepList.Add(KeepSpecificRow.GetInstance(1579, "K", 1591, "M")); // //keepList.Add(KeepSpecificRow.GetInstance(1591, "M", 1306, "A")); // //keepList.Add(KeepSpecificRow.GetInstance(2206, "P", 2182, "F")); // //keepList.Add(KeepSpecificRow.GetInstance(1591, "L", 1579, "R")); // //keepList.Add(KeepSpecificRow.GetInstance(2227, "D", 2215, "K")); // //keepList.Add(KeepSpecificRow.GetInstance(1306, "A", 1591, "M")); // //keepList.Add(KeepSpecificRow.GetInstance(1471, "I", 1531, "T")); // //keepList.Add(KeepSpecificRow.GetInstance(1579, "R", 1591, "L")); // //keepList.Add(KeepSpecificRow.GetInstance(2206, "P", 2176, "F")); // //keepList.Add(KeepSpecificRow.GetInstance(2206, "P", 2215, "K")); // //keepList.Add(KeepSpecificRow.GetInstance(2239, "E", 2224, "E")); // //keepList.Add(KeepSpecificRow.GetInstance(2224, "E", 2239, "E")); // //keepList.Add(KeepSpecificRow.GetInstance(2215, "G", 2206, "G")); // //keepList.Add(KeepSpecificRow.GetInstance(2206, "G", 2215, "G")); // //keepList.Add(KeepSpecificRow.GetInstance(1531, "T", 1471, "I")); // //keepList.Add(KeepSpecificRow.GetInstance(2176, "Q", 2170, "Q")); // //keepList.Add(KeepSpecificRow.GetInstance(2170, "Q", 2176, "Q")); // //keepList.Add(KeepSpecificRow.GetInstance(2212, "P", 2185, "E")); // //keepList.Add(KeepSpecificRow.GetInstance(2185, "E", 2212, "P")); // //keepList.Add(KeepSpecificRow.GetInstance(895, "W", 889, "I")); // //keepList.Add(KeepSpecificRow.GetInstance(904, "R", 889, "I")); // //keepList.Add(KeepSpecificRow.GetInstance(904, "R", 895, "W")); // //keepList.Add(KeepSpecificRow.GetInstance(901, "C", 889, "I")); // return GetInstance(keepList); //} public static KeepSpecificRows GetInstance(string semiColonDelimitedRows) { string[] rowDefs = semiColonDelimitedRows.Split(';'); SpecialFunctions.CheckCondition(rowDefs.Length > 0); List <KeepSpecificRow> rows = new List <KeepSpecificRow>(rowDefs.Length); foreach (string row in rowDefs) { rows.Add(KeepSpecificRow.GetInstance(row)); } return(GetInstance(rows)); }
new public static KeepTest <Dictionary <string, string> > GetInstance(string inputDirectory, string binarySeqFileName, string hlaFileName, string keepTestName, int merSize, Dictionary <int, string> pidToCaseName) { //!!!would be nice of classes could parse themselves if (keepTestName.StartsWith(KeepEndOfGag.Prefix)) { bool keepIt = bool.Parse(keepTestName.Substring(KeepEndOfGag.Prefix.Length)); return(KeepEndOfGag.GetInstance(keepIt)); } else if (keepTestName.StartsWith(K1.Prefix)) { int k1 = int.Parse(keepTestName.Substring(K1.Prefix.Length)); return(K1.GetInstance(k1)); } //else if (keepTestName.StartsWith(K2.Prefix)) //{ // int k2 = int.Parse(keepTestName.Substring(K2.Prefix.Length)); // return K2.GetInstance(k2); //} else if (keepTestName.StartsWith(KeepNonOverlappingAA.Prefix)) { return(KeepNonOverlappingAA.GetInstance()); } else if (keepTestName.StartsWith(KeepGene.Prefix)) { string geneRange = keepTestName.Substring(KeepGene.Prefix.Length); return(KeepGene.GetInstance(geneRange)); } else if (keepTestName.StartsWith(KeepSpecificRows.Prefix)) { return(KeepSpecificRows.GetInstance(keepTestName.Substring(KeepSpecificRows.Prefix.Length))); } else if (keepTestName.StartsWith(KeepSpecificRow.Prefix)) { return(KeepSpecificRow.GetInstance(keepTestName.Substring(KeepSpecificRow.Prefix.Length))); } else if (keepTestName.StartsWith(KeepSpecificGenes.Prefix)) { return(KeepSpecificGenes.GetInstance(keepTestName.Substring(KeepSpecificGenes.Prefix.Length))); } else if (keepTestName.StartsWith(KeepOneOfAAPair.Prefix)) { return(KeepOneOfAAPair.GetInstance()); } else if (keepTestName.StartsWith(KeepAllButSamePosition.Prefix)) { return(KeepAllButSamePosition.GetInstance()); } else if (keepTestName.StartsWith(KeepAllButSameDeletion.Prefix)) { return(KeepAllButSameDeletion.GetInstance()); } else if (keepTestName.StartsWith(KeepNonTrivialRows.Prefix)) { return(new KeepNonTrivialRows()); } else if (keepTestName.StartsWith(KeepTestTemp.Prefix)) { return(KeepTestTemp.GetInstance()); } //else if (keepTestName.StartsWith(KeepPollockOneDirection.Prefix)) //{ // return KeepPollockOneDirection.GetInstance(keepTestName.Substring(KeepPollockOneDirection.Prefix.Length)); //} //else if (keepTestName.StartsWith(KeepFisherOneDirection.Prefix)) //{ // return KeepFisherOneDirection.GetInstance(keepTestName.Substring(KeepFisherOneDirection.Prefix.Length)); //} else if (keepTestName.StartsWith(KeepNonRare.Prefix)) { return(KeepNonRare.GetInstance(keepTestName.Substring(KeepNonRare.Prefix.Length))); } else if (keepTestName.StartsWith(KeepPredictorTargetPairs.Prefix)) { return(KeepPredictorTargetPairs.GetInstance(keepTestName.Substring(KeepPredictorTargetPairs.Prefix.Length))); } else if (keepTestName.StartsWith("JointGagPolTest")) { return(And <Dictionary <string, string> > .GetInstance( //KeepRandom<Dictionary<string,string>>.GetInstance(0, 0.001), // how do we make it the same when we count and when we really run through it? KeepOneOfAAPair.GetInstance(), KeepNonOverlappingAA.GetInstance(), KeepSpecificGenes.GetInstance(keepTestName.Substring("JointGagPolTest".Length)))); } else { return(KeepTest <TRow> .GetInstance(inputDirectory, binarySeqFileName, null, keepTestName, merSize, pidToCaseName)); } }