@Test public void testVerifyQualitySangerOutOfRange() { frag.setSequence(new Text("AGTAGTAGTAGTAGTAGTAGTAGTAGTAGT")); frag.setQuality( new Text("#############################" + Character.toString((char) 127))); // over range assertEquals( 29, SequencedFragment.verifyQuality( frag.getQuality(), FormatConstants.BaseQualityEncoding.Sanger)); frag.setQuality(new Text("##### ########################")); // under range assertEquals( 5, SequencedFragment.verifyQuality( frag.getQuality(), FormatConstants.BaseQualityEncoding.Sanger)); }
@Test public void testVerifyQualityIlluminaOutOfRange() { frag.setSequence(new Text("AGTAGTAGTAGTAGTAGTAGTAGTAGTAGT")); frag.setQuality(new Text("zzz=zzzzzzzzzzzzzzzzzzzzzzzzzz")); assertEquals( 3, SequencedFragment.verifyQuality( frag.getQuality(), FormatConstants.BaseQualityEncoding.Illumina)); }
@Test public void testVerifyQualitySangerOk() { frag.setSequence(new Text("AGTAGTAGTAGTAGTAGTAGTAGTAGTAGT")); frag.setQuality(new Text("##############################")); assertEquals( -1, SequencedFragment.verifyQuality( frag.getQuality(), FormatConstants.BaseQualityEncoding.Sanger)); }