AmberBAFFile { @NotNull public static Multimap<Chromosome, AmberBAF> read(@NotNull final String fileName) throws IOException { return fromLines(Files.readAllLines(new File(fileName).toPath())); } private  AmberBAFFile(); @NotNull static String generateAmberFilenameForWriting(@NotNull final String basePath, @NotNull final String sample); @NotNull static String generateAmberFilenameForReading(@NotNull final String basePath, @NotNull final String sample); @NotNull static Multimap<Chromosome, AmberBAF> read(@NotNull final String fileName); static void write(@NotNull final String filename, @NotNull final Multimap<String, AmberBAF> bafs); static void write(@NotNull final String filename, @NotNull final List<AmberBAF> bafs);  }
@Test public void testNewOldCompatibility() throws IOException { final List<AmberBAF> oldFormat = Lists.newArrayList(AmberBAFFile.read(OLD_AMBER_BAF_PATH).get(HumanChromosome._1)); final List<AmberBAF> newFormat = Lists.newArrayList(AmberBAFFile.read(NEW_AMBER_BAF_PATH).get(HumanChromosome._1)); for (int i = 0; i < oldFormat.size(); i++) { final AmberBAF oldBaf = oldFormat.get(i); final AmberBAF newBaf = newFormat.get(i); assertEquals(oldBaf.chromosome(), newBaf.chromosome()); assertEquals(oldBaf.position(), newBaf.position()); assertEquals(oldBaf.tumorBAF(), newBaf.tumorBAF(), EPSILON); assertEquals(oldBaf.tumorModifiedBAF(), newBaf.tumorModifiedBAF(), EPSILON); assertEquals(0, oldBaf.normalDepth()); assertEquals(0, oldBaf.tumorDepth()); } }
@Test public void testHG38Compatibility() throws IOException { final List<AmberBAF> hg38 = Lists.newArrayList(AmberBAFFile.read(HG38_PATH).get(HumanChromosome._1)); assertEquals(6, hg38.size()); }