コード例 #1
0
        public void ValidateDnaDerivedSequenceGetReverseComplemented()
        {
            // Get input and expected values from xml
            string expectedSequence = utilityObj.xmlUtil.GetTextValue(
                Constants.DnaDerivedSequenceNode, Constants.ExpectedSequence);
            string alphabetName = utilityObj.xmlUtil.GetTextValue(
                Constants.DnaDerivedSequenceNode, Constants.AlphabetNameNode);
            string reverseCompObj = utilityObj.xmlUtil.GetTextValue(
                Constants.DnaDerivedSequenceNode, Constants.ReverseComplement);
            string derivedSequence = utilityObj.xmlUtil.GetTextValue(
                Constants.DnaDerivedSequenceNode, Constants.DerivedSequence);
            IAlphabet alphabet = Utility.GetAlphabet(alphabetName);

            // Create derived Sequence
            DerivedSequence derSequence = CreateDerivedSequence(
                alphabet, expectedSequence);

            // Validate IndexOf() derived Sequence.
            Assert.AreEqual(derivedSequence, new string(derSequence.Select(a => (char)a).ToArray()));
            Assert.AreEqual(reverseCompObj, new string(derSequence.GetReverseComplementedSequence().Select(a => (char)a).ToArray()));

            Console.WriteLine(
                "DerivedSequenceBvtTestCases:Validation of GetReverseComplementedSequence() method of derived sequence completed successfully");
            ApplicationLog.WriteLine(
                "DerivedSequenceBvtTestCases:Validation of GetReverseComplementedSequence() method of derived sequence completed successfully");
        }
コード例 #2
0
ファイル: DeriveSequenceTests.cs プロジェクト: cpatmoore/bio
 public void TestGetReverseComplementedSequence()
 {
     const string sequence = "ATGCC";
     const string expectedSequence = "GGCAT";
     ISequence orignalSequence = new Sequence(Alphabets.DNA, sequence);
     DerivedSequence deriveSequence = new DerivedSequence(orignalSequence, false, false);
     string actualSequence = new string(deriveSequence.GetReverseComplementedSequence().Select(a => (char)a).ToArray());
     Assert.AreEqual(expectedSequence, actualSequence);
 }
コード例 #3
0
        public void TestGetReverseComplementedSequence()
        {
            const string    sequence         = "ATGCC";
            const string    expectedSequence = "GGCAT";
            ISequence       orignalSequence  = new Sequence(Alphabets.DNA, sequence);
            DerivedSequence deriveSequence   = new DerivedSequence(orignalSequence, false, false);
            string          actualSequence   = new string(deriveSequence.GetReverseComplementedSequence().Select(a => (char)a).ToArray());

            Assert.AreEqual(expectedSequence, actualSequence);
        }