Пример #1
0
        public void DnaStringTest()
        {
            Console.WriteLine(GetSize(TestString));
            var dnaString = new DnaString(TestString);

            Console.WriteLine(GetSize(dnaString.Content));
            string s = dnaString.ToString();

            Assert.AreEqual(TestString, s);
        }
Пример #2
0
        public void DnaStringWithBiasTest()
        {
            var dnaString = new DnaString(
                "GTTATTATGATGATCGGAGATTTGCCCTGTTCGTTATTGATAACGGGTTCACGGACCGAATGCGCCCTCGGCTCAGTACGAACGTTATAACGCGCACCGG",
                false,
                3);

            var rnaSequence = MaxRnaSequenceFinder.GetMaxRnaSequence(dnaString);

            Assert.AreEqual(
                "atgatgatcggagatttgccctgttcgttattgataacgggttcacggaccgaatgcgccctcggctcagtacgaacgttataa",
                string.Concat(rnaSequence.Values).ToLower());

            Assert.AreEqual(false, rnaSequence.Reversed);
            Assert.AreEqual(new DnaStringRange(9, 92), rnaSequence.DnaStringRange);
        }
Пример #3
0
        public void DnaStringWithTggTest()
        {
            var dnaString = new DnaString(
                string.Concat("ATG", "ATT", "TGG", "ATC", "GGG", "ATG", "GTA" + "TGC" + "TAG"),
                false,
                1);

            var rnaSequence = MaxRnaSequenceFinder.GetMaxRnaSequence(dnaString);

            Assert.AreEqual(
                string.Concat("ATG", "GTA" + "TGC" + "TAG"),
                string.Concat(rnaSequence.Values));

            Assert.AreEqual(false, rnaSequence.Reversed);
            Assert.AreEqual(new DnaStringRange(16, 27), rnaSequence.DnaStringRange);
            Assert.AreEqual(1, rnaSequence.ReadingFrame);
        }