Ejemplo n.º 1
0
        public void ValidatePairwiseSequenceAlignmentToString()
        {
            IPairwiseSequenceAlignment align = new PairwiseSequenceAlignment();
            var alignedSeq = new PairwiseAlignedSequence();

            alignedSeq.FirstSequence  = new Sequence(Alphabets.Protein, "AWGHE");
            alignedSeq.SecondSequence = new Sequence(Alphabets.Protein, "AW-HE");
            alignedSeq.Consensus      = new Sequence(Alphabets.Protein, "AWGHE");
            alignedSeq.Score          = 28;
            alignedSeq.FirstOffset    = 0;
            alignedSeq.SecondOffset   = 3;
            align.PairwiseAlignedSequences.Add(alignedSeq);

            string actualString   = align.ToString();
            string expectedString = "AWGHE\r\nAWGHE\r\nAW-HE\r\n\r\n".Replace("\r\n", System.Environment.NewLine);

            Assert.AreEqual(actualString, expectedString);
        }
Ejemplo n.º 2
0
        public void TestPairwiseSequenceAlignmentToString()
        {
            IPairwiseSequenceAlignment align      = new PairwiseSequenceAlignment();
            PairwiseAlignedSequence    alignedSeq = new PairwiseAlignedSequence();

            alignedSeq.FirstSequence  = new Sequence(Alphabets.Protein, "AWGHE");
            alignedSeq.SecondSequence = new Sequence(Alphabets.Protein, "AW-HE");
            alignedSeq.Consensus      = new Sequence(Alphabets.Protein, "AWGHE");
            alignedSeq.Score          = 28;
            alignedSeq.FirstOffset    = 0;
            alignedSeq.SecondOffset   = 3;
            align.PairwiseAlignedSequences.Add(alignedSeq);

            string actualString   = align.ToString();
            string expectedString = "AWGHE\r\nAWGHE\r\nAW-HE\r\n\r\n";

            Assert.AreEqual(actualString, expectedString);
        }