WholeGenomeDuplication { public static boolean wholeGenomeDuplication(@NotNull final List<PurpleCopyNumber> copyNumbers) { return duplicatedAutosomes(copyNumbers) >= MIN_DUPLICATED_AUTOSOMES; }  static boolean wholeGenomeDuplication(@NotNull final List<PurpleCopyNumber> copyNumbers);  }
@Test public void testKeySet() { final List<PurpleCopyNumber> copyNumbers = Lists.newArrayList(); for (int i = 1; i <= 22; i++) { copyNumbers.add(create("1", 3, 1000)); copyNumbers.add(create(String.valueOf(i), 1, 1000)); } assertFalse(WholeGenomeDuplication.wholeGenomeDuplication(copyNumbers)); }
@Test public void testSexChromosomesExcluded() { final List<PurpleCopyNumber> copyNumbers = Lists.newArrayList(); for (int i = 1; i < MIN_DUPLICATED_AUTOSOMES; i++) { copyNumbers.add(create(String.valueOf(i), MIN_AVERAGE_PLOIDY, 1)); } assertFalse(wholeGenomeDuplication(copyNumbers)); copyNumbers.add(create("X", MIN_AVERAGE_PLOIDY, 1)); copyNumbers.add(create("Y", MIN_AVERAGE_PLOIDY, 1)); assertFalse(wholeGenomeDuplication(copyNumbers)); copyNumbers.add(create(String.valueOf(MIN_DUPLICATED_AUTOSOMES), MIN_AVERAGE_PLOIDY, 1)); assertTrue(wholeGenomeDuplication(copyNumbers)); }