Пример #1
0
        public void ValidateFVQSPContains()
        {
            FileVirtualQualitativeSequenceProvider provObj =
                GetVirtualSequenceProvider();

            IQualitativeSequence seqObj =
                new QualitativeSequence(Alphabets.DNA, FastQFormatType.Illumina, "AGGCT");

            provObj.Add(seqObj[0]);
            provObj.Add(seqObj[1]);
            Assert.IsTrue(provObj.Contains(seqObj[0]));

            ApplicationLog.WriteLine(@"FVQSP Bvt : Successfully validated the Contains() method");
            Console.WriteLine(@"FVQSP Bvt : Successfully validated the Contains() method");
        }
Пример #2
0
        public void ValidateFVQSPRemoveAt()
        {
            FileVirtualQualitativeSequenceProvider provObj =
                GetVirtualSequenceProvider();

            IQualitativeSequence seqObj =
                new QualitativeSequence(Alphabets.DNA, FastQFormatType.Illumina, "AGGCT");

            provObj.Add(seqObj[0]);
            provObj.Add(seqObj[1]);
            provObj.Add(seqObj[2]);
            provObj.RemoveAt(0);

            Assert.AreEqual(seqObj[1].Name, provObj.GetISequenceItem(0).Name);
            ApplicationLog.WriteLine(@"FVQSP Bvt : Successfully validated the RemoveAt() method");
            Console.WriteLine(@"FVQSP Bvt : Successfully validated the RemoveAt() method");
        }
Пример #3
0
        public void ValidateFVQSPReplaceRange()
        {
            FileVirtualQualitativeSequenceProvider provObj =
                GetVirtualSequenceProvider();

            IQualitativeSequence seqObj =
                new QualitativeSequence(Alphabets.DNA, FastQFormatType.Illumina, "AGGC");

            provObj.Add(seqObj[0]);
            provObj.Add(seqObj[1]);
            provObj.ReplaceRange(provObj.Count - 2, "GC");

            Assert.AreEqual(seqObj[2].Name, provObj[provObj.Count - 2].Name);
            Assert.AreEqual(seqObj[3].Name, provObj[provObj.Count - 1].Name);

            ApplicationLog.WriteLine(@"FVQSP Bvt : Successfully validated the ReplaceRange() method");
            Console.WriteLine(@"FVQSP Bvt : Successfully validated the ReplaceRange() method");
        }
Пример #4
0
        public void ValidateFVQSPReplaceChar()
        {
            FileVirtualQualitativeSequenceProvider provObj =
                GetVirtualSequenceProvider();

            IQualitativeSequence seqObj =
                new QualitativeSequence(Alphabets.DNA, FastQFormatType.Illumina, "AGGCT");

            provObj.Add(seqObj[0]);
            provObj.Add(seqObj[1]);
            provObj.Add(seqObj[2]);
            provObj.Add(seqObj[3]);
            provObj.Replace(0, 'C');

            Assert.AreEqual(seqObj[3], provObj[0]);

            ApplicationLog.WriteLine(
                "FVQSP Bvt : Successfully validated the Replace(int, char) method");
            Console.WriteLine(
                "FVQSP Bvt : Successfully validated the Replace(int, char) method");
        }
Пример #5
0
        public void ValidateFVQSPCopyToByteArray()
        {
            FileVirtualQualitativeSequenceProvider provObj =
                GetVirtualSequenceProvider();

            IQualitativeSequence seqObj =
                new QualitativeSequence(Alphabets.DNA, FastQFormatType.Illumina, "AGGCT");

            provObj.Add(seqObj[0]);
            byte[] byteArray = new byte[provObj.Count];
            provObj.CopyTo(byteArray, 0);

            Assert.AreEqual("A", seqObj[0].Symbol.ToString());

            ApplicationLog.WriteLine("FVQSP Bvt : Successfully validated the CopyTo() method");
            Console.WriteLine("FVQSP Bvt : Successfully validated the CopyTo() method");
        }
Пример #6
0
        public void ValidateFVQSPCopyTo()
        {
            FileVirtualQualitativeSequenceProvider provObj =
                GetVirtualSequenceProvider();

            IQualitativeSequence seqObj =
                new QualitativeSequence(Alphabets.DNA, FastQFormatType.Illumina, "AGGCT");

            provObj.Add(seqObj[0]);
            ISequenceItem[] aryObj = new ISequenceItem[provObj.Count];
            provObj.CopyTo(aryObj, 0);

            Assert.AreEqual(aryObj[provObj.Count - 1].Name, seqObj[0].Name);

            ApplicationLog.WriteLine(@"FVQSP Bvt : Successfully validated the CopyTo() method");
            Console.WriteLine(@"FVQSP Bvt : Successfully validated the CopyTo() method");
        }