예제 #1
0
  /**
   * Test importing of Clinical Data File.
   *
   * @throws DaoException Database Access Error.
   * @throws IOException IO Error.
   */
  @Test
  @Ignore("To be fixed")
  public void testImportClinicalDataSlice() throws Exception {

    // TBD: change this to use getResourceAsStream()
    File clinicalFile = new File("target/test-classes/clinical_data.txt");
    ImportClinicalData importClinicalData = new ImportClinicalData(study, clinicalFile);
    importClinicalData.importData();

    List<ClinicalParameterMap> slice =
        DaoClinicalData.getDataSlice(study.getInternalId(), Arrays.asList("PLATINUMSTATUS"));
    assertTrue(slice.size() >= 1);

    ClinicalParameterMap paramMap = slice.get(0);
    assertEquals("PLATINUMSTATUS", paramMap.getName());
    assertEquals("Sensitive", paramMap.getValue("TCGA-A1-A0SD"));
    assertEquals("NA", paramMap.getValue("TCGA-A1-A0SE"));
    assertEquals(2, paramMap.getDistinctCategories().size());
  }