Exemplo n.º 1
0
 @Test
 public void FAM_writer() throws Exception {
   File newFam = new File(testFam.getAbsolutePath().replace(testFam.getName(), "new.fam"));
   FamFileWriter w = new FamFileWriter(newFam);
   try {
     w.writeAll(famfd.getAllEntries());
     boolean filesAreEqual = DirectoryCompare.compareFileContent(testFam, newFam);
     assertTrue(filesAreEqual);
   } finally {
     w.close();
   }
 }
Exemplo n.º 2
0
  @Test
  public void FAM_getEntries() throws Exception {
    assertEquals(1, famfd.getEntries(0, 1).size());
    assertEquals(1, famfd.getEntries(1, 2).size());
    assertEquals(2, famfd.getEntries(0, 2).size());
    assertEquals(6, famfd.getEntries(0, 6).size());

    assertEquals("1", famfd.getEntries(0, 1).get(0).getFamily());
    assertEquals("2", famfd.getEntries(0, 2).get(1).getFamily());

    assertEquals("5", famfd.getEntries(3, 5).get(1).getFamily());
    assertEquals("6", famfd.getEntries(0, 6).get(5).getFamily());

    assertEquals(1.0, famfd.getAllEntries().get(2).getPhenotype());
    assertEquals(2.0, famfd.getAllEntries().get(3).getPhenotype());
  }