Esempio n. 1
0
 // test multiple derived data with no scan , multiple normalizations.
 @Test
 public void testNoScanWithNorm() {
   MageTabDocumentSet ds = getDocumentSet(TestMageTabSets.MULTI_NO_SCAN_2_INPUT_SET);
   CaArrayFileSet fileSet = TestMageTabSets.getFileSet(ds);
   CaArrayTranslationResult result = this.translator.translate(ds, fileSet);
   Experiment experiment = result.getInvestigations().iterator().next();
   Hybridization hyb = experiment.getHybridizations().iterator().next();
   checkPaCollection(hyb.getProtocolApplications(), "Scan");
   RawArrayData rad = hyb.getRawDataCollection().iterator().next();
   checkPaCollection(
       rad.getProtocolApplications(),
       "normalization-protocol-1",
       "normalization-protocol-2",
       "derived-data-protocol-1",
       "derived-data-protocol-2");
   for (DerivedArrayData d : hyb.getDerivedDataCollection()) {
     if (d.getName().equals("test.data")) {
       checkPaCollection(d.getProtocolApplications());
     } else if (d.getName().equals("test2.data")) {
       checkPaCollection(d.getProtocolApplications());
     } else {
       fail(d.getName());
     }
   }
 }
Esempio n. 2
0
 // test normalization protocols end up in raw data.
 @Test
 public void testNormal_3() {
   MageTabDocumentSet ds = getDocumentSet(TestMageTabSets.NORMAL_3_INPUT_SET);
   CaArrayFileSet fileSet = TestMageTabSets.getFileSet(ds);
   CaArrayTranslationResult result = this.translator.translate(ds, fileSet);
   Experiment experiment = result.getInvestigations().iterator().next();
   Hybridization hyb = experiment.getHybridizations().iterator().next();
   RawArrayData rad = hyb.getRawDataCollection().iterator().next();
   checkPaCollection(rad.getProtocolApplications(), "TRANPRTCL10656", "derived-data-protocol");
   DerivedArrayData dad = hyb.getDerivedDataCollection().iterator().next();
   checkPaCollection(dad.getProtocolApplications());
 }
Esempio n. 3
0
 @Test
 public void testNoNormNoDerivedData() {
   MageTabDocumentSet ds = getDocumentSet(TestMageTabSets.NO_DERIVED_2_INPUT_SET);
   CaArrayFileSet fileSet = TestMageTabSets.getFileSet(ds);
   CaArrayTranslationResult result = this.translator.translate(ds, fileSet);
   Experiment experiment = result.getInvestigations().iterator().next();
   Hybridization hyb = experiment.getHybridizations().iterator().next();
   checkPaCollection(hyb.getProtocolApplications(), "Scan");
   RawArrayData rad = hyb.getRawDataCollection().iterator().next();
   checkPaCollection(rad.getProtocolApplications(), "TRANPRTCL10656");
   assertTrue(hyb.getDerivedDataCollection().isEmpty());
 }
Esempio n. 4
0
 /*
  * Tests to make sure that Characteristic categories with various forms of
  * "external id", regardless of spaces and case, get translated into the
  * "externalId" attribute of the biomaterial.
  */
 @Test
 public void testExternalIds() {
   MageTabDocumentSet ds = getDocumentSet(TestMageTabSets.EXTERNAL_ID_1_INPUT_SET);
   CaArrayFileSet fileSet = TestMageTabSets.getFileSet(ds);
   CaArrayTranslationResult result = this.translator.translate(ds, fileSet);
   Experiment experiment = result.getInvestigations().iterator().next();
   Source src = experiment.getSources().iterator().next();
   String sourceExternalId = src.getExternalId();
   assertTrue(SOURCE_1_EXTERNAL_ID.equals(sourceExternalId));
   Sample sampl = experiment.getSamples().iterator().next();
   String sampleExternalId = sampl.getExternalId();
   assertTrue(SAMPLE_1_EXTERNAL_ID.equals(sampleExternalId));
 }
Esempio n. 5
0
 @Test
 public void testNormal_1() {
   MageTabDocumentSet ds = getDocumentSet(TestMageTabSets.NORMAL_1_INPUT_SET);
   CaArrayFileSet fileSet = TestMageTabSets.getFileSet(ds);
   CaArrayTranslationResult result = this.translator.translate(ds, fileSet);
   Experiment experiment = result.getInvestigations().iterator().next();
   Hybridization hyb = experiment.getHybridizations().iterator().next();
   checkPaCollection(hyb.getProtocolApplications(), "Scan");
   for (RawArrayData rad : hyb.getRawDataCollection()) {
     if (rad.getName().equals("test1.CEL")) {
       checkPaCollection(rad.getProtocolApplications());
     } else if (rad.getName().equals("test2.CEL")) {
       checkPaCollection(rad.getProtocolApplications(), "TRANPRTCL10656");
     } else {
       fail(rad.getName());
     }
   }
   DerivedArrayData dad = hyb.getDerivedDataCollection().iterator().next();
   checkPaCollection(dad.getProtocolApplications());
 }