public static boolean isBisulfiteConverted(final byte read, final byte reference) { return isBisulfiteConverted(read, reference, false); }
public static boolean isBisulfiteConverted(final byte read, final byte reference) { return isBisulfiteConverted(read, reference, false); }
public static boolean isBisulfiteConverted(final byte read, final byte reference) { return isBisulfiteConverted(read, reference, false); }
/** * Same as above, but use <code>readBaseMatchesRefBaseWithAmbiguity</code> instead of <code>basesEqual</code>. * Note that <code>isBisulfiteConverted</code> is not affected because it only applies when the * reference base is non-ambiguous. */ public static boolean bisulfiteBasesMatchWithAmbiguity(final boolean negativeStrand, final byte read, final byte reference) { return (readBaseMatchesRefBaseWithAmbiguity(read, reference)) || (isBisulfiteConverted(read, reference, negativeStrand)); }
/** Returns true if the bases are equal OR if the mismatch cannot be accounted for by * bisfulite treatment. C->T on the positive strand and G->A on the negative strand * do not count as mismatches */ public static boolean bisulfiteBasesEqual(final boolean negativeStrand, final byte read, final byte reference) { return (basesEqual(read, reference)) || (isBisulfiteConverted(read, reference, negativeStrand)); }
/** * Returns true if the bases are equal OR if the mismatch can be accounted for by * bisulfite treatment. C->T on the positive strand and G->A on the negative strand * do not count as mismatches. */ public static boolean bisulfiteBasesEqual(final boolean negativeStrand, final byte read, final byte reference) { return (basesEqual(read, reference)) || (isBisulfiteConverted(read, reference, negativeStrand)); }
/** * Same as above, but use <code>readBaseMatchesRefBaseWithAmbiguity</code> instead of <code>basesEqual</code>. * Note that <code>isBisulfiteConverted</code> is not affected because it only applies when the * reference base is non-ambiguous. */ public static boolean bisulfiteBasesMatchWithAmbiguity(final boolean negativeStrand, final byte read, final byte reference) { return (readBaseMatchesRefBaseWithAmbiguity(read, reference)) || (isBisulfiteConverted(read, reference, negativeStrand)); }
/** * Returns true if the bases are equal OR if the mismatch can be accounted for by * bisulfite treatment. C->T on the positive strand and G->A on the negative strand * do not count as mismatches. */ public static boolean bisulfiteBasesEqual(final boolean negativeStrand, final byte read, final byte reference) { return (basesEqual(read, reference)) || (isBisulfiteConverted(read, reference, negativeStrand)); }
@Test(dataProvider = "testBisulfiteConversionDataProvider") public void testBisulfiteConversion(final char readBase, final char refBase, final boolean posStrandExpected, final boolean negStrandExpected) { final boolean posStrand = SequenceUtil.isBisulfiteConverted((byte) readBase, (byte) refBase, false); Assert.assertEquals(posStrand, posStrandExpected); final boolean negStrand = SequenceUtil.isBisulfiteConverted((byte) readBase, (byte) refBase, true); Assert.assertEquals(negStrand, negStrandExpected); }
final CpgLocation curLocation = new CpgLocation(samRecord.getReferenceName(), curRefIndex); cpgTotal.increment(curLocation); if (SequenceUtil.isBisulfiteConverted(readFragment[i], refFragment[i])) { cpgConverted.increment(curLocation); if (SequenceUtil.isBisulfiteConverted(readFragment[i], refFragment[i])) { nCytoConverted++;
final CpgLocation curLocation = new CpgLocation(samRecord.getReferenceName(), curRefIndex); cpgTotal.increment(curLocation); if (SequenceUtil.isBisulfiteConverted(readFragment[i], refFragment[i])) { cpgConverted.increment(curLocation); if (SequenceUtil.isBisulfiteConverted(readFragment[i], refFragment[i])) { nCytoConverted++;