Changeset 4025
- Timestamp:
- Nov 30, 2007, 3:08:47 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/test/roles/index.html
r4013 r4025 575 575 <td>Sample</td> 576 576 </tr> 577 <tr> 578 <td>Dye swap</td> 579 <td>Boolean</td> 580 <td>-</td> 581 <td>-</td> 582 <td>Raw bioassay</td> 583 </tr> 577 584 </table> 578 585 <p> … … 974 981 </tr> 975 982 </table> 983 <p> 984 </li> 985 986 <li> 987 Annotate the file formats: 988 <table class="listing" cellspacing="0" cellpadding="2" border="0"> 989 <tr> 990 <th>File format</th> 991 <th>Annotation</th> 992 <th>Value</th> 993 </tr> 994 <tr> 995 <td>Raw data for project A</td> 996 <td>Dye swap</td> 997 <td>false</td> 998 </tr> 999 <tr> 1000 <td>Raw data for project A (dye swap)</td> 1001 <td>Dye swap</td> 1002 <td>true</td> 1003 </tr> 1004 </table> 1005 This will make the raw data importer automatically annotate the 1006 raw bioassays with the specified annotations. 976 1007 <p> 977 1008 </li> … … 1061 1092 <li>Continue and wait for the import to finish. It should create 36,864 features and 48 blocks.</li> 1062 1093 </ol> 1094 <p> 1095 </li> 1096 1097 <li> 1098 Set project defaults. Go to the projects page and edit the 1099 <code>Project A</code> project. On the <code>Defaults</code> 1100 tab, set the following defaults: 1101 1102 <table class="listing" cellspacing="0" cellpadding="2" border="0"> 1103 <tr> 1104 <th>Setting</th> 1105 <th>Value</th> 1106 </tr> 1107 <tr> 1108 <td>Platform / raw data type</td> 1109 <td>Generic / Genepix</td> 1110 </tr> 1111 <tr> 1112 <td>Software</td> 1113 <td>Software A</td> 1114 </tr> 1115 <tr> 1116 <td>Array design</td> 1117 <td>Array design A</td> 1118 </tr> 1119 <tr> 1120 <td>Hybridization station</td> 1121 <td>Hybridization station A</td> 1122 </tr> 1123 <tr> 1124 <td>Scanner</td> 1125 <td>Scanner A</td> 1126 </tr> 1127 <tr> 1128 <td>Print robot</td> 1129 <td>Print robot A</td> 1130 </tr> 1131 <tr> 1132 <td>Scanning protocol</td> 1133 <td>Scanning A</td> 1134 </tr> 1135 <tr> 1136 <td>Sampling protocol</td> 1137 <td>Sampling A</td> 1138 </tr> 1139 <tr> 1140 <td>Extraction protocol</td> 1141 <td>Extraction A</td> 1142 </tr> 1143 <tr> 1144 <td>Labeling protocol</td> 1145 <td>Labeling A</td> 1146 </tr> 1147 <tr> 1148 <td>Hybridization protocol</td> 1149 <td>Hybridization A</td> 1150 </tr> 1151 <tr> 1152 <td>Feat. extraction protocol</td> 1153 <td>Feature extraction A</td> 1154 </tr> 1155 <tr> 1156 <td>Printing protocol</td> 1157 <td>Printing A</td> 1158 </tr> 1159 </table> 1160 1063 1161 <p> 1064 1162 </li> … … 1509 1607 <th>Raw data file</th> 1510 1608 <th>Spots inserted</th> 1609 <th>Annotations created</th> 1511 1610 </tr> 1512 1611 <tr> … … 1514 1613 <td>genepix.mouse.v4.37k.00h.gpr</td> 1515 1614 <td>36,232</td> 1615 <td><i>Dye swap</i>: false</td> 1516 1616 </tr> 1517 1617 <tr> … … 1519 1619 <td>genepix.mouse.v4.37k.24h.gpr</td> 1520 1620 <td>36,232</td> 1621 <td><i>Dye swap</i>: false</td> 1521 1622 </tr> 1522 1623 <tr class="shaded"> … … 1524 1625 <td>genepix.mouse.v4.37k.00h.dyeswap.gpr</td> 1525 1626 <td>36,232</td> 1627 <td><i>Dye swap</i>: true</td> 1526 1628 </tr> 1527 1629 <tr class="shaded"> … … 1529 1631 <td>genepix.mouse.v4.37k.24h.dyeswap.gpr</td> 1530 1632 <td>36,232</td> 1633 <td><i>Dye swap</i>: true</td> 1531 1634 </tr> 1532 1635 </table> … … 1548 1651 <td>Raw bioassay A.00h,<br>Raw bioassay A.24h,<br>Raw bioassay A.00h (dye-swap),<br> 1549 1652 Raw bioassay A.24h (dye-swap)</td> 1550 <td>Drug resistance, Time (hours) </td>1653 <td>Drug resistance, Time (hours), Dye swap</td> 1551 1654 </tr> 1552 1655 <tr> … … 1559 1662 <p> 1560 1663 </li> 1664 1665 <li> 1666 Check the experiment overview page. It should display one warnings for the 1667 Genepix experiment. The warning is related to a missing biosurce 1668 on the reference sample. 1669 <p> 1670 The Affymetrix experiment gives some more warnings. Most of them are 1671 related to not using the project default items, missing protocols 1672 and missing hardware. There should also be an error about missing 1673 experimental factor values for the <code>Affymetrix.3</code> 1674 raw bioassay. It is expected since this comes from the reference sample 1675 which doesn't have values for those annotations. 1676 <p> 1677 1678 Change validation options to reduce the number of warnings: 1679 <table class="listing" cellspacing="0" cellpadding="2" border="0"> 1680 <tr> 1681 <th>Validation option</th> 1682 <th>Setting</th> 1683 </tr> 1684 <tr> 1685 <td>Project defaults</td> 1686 <td>Set all to <code>Ignore</code></td> 1687 </tr> 1688 <tr> 1689 <td>Missing items</td> 1690 <td>Set all to <code>Ignore</code></td> 1691 </tr> 1692 <tr> 1693 <td>Annotations - Missing factor value</td> 1694 <td><code>Warning</code></td> 1695 </tr> 1696 </table> 1697 1698 After the changes there should now only be two warnings about the 1699 missing factor values. 1700 1701 <p> 1702 </li> 1703 1561 1704 </ol> 1562 1705 -
trunk/src/test/net/sf/basedb/test/FileUtil.java
r4020 r4025 83 83 dc.saveItem(file); 84 84 InputStream toUpload = TestUtil.class.getResourceAsStream(path); 85 if ( isBzip)85 if (toUpload == null) 86 86 { 87 // Remove 'BZ' marker at start of file 88 toUpload.read(); 89 toUpload.read(); 90 toUpload = new CBZip2InputStream(toUpload); 91 87 TestUtil.write("--NOT FOUND - skipping upload\n"); 92 88 } 93 file.upload(toUpload, false, true); 89 else 90 { 91 if (isBzip) 92 { 93 // Remove 'BZ' marker at start of file 94 toUpload.read(); 95 toUpload.read(); 96 toUpload = new CBZip2InputStream(toUpload); 97 } 98 file.upload(toUpload, false, true); 99 } 94 100 } 95 101 return file; -
trunk/src/test/net/sf/basedb/test/roles/AdminTest.java
r3873 r4025 36 36 import net.sf.basedb.core.FileType; 37 37 import net.sf.basedb.core.Group; 38 import net.sf.basedb.core.Location; 38 39 import net.sf.basedb.core.MultiPermissions; 39 40 import net.sf.basedb.core.Permission; … … 124 125 //Import reporters 125 126 PluginUtil.importReporters(reporterImporter, reporters, "Importing reporters for project A"); 126 PluginUtil.importReporters(affyReporterImporter, affyReporters, "Importing Affymetrix reporter for project A"); 127 if (affyReporters.getLocation() == Location.PRIMARY) 128 { 129 PluginUtil.importReporters(affyReporterImporter, affyReporters, "Importing Affymetrix reporter for project A"); 130 } 127 131 TestUtil.logout(); 128 132 } -
trunk/src/test/net/sf/basedb/test/roles/AnalysisTest.java
r3675 r4025 23 23 */ 24 24 package net.sf.basedb.test.roles; 25 26 import java.util.List; 25 27 26 28 import net.sf.basedb.core.BioAssaySet; … … 33 35 import net.sf.basedb.core.Job; 34 36 import net.sf.basedb.core.PluginDefinition; 37 import net.sf.basedb.core.Project; 35 38 import net.sf.basedb.core.RawBioAssay; 36 39 import net.sf.basedb.core.RawDataTypes; … … 38 41 import net.sf.basedb.test.PluginUtil; 39 42 import net.sf.basedb.test.TestUtil; 43 import net.sf.basedb.util.overview.ExperimentOverview; 44 import net.sf.basedb.util.overview.Failure; 45 import net.sf.basedb.util.overview.Severity; 46 import net.sf.basedb.util.overview.ValidationOptions; 47 import net.sf.basedb.util.overview.Validator; 40 48 41 49 /** … … 65 73 dc = TestUtil.getDbControl(); 66 74 Experiment experiment = Util.findExperiment(dc, "Experiment A"); 75 Experiment affyExperiment = Util.findExperiment(dc, "Affymetrix A"); 76 Project activeProject = Project.getById(dc, TestUtil.getSessionControl().getActiveProjectId()); 77 78 ValidationOptions options = new ValidationOptions(); 79 // Expected, since we never specified a biosource for the reference sample 80 options.setSeverity(Validator.MISSING_BIOSOURCE, Severity.IGNORE); 81 ExperimentOverview overview = getExperimentOverview(experiment, 82 activeProject, options, 0); 83 84 // Expected, since the Affymetrix experiment is using a different platform 85 options.setSeverity(Validator.NONDEFAULT_PLATFORM, Severity.IGNORE); 86 options.setSeverity(Validator.NONDEFAULT_RAWDATATYPE, Severity.IGNORE); 87 options.setSeverity(Validator.NONDEFAULT_ARRAYDESIGN, Severity.IGNORE); 88 options.setSeverity(Validator.MISSING_HARDWARE, Severity.IGNORE); 89 options.setSeverity(Validator.MISSING_PROTOCOL, Severity.IGNORE); 90 ExperimentOverview affyOverview = getExperimentOverview(affyExperiment, 91 activeProject, options, 2); 92 67 93 Formula formula = Util.findFormula(dc, RawDataTypes.getRawDataType("genepix"), Formula.Type.INTENSITY_EXPRESSION, "Mean FG - Mean BG"); 68 94 dc.close(); … … 194 220 } 195 221 196 222 public static ExperimentOverview getExperimentOverview(Experiment experiment, 223 Project project, ValidationOptions options, int expected) 224 { 225 TestUtil.write("--Getting overview for experiment: " + experiment.getName() + "\n"); 226 ExperimentOverview overview = ExperimentOverview.getOverview(experiment, project); 227 List<Failure> failures = overview.getFailures(); 228 int i = 0; 229 for (Failure f : failures) 230 { 231 Severity severity = options.getSeverity(f.getValidator()); 232 if (severity != Severity.IGNORE) 233 { 234 i++; 235 TestUtil.write(" " + i + ". " + severity + ": " + f.getMessage() + ": " + f.getNode().getItem() + "\n"); 236 } 237 } 238 if (i == 0) 239 { 240 TestUtil.write(" No errors or warnings\n"); 241 } 242 if (i == expected) 243 { 244 TestUtil.write("--We expected " + expected + " warnings so this is probably ok.\n"); 245 } 246 else 247 { 248 TestUtil.write("--Unexpected number of warnings: " + i + "; expected " + 249 expected + "\n"); 250 } 251 return overview; 252 } 197 253 } -
trunk/src/test/net/sf/basedb/test/roles/PowerUserTest.java
r3873 r4025 55 55 import net.sf.basedb.core.Protocol; 56 56 import net.sf.basedb.core.ProtocolType; 57 import net.sf.basedb.core.RawDataType; 58 import net.sf.basedb.core.RawDataTypes; 57 59 import net.sf.basedb.core.Software; 58 60 import net.sf.basedb.core.SoftwareType; … … 128 130 ); 129 131 AnnotationType hours = createAnnotationType(dc, "Time (hours)", Type.INT, null, 130 new Item[] { Item.SAMPLE } ); 132 new Item[] { Item.SAMPLE } 133 ); 134 135 AnnotationType dyeSwap = createAnnotationType(dc, "Dye swap", Type.BOOLEAN, null, 136 new Item[] { Item.RAWBIOASSAY } 137 ); 131 138 132 139 PlateType plateType = createPlateType(dc, "Plate type A", 16, 24); … … 142 149 PluginConfiguration rawDataImporter = PluginUtil.createPluginConfiguration(dc, "Raw data for project A", 143 150 "net.sf.basedb.plugins.RawDataFlatFileImporter", MouseData.getGenePixRawDataParameters(false)); 144 151 Util.setAnnotation(rawDataImporter, dyeSwap, false); 152 145 153 PluginConfiguration rawDataImporterDyeSwap = PluginUtil.createPluginConfiguration(dc, "Raw data for project A (dye-swap)", 146 154 "net.sf.basedb.plugins.RawDataFlatFileImporter", MouseData.getGenePixRawDataParameters(true)); 155 Util.setAnnotation(rawDataImporterDyeSwap, dyeSwap, true); 147 156 148 157 dc.commit(); … … 169 178 170 179 dc = TestUtil.getDbControl(); 180 RawDataType genepix = RawDataTypes.getRawDataType("genepix"); 181 p = Project.getById(dc, p.getId()); 182 p.setDefaultItem(dc, genericPlatform, Project.Default.PLATFORM); 183 p.setDefaultRawDataType(genepix); 184 p.setDefaultItem(dc, design, Project.Default.ARRAYDESIGN); 185 p.setDefaultItem(dc, software, Project.Default.SOFTWARE); 186 p.setDefaultItem(dc, hybStation, Project.Default.HYBRIDIZATION_HARDWARE); 187 p.setDefaultItem(dc, scanner, Project.Default.SCANNER_HARDWARE); 188 p.setDefaultItem(dc, robot, Project.Default.PRINTROBOT_HARDWARE); 189 p.setDefaultItem(dc, scanning, Project.Default.SCANNING_PROTOCOL); 190 p.setDefaultItem(dc, sampling, Project.Default.SAMPLING_PROTOCOL); 191 p.setDefaultItem(dc, extraction, Project.Default.EXTRACTING_PROTOCOL); 192 p.setDefaultItem(dc, labeling, Project.Default.LABELING_PROTOCOL); 193 p.setDefaultItem(dc, hybridization, Project.Default.HYBRIDIZATION_PROTOCOL); 194 p.setDefaultItem(dc, feature, Project.Default.FEATURE_EXTRACTION_PROTOCOL); 195 p.setDefaultItem(dc, printing, Project.Default.PRINTING_PROTOCOL); 196 171 197 ArrayBatch batch = createArrayBatch(dc, "Array batch A", design, robot, printing); 172 198 ArraySlide slide1 = createArraySlide(dc, "Array slide A.1", batch, 1); -
trunk/src/test/net/sf/basedb/test/roles/UserTest.java
r3873 r4025 199 199 dc.commit(); 200 200 201 // Analysis201 // Experiment overview and Analysis 202 202 AnalysisTest.run("user"); 203 203 … … 403 403 experiment.addExperimentalFactor(a.getAnnotationType()); 404 404 } 405 for (Annotation a : as.getAnnotations().list(dc)) 406 { 407 experiment.addExperimentalFactor(a.getAnnotationType()); 408 } 405 409 } 406 410
Note: See TracChangeset
for help on using the changeset viewer.