예제 #1
0
        public int PatternCount(string text, string pattern)
        {
            var dnaText    = new DnaString(text);
            var dnaPattern = new DnaString(pattern);

            return(dnaText.PatternCount(dnaPattern));
        }
예제 #2
0
        public IEnumerable <string> ClumpFinding(string genome, int k, int windowLength, int times)
        {
            var dnaGenome = new DnaString(genome);
            IEnumerable <DnaString> slumps = dnaGenome.ClumpFinding(k, windowLength, times);

            return(slumps.Select(w => w.ToString()));
        }
예제 #3
0
        public string ReverseComplement(string pattern)
        {
            var       dnaPattern           = new DnaString(pattern);
            DnaString dnaReverseComplement = dnaPattern.GetReverseComplement();

            return(dnaReverseComplement.ToString());
        }
예제 #4
0
        public IEnumerable <int> PatternMatching(string pattern, string genome)
        {
            var dnaPattern = new DnaString(pattern);
            var dnaGenome  = new DnaString(genome);

            return(dnaGenome.PatternMatching(dnaPattern));
        }
예제 #5
0
        public IEnumerable <string> FrequentWords(string text, int k)
        {
            var dnaText = new DnaString(text);
            IEnumerable <DnaString> words = dnaText.FrequentWords(k);

            return(words.Select(w => w.ToString()));
        }