@Test public void testFilterDuplicateAFPs() throws Exception { int[][][] dupAlign = new int[1][2][]; int ca2len = 12; dupAlign[0][0] = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13 }; dupAlign[0][1] = new int[] { 3, 5, 6, 7, 8, 9,10,11, 0+ca2len, 1+ca2len, 2+ca2len, 3+ca2len, 4+ca2len, 7+ca2len }; Atom[] ca1,ca2; ca1 = makeDummyCA(dupAlign[0][0].length); ca2 = makeDummyCA(ca2len); ca2 = StructureTools.duplicateCA2(ca2); AFPChain afp = makeDummyAFPChain(dupAlign, ca1, ca2); AFPChain newAFP = CeCPMain.filterDuplicateAFPs(afp, new CECalculator(null), ca1, ca2, 0); int[][][] align = newAFP.getOptAln(); int[] blkLen = newAFP.getOptLen(); int[][][] expected = new int[][][] { new int[][] { new int[] { 1, 2, 3, 4, 5, 6, 7, }, new int[] { 5, 6, 7, 8, 9, 10, 11, }, }, new int[][] { new int[] { 8, 9, 10, 11, 12, }, new int[] { 0, 1, 2, 3, 4, }, }, }; int[] expectedLen = new int[] { expected[0][0].length, expected[1][0].length }; assertTrue(Arrays.deepEquals(expected, align)); assertTrue(Arrays.equals(expectedLen, blkLen)); }
public static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc, Atom[] ca1, Atom[] ca2duplicated) throws StructureException { return filterDuplicateAFPs(afpChain, ceCalc, ca1, ca2duplicated, DEFAULT_MIN_CP_LENGTH); }
CeCPMain extends CeMain { public static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc, Atom[] ca1, Atom[] ca2duplicated) throws StructureException { return filterDuplicateAFPs(afpChain, ceCalc, ca1, ca2duplicated, DEFAULT_MIN_CP_LENGTH); } }
CeCPMain extends CeMain { public static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc, Atom[] ca1, Atom[] ca2duplicated) throws StructureException { return filterDuplicateAFPs(afpChain, ceCalc, ca1, ca2duplicated, DEFAULT_MIN_CP_LENGTH); } CeCPMain(); }
CeCPMain extends CeMain { public static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc, Atom[] ca1, Atom[] ca2duplicated) throws StructureException { return filterDuplicateAFPs(afpChain, ceCalc, ca1, ca2duplicated, DEFAULT_MIN_CP_LENGTH); } CeCPMain(); @Override String getAlgorithmName(); @Override String getVersion(); static void main(String[] args); @Override AFPChain align(Atom[] ca1, Atom[] ca2, Object param); static AFPChain postProcessAlignment(AFPChain afpChain, Atom[] ca1, Atom[] ca2m,CECalculator calculator ); static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc, Atom[] ca1, Atom[] ca2duplicated); static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc,
			Atom[] ca1, Atom[] ca2duplicated, int minCPlength); }
CeCPMain extends CeMain { public static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc, Atom[] ca1, Atom[] ca2duplicated) throws StructureException { return filterDuplicateAFPs(afpChain, ceCalc, ca1, ca2duplicated, DEFAULT_MIN_CP_LENGTH); } CeCPMain(); @Override String getAlgorithmName(); @Override String getVersion(); static void main(String[] args); @Override AFPChain align(Atom[] ca1, Atom[] ca2, Object param); static AFPChain postProcessAlignment(AFPChain afpChain, Atom[] ca1, Atom[] ca2m,CECalculator calculator ); static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc, Atom[] ca1, Atom[] ca2duplicated); static AFPChain filterDuplicateAFPs(AFPChain afpChain, CECalculator ceCalc,
			Atom[] ca1, Atom[] ca2duplicated, int minCPlength); static final String algorithmName; static final int DEFAULT_MIN_CP_LENGTH; static final String version; }