public void ConvertIlluminaToSangerAndSolexa() { // Gets the actual sequence and the Qual score from the Xml string illuminaSequence = utilityObj.xmlUtil.GetTextValue( Constants.IlluminaToSangerAndSolexaNode, Constants.IlluminaSequence); string illuminaQualScore = utilityObj.xmlUtil.GetTextValue( Constants.IlluminaToSangerAndSolexaNode, Constants.IlluminaQualScore); string expectedSangerQualScore = utilityObj.xmlUtil.GetTextValue( Constants.IlluminaToSangerAndSolexaNode, Constants.SangerQualScore); string expectedSolexaQualScore = utilityObj.xmlUtil.GetTextValue( Constants.IlluminaToSangerAndSolexaNode, Constants.SolexaQualScore); byte[] illuminaSequenceinBytes = UTF8Encoding.UTF8.GetBytes(illuminaSequence); byte[] illuminaQualScoreinBytes = UTF8Encoding.UTF8.GetBytes(illuminaQualScore); byte[] sangerQualScore = QualitativeSequence.ConvertFromIlluminaToSanger(illuminaQualScoreinBytes); string qualSequenceSanger = new string(UTF8Encoding.UTF8.GetChars(sangerQualScore)); // Validate converted sanger score. Assert.AreEqual(expectedSangerQualScore, qualSequenceSanger); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Qualitative Sequence BVT:Qualitative Sanger score type {0} is as expected.", sangerQualScore)); byte[] solexaQualScore = QualitativeSequence.ConvertFromIlluminaToSolexa(illuminaQualScoreinBytes); string qualSequenceSolexa = new string(UTF8Encoding.UTF8.GetChars(solexaQualScore)); // Validate converted illumina score. Assert.AreEqual(expectedSolexaQualScore, qualSequenceSolexa); ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Qualitative Sequence BVT:Qualitative Solexa format type {0} is as expected.", illuminaQualScore)); }
public void TestConvertFromIlluminaToSanger() { byte[] bs; byte[] bs1 = new byte[2]; bs1[0] = (byte)64; bs1[1] = (byte)64; bs = QualitativeSequence.ConvertFromIlluminaToSanger(bs1); Assert.IsNotNull((object)bs); Assert.AreEqual <int>(2, bs.Length); Assert.AreEqual <byte>((byte)33, bs[0]); Assert.AreEqual <byte>((byte)33, bs[1]); }
public void TestConvertFromIlluminaToSanger() { byte[] sangerScores; byte[] illuminaScores = new byte[2]; illuminaScores[0] = (byte)64; illuminaScores[1] = (byte)64; sangerScores = QualitativeSequence.ConvertFromIlluminaToSanger(illuminaScores); Assert.IsNotNull((object)sangerScores); Assert.AreEqual <int>(2, sangerScores.Length); Assert.AreEqual <byte>((byte)33, sangerScores[0]); Assert.AreEqual <byte>((byte)33, sangerScores[1]); }