コード例 #1
0
        private static MBT.Escience.BestSoFar <int, string> FindBest(Dictionary <string, int> originalAA0PositionToCount)
        {
            MBT.Escience.BestSoFar <int, string> bestSoFar = MBT.Escience.BestSoFar <int, string> .GetInstance(SpecialFunctions.IntGreaterThan);

            foreach (KeyValuePair <string, int> originalAA0PositionAndCount in originalAA0PositionToCount)
            {
                bestSoFar.Compare(originalAA0PositionAndCount.Value, originalAA0PositionAndCount.Key);
            }
            return(bestSoFar);
        }
コード例 #2
0
        private static Dictionary <string, string> FindMerStringToBestOriginalAA0Position(int merLength, TextWriter textWriterForWarnings, Dictionary <string, AASeq> caseToCompressedAASeq)
        {
            Dictionary <string, Dictionary <string, int> > merStringToOriginalAA0PositionToCount = CreateMerStringToOriginalAA0PositionToCount(merLength, textWriterForWarnings, caseToCompressedAASeq);
            Dictionary <string, string> merStringToBestOriginalAA0Position = new Dictionary <string, string>();

            foreach (string merString in merStringToOriginalAA0PositionToCount.Keys)
            {
                Dictionary <string, int>             originalAA0PositionToCount = merStringToOriginalAA0PositionToCount[merString];
                MBT.Escience.BestSoFar <int, string> best = FindBest(originalAA0PositionToCount);
                merStringToBestOriginalAA0Position.Add(merString, best.Champ);
            }
            return(merStringToBestOriginalAA0Position);
        }