Changeset 5699


Ignore:
Timestamp:
Aug 16, 2011, 2:43:45 PM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #1613: Extend the 'roles' test case with some sequence-related tests

Fixed in the manual test instructions and the hard-coded programmatic tests. The exception is that we do not yet have a defined raw data type + test data files for sequence data (using GenePix? as a temporary solution). The overview tests can't be completed until the item overview has been fixed by #1153.

The batch importer tests (instructions + programmatic tests) have not been fixed yet.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/test/roles/index.html

    r5474 r5699  
    549549    </tr>
    550550    <tr>
     551      <td>Library preparation A</td>
     552      <td>Library preparation</td>
     553    </tr>
     554    <tr>
    551555      <td>Hybridization A</td>
    552556      <td>Hybridization</td>
     557    </tr>
     558    <tr>
     559      <td>cBot Settings A</td>
     560      <td>Cluster generation</td>
    553561    </tr>
    554562    <tr>
     
    558566    </tr>
    559567    <tr>
     568      <td>HiSeq Settings A</td>
     569      <td>Sequencing</td>
     570    </tr>
     571    <tr>
     572      <td>TopHat Settings A</td>
     573      <td>Alignment</td>
     574    </tr>
     575    <tr>
    560576      <td>Feature extraction A</td>
    561577      <td>Feature extraction</td>
    562578    </tr>
    563579    <tr>
     580      <td>Cufflinks Settings A</td>
     581      <td>Feature extraction</td>
     582    </tr>
     583    <tr>
    564584      <td>Printing A</td>
    565585      <td>Printing</td>
     
    579599      <td>Hybridization station A</td>
    580600      <td>Hybridization station</td>
     601    </tr>
     602    <tr>
     603      <td>cBot A</td>
     604      <td>Cluster generator</td>
     605    </tr>
     606    <tr>
     607      <td>HiSeq 2000 A</td>
     608      <td>Sequencer</td>
    581609    </tr>
    582610    <tr>
     
    11551183    <tr>
    11561184      <th>Setting</th>
    1157       <th>Value</th>
    1158     </tr>
    1159     <tr>
    1160       <td>Platform / raw data type</td>
    1161       <td>Generic / Genepix</td>
     1185      <th>Value(s)</th>
     1186    </tr>
     1187    <tr>
     1188      <td>Raw data type</td>
     1189      <td>Genepix</td>
     1190    </tr>
     1191    <tr>
     1192      <td>Platforms</td>
     1193      <td>
     1194        Generic<br>
     1195        Affymetrix
     1196      </td>
     1197    </tr>
     1198    <tr>
     1199      <td>Array designs</td>
     1200      <td>
     1201        Array design A<br>
     1202        Affymetrix A
     1203      </td>
     1204    </tr>
     1205    <tr>
     1206      <td>Protocols</td>
     1207      <td>
     1208        Sampling A<br>
     1209        Extraction A<br>
     1210        Labeling A<br>
     1211        Library preparation A<br>
     1212        Hybridization A<br>
     1213        cBot Settings A<br>
     1214        Scanning A<br>
     1215        HiSeq Settings A<br>
     1216        TopHat Settings A<br>
     1217        Feature extraction A<br>
     1218        Cufflinks Settings A<br>
     1219        Printing A
     1220      </td>
     1221    </tr>
     1222    <tr>
     1223      <td>Hardware</td>
     1224      <td>
     1225        Hybridization station A<br>
     1226        cBot A<br>
     1227        HiSeq 2000 A<br>
     1228        Scanner A<br>
     1229        Print robot A
     1230      </td>
    11621231    </tr>
    11631232    <tr>
    11641233      <td>Software</td>
    1165       <td>Software A</td>
    1166     </tr>
    1167     <tr>
    1168       <td>Array design</td>
    1169       <td>Array design A</td>
    1170     </tr>
    1171     <tr>
    1172       <td>Hybridization station</td>
    1173       <td>Hybridization station A</td>
    1174     </tr>
    1175     <tr>
    1176       <td>Scanner</td>
    1177       <td>Scanner A</td>
    1178     </tr>
    1179     <tr>
    1180       <td>Print robot</td>
    1181       <td>Print robot A</td>
    1182     </tr>
    1183     <tr>
    1184       <td>Scanning protocol</td>
    1185       <td>Scanning A</td>
    1186     </tr>
    1187     <tr>
    1188       <td>Sampling protocol</td>
    1189       <td>Sampling A</td>
    1190     </tr>
    1191     <tr>
    1192       <td>Extraction protocol</td>
    1193       <td>Extraction A</td>
    1194     </tr>
    1195     <tr>
    1196       <td>Labeling protocol</td>
    1197       <td>Labeling A</td>
    1198     </tr>
    1199     <tr>
    1200       <td>Hybridization protocol</td>
    1201       <td>Hybridization A</td>
    1202     </tr>
    1203     <tr>
    1204       <td>Feat. extraction protocol</td>
    1205       <td>Feature extraction A</td>
    1206     </tr>
    1207     <tr>
    1208       <td>Printing protocol</td>
    1209       <td>Printing A</td>
     1234      <td>
     1235        Software A<br>
     1236        TopHat<br>
     1237        Cufflinks
     1238      </td>
    12101239    </tr>
    12111240    </table>
     
    14791508
    14801509  <li>
    1481     Create labeled extracts:
     1510    Create labeled extracts and libraries:
    14821511    <table class="listing" cellspacing="0" cellpadding="2" border="0">
    14831512    <tr>
     
    15301559      <td>Bioplate A [D3]</td>
    15311560    </tr>
    1532     </table>
    1533     <p>
    1534   </li>
    1535 
    1536   <li>
    1537     Create hybridizations:
     1561    <tr>
     1562      <td>Library A.00h</td>
     1563      <td>-</td>
     1564      <td>Library preparation A</td>
     1565      <td>Extract A.00h</td>
     1566      <td>Bioplate A [E1]</td>
     1567    </tr>
     1568    <tr>
     1569      <td>Library A.24h</td>
     1570      <td>-</td>
     1571      <td>Library preparation A</td>
     1572      <td>Extract A.24h</td>
     1573      <td>Bioplate A [E2]</td>
     1574    </tr>
     1575    <tr>
     1576      <td>Library A.ref</td>
     1577      <td>-</td>
     1578      <td>Library preparation A</td>
     1579      <td>Extract A.ref</td>
     1580      <td>Bioplate A [E3]</td>
     1581    </tr>
     1582    </table>
     1583    <p>
     1584  </li>
     1585
     1586  <li>
     1587    Create physical bioassays (hybridizations and flow cells):
    15381588    <table class="listing" cellspacing="0" cellpadding="2" border="0">
    15391589    <tr>
     
    15421592      <th>Hardware</th>
    15431593      <th>Array slide</th>
    1544       <th>Labeled extracts</th>
     1594      <th>Extracts (position)</th>
    15451595    </tr>
    15461596    <tr>
     
    15931643      <td>Labeled extract A.ref</td>
    15941644    </tr>
    1595     </table>
    1596     <p>
    1597   </li>
    1598  
    1599   <li>
    1600     Create scans:
    1601     <table class="listing" cellspacing="0" cellpadding="2" border="0">
    1602     <tr>
    1603       <th>Name</th>
    1604       <th>Hybridization</th>
    1605       <th>Scanner</th>
     1645    <tr class="shaded">
     1646      <td>Flow cell A</td>
     1647      <td>cBot Settings A</td>
     1648      <td>cBot A</td>
     1649      <td>-</td>
     1650      <td>Library A.00h (1),<br>Library A.24h (2)<br>Library A.ref (3)</td>
     1651    </tr>
     1652    </table>
     1653    <p>
     1654  </li>
     1655 
     1656  <li>
     1657    Create derived bioassays (scans, assemblys, etc.):
     1658    <table class="listing" cellspacing="0" cellpadding="2" border="0">
     1659    <tr>
     1660      <th>Name</th>
     1661      <th>Parent bioasasay</th>
     1662      <th>Parent extract</th>
     1663      <th>Hardware/Software</th>
    16061664      <th>Protocol</th>
    16071665      <th>PMT gain</th>
     
    16101668      <td>Scan A.00h</td>
    16111669      <td>Hybridization A.00h</td>
    1612       <td>Scanner A</td>
     1670      <td>Labeled extract A.00h</td>
     1671      <td>HW: Scanner A</td>
    16131672      <td>Scanning A</td>
    16141673      <td>400 V</td>
     
    16171676      <td>Scan A.24h</td>
    16181677      <td>Hybridization A.24h</td>
    1619       <td>Scanner A</td>
     1678      <td>Labeled extract A.24h</td>
     1679      <td>HW: Scanner A</td>
    16201680      <td>Scanning A</td>
    16211681      <td>500 V</td>
     
    16241684      <td>Scan A.00h (dye-swap)</td>
    16251685      <td>Hybridization A.00h (dye-swap)</td>
    1626       <td>Scanner A</td>
     1686      <td>Labeled extract A.00h (dye-swap)</td>
     1687      <td>HW: Scanner A</td>
    16271688      <td>Scanning A</td>
    16281689      <td>600 V</td>
     
    16311692      <td>Scan A.24h (dye-swap)</td>
    16321693      <td>Hybridization A.24h (dye-swap)</td>
    1633       <td>Scanner A</td>
     1694      <td>Labeled extract A.24h (dye-swap)</td>
     1695      <td>HW: Scanner A</td>
    16341696      <td>Scanning A</td>
    16351697      <td>700 V</td>
     
    16381700      <td>Affymetrix scan A.1</td>
    16391701      <td>Affymetrix hyb A.1</td>
    1640       <td>Scanner A</td>
     1702      <td>Labeled extract A.00h</td>
     1703      <td>HW: Scanner A</td>
    16411704      <td>Scanning A</td>
    16421705      <td>800 V</td>
     
    16451708      <td>Affymetrix scan A.2</td>
    16461709      <td>Affymetrix hyb A.2</td>
    1647       <td>Scanner A</td>
     1710      <td>Labeled extract A.24h</td>
     1711      <td>HW: Scanner A</td>
    16481712      <td>Scanning A</td>
    16491713      <td>900 V</td>
     
    16521716      <td>Affymetrix scan A.3</td>
    16531717      <td>Affymetrix hyb A.3</td>
    1654       <td>Scanner A</td>
     1718      <td>Labeled extract A.ref</td>
     1719      <td>HW: Scanner A</td>
    16551720      <td>Scanning A</td>
    16561721      <td>1000 V</td>
    16571722    </tr>
    1658     </table>
    1659     <p>
    1660   </li>
    1661  
    1662   <li>
    1663     Add images to the scans (TODO - we don't have any images yet):
     1723    <tr class="shaded">
     1724      <td>Sequenced A</td>
     1725      <td>Flow cell A</td>
     1726      <td>-</td>
     1727      <td>HW: HiSeq 2000 A</td>
     1728      <td>HiSeq Settings A</td>
     1729      <td>-</td>
     1730    </tr>
     1731    <tr class="shaded">
     1732      <td>Assembly A.00h</td>
     1733      <td>Sequenced A</td>
     1734      <td>Library A.00h</td>
     1735      <td>SW: TopHat</td>
     1736      <td>TopHat Settings A</td>
     1737      <td>-</td>
     1738    </tr>
     1739    <tr class="shaded">
     1740      <td>Assembly A.24h</td>
     1741      <td>Sequenced A</td>
     1742      <td>Library A.24h</td>
     1743      <td>SW: TopHat</td>
     1744      <td>TopHat Settings A</td>
     1745      <td>-</td>
     1746    </tr>
     1747    <tr class="shaded">
     1748      <td>Assembly A.ref</td>
     1749      <td>Sequenced A</td>
     1750      <td>Library A.ref</td>
     1751      <td>SW: TopHat</td>
     1752      <td>TopHat Settings A</td>
     1753      <td>-</td>
     1754    </tr>
     1755    </table>
     1756    <p>
     1757  </li>
     1758 
     1759  <li>
     1760    Add data files (TODO - we don't have any yet):
    16641761    <table class="listing" cellspacing="0" cellpadding="2" border="0">
    16651762    <tr>
    16661763      <th>Scan</th>
    1667       <th>Image files</th>
     1764      <th>Data files</th>
    16681765    </tr>
    16691766    <tr>
     
    16931790      <th>Name</th>
    16941791      <th>Platform/Raw data type</th>
     1792      <th>Parent bioassay</th>
     1793      <th>Parent extract</th>
    16951794      <th>Array design</th>
    16961795      <th>Protocol</th>
    1697       <th>Scan</th>
    16981796      <th>Software</th>
    16991797      <th>File(s)</th>
     
    17021800      <td>Raw bioassay A.00h</td>
    17031801      <td>Generic/GenePix</td>
     1802      <td>Scan A.00h</td>
     1803      <td>Labeled extract A.00h</td>
    17041804      <td>Array design A</td>
    17051805      <td>Feature extraction A</td>
    1706       <td>Scan A.00h</td>
    17071806      <td>Software A</td>
    17081807      <td><i>Raw data</i>: genepix.mouse.v4.37k.00h.gpr</td>
     
    17111810      <td>Raw bioassay A.24h</td>
    17121811      <td>Generic/GenePix</td>
     1812      <td>Scan A.24h</td>
     1813      <td>Labeled extract A.24h</td>
    17131814      <td>Array design A</td>
    17141815      <td>Feature extraction A</td>
    1715       <td>Scan A.24h</td>
    17161816      <td>Software A</td>
    17171817      <td><i>Raw data</i>: genepix.mouse.v4.37k.24h.gpr</td>
     
    17201820      <td>Raw bioassay A.00h (dye-swap)</td>
    17211821      <td>Generic/GenePix</td>
     1822      <td>Scan A.00h (dye-swap)</td>
     1823      <td>Labeled extract A.00h (dye-swap)</td>
    17221824      <td>Array design A</td>
    17231825      <td>Feature extraction A</td>
    1724       <td>Scan A.00h (dye-swap)</td>
    17251826      <td>Software A</td>
    17261827      <td><i>Raw data</i>: genepix.mouse.v4.37k.00h.dyeswap.gpr</td>
     
    17291830      <td>Raw bioassay A.24h (dye-swap)</td>
    17301831      <td>Generic/GenePix</td>
     1832      <td>Scan A.24h (dye-swap)</td>
     1833      <td>Labeled extract A.24h (dye-swap)</td>
    17311834      <td>Array design A</td>
    17321835      <td>Feature extraction A</td>
    1733       <td>Scan A.24h (dye-swap)</td>
    17341836      <td>Software A</td>
    17351837      <td><i>Raw data</i>: genepix.mouse.v4.37k.24h.dyeswap.gpr</td>
     
    17381840      <td>Affymetrix raw A.1</td>
    17391841      <td>Affymetrix</td>
     1842      <td>Affymetrix scan A.1</td>
     1843      <td>Labeled extract A.00h</td>
    17401844      <td>Affymetrix A</td>
    17411845      <td>Feature extraction A</td>
    1742       <td>Affymetrix scan A.1</td>
    17431846      <td>Software A</td>
    17441847      <td><i>CEL file</i>: jos1761.cel.bz2</td>
     
    17471850      <td>Affymetrix raw A.2</td>
    17481851      <td>Affymetrix</td>
     1852      <td>Affymetrix scan A.2</td>
     1853      <td>Labeled extract A.24h</td>
    17491854      <td>Affymetrix A</td>
    17501855      <td>Feature extraction A</td>
    1751       <td>Affymetrix scan A.2</td>
    17521856      <td>Software A</td>
    17531857      <td><i>CEL file</i>: jos1762.cel.bz2</td>
     
    17561860      <td>Affymetrix raw A.3</td>
    17571861      <td>Affymetrix</td>
     1862      <td>Affymetrix scan A.3</td>
     1863      <td>Labeled extract A.ref</td>
    17581864      <td>Affymetrix A</td>
    17591865      <td>Feature extraction A</td>
    1760       <td>Affymetrix scan A.3</td>
    17611866      <td>Software A</td>
    17621867      <td><i>CEL file</i>: jos1763.cel.bz2</td>
    17631868    </tr>   
    1764     </table>
     1869    <tr class="shaded">
     1870      <td>SeqRaw A.00h</td>
     1871      <td>Generic/GenePix</td>
     1872      <td>Assembly A.00h</td>
     1873      <td>Library A.00h</td>
     1874      <td>Array design A</td>
     1875      <td>Cufflinks Settings A</td>
     1876      <td>Cufflinks</td>
     1877      <td></td>
     1878    </tr>
     1879    <tr class="shaded">
     1880      <td>SeqRaw A.24h</td>
     1881      <td>Generic/GenePix</td>
     1882      <td>Assembly A.24h</td>
     1883      <td>Library A.24h</td>
     1884      <td>Array design A</td>
     1885      <td>Cufflinks Settings A</td>
     1886      <td>Cufflinks</td>
     1887      <td></td>
     1888    </tr>
     1889    <tr class="shaded">
     1890      <td>SeqRaw A.ref</td>
     1891      <td>Generic/GenePix</td>
     1892      <td>Assembly A.ref</td>
     1893      <td>Library A.ref</td>
     1894      <td>Array design A</td>
     1895      <td>Cufflinks Settings A</td>
     1896      <td>Cufflinks</td>
     1897      <td></td>
     1898    </tr>
     1899    </table>
     1900    TODO - create other raw data type for sequence raw bioassays
    17651901    <p>
    17661902  </li>
     
    17911927      <td>Affymetrix raw A.1,<br>Affymetrix raw A.2,<br>Affymetrix raw A.3</td>
    17921928      <td>Drug resistance, Time, PMT gain</td>
     1929    </tr>
     1930    <tr>
     1931      <td>Sequence A</td>
     1932      <td>GenePix</td>
     1933      <td>SeqRaw A.00h,<br>SeqRaw A.24h,<br>SeqRaw A.ref</td>
     1934      <td>Drug resistance, Time</td>
    17931935    </tr>
    17941936    </table>
  • trunk/src/core/net/sf/basedb/core/Hardware.java

    r5685 r5699  
    6868  */
    6969  public static final String HYBRIDIZATION_STATION = "net.sf.basedb.core.HardwareType.HYBRIDIZATION_STATION";
     70
     71  /**
     72    The id for the <code>HardwareType</code> object representing a
     73    cluster generator station. Used when creating a {@link PhysicalBioAssay}.
     74    @since 3.0
     75  */
     76  public static final String CLUSTER_GENERATOR = "net.sf.basedb.core.HardwareType.CLUSTER_GENERATOR";
    7077
    7178  /**
  • trunk/src/core/net/sf/basedb/core/Install.java

    r5698 r5699  
    446446      ItemSubtypeData hybProtocol = createItemSubtype(Item.PROTOCOL, Protocol.HYBRIDIZATION,
    447447          "Hybridization", "Protocols used for creating hybridizations.", protocolFileType);
     448      ItemSubtypeData clusterProtocol = createItemSubtype(Item.PROTOCOL, Protocol.CLUSTER_GENERATION,
     449          "Cluster generation", "Protocol used for cluster generation in a flow cell", protocolFileType);
    448450      ItemSubtypeData sequencingProtocol = createItemSubtype(Item.PROTOCOL, Protocol.SEQUENCING,
    449451          "Sequencing", "Protocol used while sequencing", protocolFileType);
     
    451453      ItemSubtypeData scanningProtocol = createItemSubtype(Item.PROTOCOL, Protocol.SCANNING,
    452454          "Scanning", "Protocols used for scanning microarray images.", protocolFileType);
     455      ItemSubtypeData alignmentProtocol = createItemSubtype(Item.PROTOCOL, Protocol.ALIGNMENT,
     456          "Alignment", "Protocols used while aligning sequenced data against a reference genome",
     457          protocolFileType);
    453458      createItemSubtype(Item.PROTOCOL, Protocol.FEATURE_EXTRACTION, "Feature extraction", "Protocols used for extracting features from microarray images.", protocolFileType);
    454459 
    455460      // Hardware subtypes
    456       ItemSubtypeData scanner = createItemSubtype(Item.HARDWARE, Hardware.SCANNER, "Scanner", "Scans the microarray images.");
    457       ItemSubtypeData robot = createItemSubtype(Item.HARDWARE, Hardware.PRINT_ROBOT, "Print robot", "Spot the probe on the array.");
    458       ItemSubtypeData hybStation = createItemSubtype(Item.HARDWARE, Hardware.HYBRIDIZATION_STATION, "Hybridization station", "Automate the hybridization of microarrays on slides.");
     461      ItemSubtypeData scanner = createItemSubtype(Item.HARDWARE, Hardware.SCANNER,
     462          "Scanner", "Scans the microarray images.");
     463      ItemSubtypeData robot = createItemSubtype(Item.HARDWARE, Hardware.PRINT_ROBOT,
     464          "Print robot", "Spot the probe on the array.");
     465      ItemSubtypeData hybStation = createItemSubtype(Item.HARDWARE, Hardware.HYBRIDIZATION_STATION,
     466          "Hybridization station", "Automate the hybridization of microarrays on slides.");
     467      ItemSubtypeData clusterGenerator = createItemSubtype(Item.HARDWARE, Hardware.CLUSTER_GENERATOR,
     468          "Cluster generator", "Generates clusters in a flow cell as a preparation before sequencing.");
    459469      ItemSubtypeData sequencer = createItemSubtype(Item.HARDWARE, Hardware.SEQUENCER, "Sequencer", "Determines the sequence of DNA or RNA");
    460470      ItemSubtypeData freezer = createItemSubtype(Item.HARDWARE, Hardware.FREEZER, "Freezer", "Storage area for bioplates");
     
    486496        hybProtocol, hybStation, labeledExtract);
    487497      ItemSubtypeData flowCell = createItemSubtype(Item.PHYSICALBIOASSAY, PhysicalBioAssay.FLOW_CELL,
    488         "Flow cell", "A bioassay representing a flow cell with extracts.", library);
     498        "Flow cell", "A bioassay representing a flow cell with extracts.", clusterProtocol, clusterGenerator, library);
    489499     
    490500      // Derived bioassay set subtypes
     
    497507      ItemSubtypeData assembly = createItemSubtype(Item.DERIVEDBIOASSAY, DerivedBioAssay.ASSEMBLY,
    498508        "Assembly", "A data set of sequences that has been aligned against a reference database",
    499         alignmentSoftware, library);
     509        alignmentSoftware, alignmentProtocol, library);
    500510     
    501511      // Hardware
     
    512522      createHardware("OmniGrid", "100", "", robot, rootUser, keyEveryoneUse);
    513523      createHardware("Qarray", "Max", "", robot, rootUser, keyEveryoneUse);
     524      // Flow cell generation
     525      createHardware("Illumina cBot", null, "", clusterGenerator, rootUser, keyEveryoneUse);
    514526      // Sequencers
    515527      createHardware("Illumina HiSeq 2000", null, "", sequencer, rootUser, keyEveryoneUse);
  • trunk/src/core/net/sf/basedb/core/Protocol.java

    r5685 r5699  
    7878  public static final String LIBRARY_PREPARATION = "net.sf.basedb.core.ProtocolType.LIBRARY_PREPARATION";
    7979
    80  
    8180  /**
    8281    The ID for the pooling protocol type, for example a protocol
     
    9493  */
    9594  public static final String HYBRIDIZATION = "net.sf.basedb.core.ProtocolType.HYBRIDIZATION";
    96  
     95
     96  /**
     97    The ID for the cluster generation (in a flow cell) protocol type, for example
     98    a protocol used when creating a {@link PhysicalBioAssay}.
     99    @since 3.0
     100  */
     101  public static final String CLUSTER_GENERATION = "net.sf.basedb.core.ProtocolType.CLUSTER_GENERATION";
     102
    97103  /**
    98104    The ID for the sequencing protocol type, for example a protocol
    99     used when creating a {@link PhysicalBioAssay} from a set of
    100     (library) {@link Extract}:s.
     105    used when creating a {@link DerivedBioAssay} from a {@link PhysicalBioAssay}
    101106    @since 3.0
    102107  */
    103108  public static final String SEQUENCING = "net.sf.basedb.core.ProtocolType.SEQUENCING";
    104109
     110  /**
     111    The ID for the alignment protocol type, for example a protocol
     112    used when creating a {@link DerivedBioAssay} representing data that has been
     113    aligned against a reference genome.
     114    @since 3.0
     115  */
     116  public static final String ALIGNMENT = "net.sf.basedb.core.ProtocolType.ALIGNMENT";
    105117 
    106118  /**
  • trunk/src/test/net/sf/basedb/test/roles/AdminTest.java

    r5649 r5699  
    4848import net.sf.basedb.plugins.batchimport.ArrayDesignImporter;
    4949import net.sf.basedb.plugins.batchimport.ArraySlideImporter;
    50 import net.sf.basedb.plugins.batchimport.BioSourceImporter;
    51 import net.sf.basedb.plugins.batchimport.ExtractImporter;
    52 import net.sf.basedb.plugins.batchimport.PhysicalBioAssayImporter;
    53 import net.sf.basedb.plugins.batchimport.RawBioAssayImporter;
    54 import net.sf.basedb.plugins.batchimport.SampleImporter;
    55 import net.sf.basedb.plugins.batchimport.ScanImporter;
    5650import net.sf.basedb.test.AffymetrixData;
    5751import net.sf.basedb.test.FileUtil;
     
    110104      plugins.add(PluginDefinition.getByClassName(dc, ArraySlideImporter.class.getName()));           
    111105      addPermissions(dc, powerUser, plugins, USE);
    112      
    113       plugins.clear();
    114       plugins.add(PluginDefinition.getByClassName(dc, BioSourceImporter.class.getName()));
    115       plugins.add(PluginDefinition.getByClassName(dc, SampleImporter.class.getName()));
    116       plugins.add(PluginDefinition.getByClassName(dc, ExtractImporter.class.getName()));
    117       plugins.add(PluginDefinition.getByClassName(dc, PhysicalBioAssayImporter.class.getName()));
    118       plugins.add(PluginDefinition.getByClassName(dc, ScanImporter.class.getName()));
    119       plugins.add(PluginDefinition.getByClassName(dc, RawBioAssayImporter.class.getName()));
    120       addPermissions(dc, user, plugins, USE);
    121106      dc.commit();
    122107     
  • trunk/src/test/net/sf/basedb/test/roles/AnalysisTest.java

    r5091 r5699  
    7373      Experiment experiment = Util.findExperiment(dc, "Experiment A");
    7474      Experiment affyExperiment = Util.findExperiment(dc, "Affymetrix A");
     75      Experiment seqExperiment = Util.findExperiment(dc, "Sequence A");
    7576      Project activeProject = Project.getById(dc, TestUtil.getSessionControl().getActiveProjectId());
    7677     
     78      // TODO (#1613) - when overview generation has been fixed by #1153
    7779      ValidationOptions options = new ValidationOptions();
    7880      // Expected, since we never specified a biosource for the reference sample
     
    8284     
    8385      // Expected, since the Affymetrix experiment is using a different platform
    84       options.setSeverity(Validator.NONDEFAULT_PLATFORM, Severity.IGNORE);
     86      //options.setSeverity(Validator.NONDEFAULT_PLATFORM, Severity.IGNORE);
    8587      options.setSeverity(Validator.NONDEFAULT_RAWDATATYPE, Severity.IGNORE);
    86       options.setSeverity(Validator.NONDEFAULT_ARRAYDESIGN, Severity.IGNORE);
     88      //options.setSeverity(Validator.NONDEFAULT_ARRAYDESIGN, Severity.IGNORE);
    8789      options.setSeverity(Validator.MISSING_HARDWARE, Severity.IGNORE);
    8890      options.setSeverity(Validator.MISSING_PROTOCOL, Severity.IGNORE);
     
    9092      GenericOverview affyOverview = getExperimentOverview(dc, affyExperiment,
    9193        activeProject, options, 2);
     94     
     95      // Sequence experiment overview
     96      GenericOverview seqOverview = getExperimentOverview(dc, seqExperiment,
     97        activeProject, options, 0);
    9298     
    9399      Formula formula = Util.findFormula(dc, RawDataTypes.getSafeRawDataType("genepix"), Formula.Type.INTENSITY_EXPRESSION, "Mean FG - Mean BG");
  • trunk/src/test/net/sf/basedb/test/roles/PowerUserTest.java

    r5685 r5699  
    141141      Protocol extraction = createProtocol(dc, "Extraction A", Protocol.EXTRACTION);
    142142      Protocol labeling = createProtocol(dc, "Labeling A", Protocol.LABELING);
     143      Protocol libraryPrepartion = createProtocol(dc, "Library preparation A", Protocol.LIBRARY_PREPARATION);
    143144      Protocol hybridization = createProtocol(dc, "Hybridization A", Protocol.HYBRIDIZATION);
     145      Protocol cBotSettings = createProtocol(dc, "cBot Settings A", Protocol.CLUSTER_GENERATION);
    144146      Protocol scanning = createProtocol(dc, "Scanning A", Protocol.SCANNING, pmtGain);
     147      Protocol hiSeqSettings = createProtocol(dc, "HiSeq Settings A", Protocol.SEQUENCING);
     148      Protocol topHatSettings = createProtocol(dc, "TopHat Settings A", Protocol.ALIGNMENT);
    145149      Protocol feature = createProtocol(dc, "Feature extraction A", Protocol.FEATURE_EXTRACTION);
     150      Protocol cufflinksSettings = createProtocol(dc, "Cufflinks Settings A", Protocol.FEATURE_EXTRACTION);
    146151      Protocol printing = createProtocol(dc, "Printing A", Protocol.PRINTING);
    147152     
    148153      Hardware hybStation = createHardware(dc, "Hybridization station A", Hardware.HYBRIDIZATION_STATION);
     154      Hardware cBot = createHardware(dc, "cBot A", Hardware.CLUSTER_GENERATOR);
    149155      Hardware robot = createHardware(dc, "Print robot A", Hardware.PRINT_ROBOT);
    150156      Hardware scanner = createHardware(dc, "Scanner A", Hardware.SCANNER);
    151       Software software = createSoftware(dc, "Software A", Software.FEATURE_EXTRACTION);
     157      Hardware hiSeq = createHardware(dc, "HiSeq 2000 A", Hardware.SEQUENCER);
     158      Software softwareA = createSoftware(dc, "Software A", Software.FEATURE_EXTRACTION);
     159      Software cufflinks = Util.findSoftware(dc, "Cufflinks");
     160      Software topHat = Util.findSoftware(dc, "TopHat");
    152161     
    153162      PlateType plateType = createPlateType(dc, "Plate type A", 16, 24);
     
    221230      p = Project.getById(dc, p.getId());
    222231      p.addDefaultItem(genericPlatform);
     232      p.addDefaultItem(affymetrixPlatform);
    223233      p.setDefaultRawDataType(genepix);
    224234      p.addDefaultItem(design);
    225       p.addDefaultItem(software);
     235      p.addDefaultItem(affyDesign);
     236      p.addDefaultItem(softwareA);
     237      p.addDefaultItem(cufflinks);
     238      p.addDefaultItem(topHat);
    226239      p.addDefaultItem(hybStation);
     240      p.addDefaultItem(cBot);
     241      p.addDefaultItem(hiSeq);
    227242      p.addDefaultItem(scanner);
    228243      p.addDefaultItem(robot);
     
    230245      p.addDefaultItem(sampling);
    231246      p.addDefaultItem(extraction);
     247      p.addDefaultItem(labeling);
     248      p.addDefaultItem(libraryPrepartion);
    232249      p.addDefaultItem(hybridization);
     250      p.addDefaultItem(cBotSettings);
    233251      p.addDefaultItem(feature);
    234       p.addDefaultItem(printing);
     252      p.addDefaultItem(hiSeqSettings);
     253      p.addDefaultItem(topHatSettings);
     254      p.addDefaultItem(cufflinksSettings);
     255      p.addDefaultItem(printing);     
    235256      dc.commit();
    236257      if (!useBatchImporters)
  • trunk/src/test/net/sf/basedb/test/roles/UserTest.java

    r5689 r5699  
    2828import net.sf.basedb.core.ArrayDesign;
    2929import net.sf.basedb.core.BioMaterialEvent;
     30import net.sf.basedb.core.BioMaterialEventSource;
    3031import net.sf.basedb.core.BioPlate;
    3132import net.sf.basedb.core.BioPlateType;
     
    5051import net.sf.basedb.core.PluginDefinition;
    5152import net.sf.basedb.core.Project;
     53import net.sf.basedb.core.Protocol;
    5254import net.sf.basedb.core.Quantity;
    5355import net.sf.basedb.core.RawBioAssay;
     
    5557import net.sf.basedb.core.RawDataTypes;
    5658import net.sf.basedb.core.Sample;
     59import net.sf.basedb.core.Software;
    5760import net.sf.basedb.core.StringParameterType;
    5861import net.sf.basedb.core.SystemItems;
     
    184187      RawBioAssay affyRaw2 = null;
    185188      RawBioAssay affyRaw3 = null;
     189      RawBioAssay seqRaw1 = null;
     190      RawBioAssay seqRaw2 = null;
     191      RawBioAssay seqRawRef = null;
    186192     
    187193      if (!useBatchImporters)
     
    218224        Extract leRefDyeSwap = createLabeledExtract(dc, "Labeled extract A.ref (dye-swap)", eRef, cy3);
    219225        leRefDyeSwap.setBioWell(bioPlate.getBioWell(3, 2));
     226        Extract lib1 = createLibrary(dc, "Library A.00h", e1);
     227        lib1.setBioWell(bioPlate.getBioWell(4, 0));
     228        Extract lib2 = createLibrary(dc, "Library A.24h", e2);
     229        lib2.setBioWell(bioPlate.getBioWell(4, 1));
     230        Extract libRef = createLibrary(dc, "Library A.ref", eRef);
     231        libRef.setBioWell(bioPlate.getBioWell(4, 2));
    220232       
    221233        // Hybridizations, etc.
     
    230242        PhysicalBioAssay affyHyb3 = createHybridization(dc, "Affymetrix hyb A.3", "Affymetrix slide A.3", leRef);
    231243       
     244        // Flow cell
     245        PhysicalBioAssay flowCell1 = createFlowCell(dc, "Flow cell A", 8, lib1, lib2, libRef);
     246       
     247        // Scans
    232248        sc1 = createScan(dc, "Scan A.00h", h1, 400f, volt);
    233249        sc2 = createScan(dc, "Scan A.24h", h2, 500f, volt);
     
    235251        sc2DyeSwap = createScan(dc, "Scan A.24h (dye-swap)", h2DyeSwap, 700f, volt);
    236252 
    237         // Affymetrix
     253        // Affymetrix scans
    238254        affyScan1 = createScan(dc, "Affymetrix scan A.1", affyHyb1, 800f, volt);
    239255        affyScan2 = createScan(dc, "Affymetrix scan A.2", affyHyb2, 900f, volt);
    240256        affyScan3 = createScan(dc, "Affymetrix scan A.3", affyHyb3, 1000f, volt);
    241257   
     258        // Sequence and alignment
     259        DerivedBioAssay sequencedAssay = createRootDerivedBioAssay(dc, "Sequenced A", flowCell1,
     260            DerivedBioAssay.SEQUENCED, "HiSeq Settings A", "HiSeq 2000 A");
     261        DerivedBioAssay assembly1 = createDerivedBioAssay(dc, "Assembly A.00h", sequencedAssay, lib1,
     262            DerivedBioAssay.ASSEMBLY, "TopHat Settings A", "TopHat");
     263        DerivedBioAssay assembly2 = createDerivedBioAssay(dc, "Assembly A.24h", sequencedAssay, lib2,
     264            DerivedBioAssay.ASSEMBLY, "TopHat Settings A", "TopHat");
     265        DerivedBioAssay assemblyRef = createDerivedBioAssay(dc, "Assembly A.ref", sequencedAssay, libRef,
     266            DerivedBioAssay.ASSEMBLY, "TopHat Settings A", "TopHat");
     267       
    242268        // Raw bioassays
    243269        ArrayDesign genericDesign = Util.findArrayDesign(dc, "Array design A");
    244270        ArrayDesign affymetrixDesign = Util.findArrayDesign(dc, "Affymetrix A");
    245271        RawDataType genepix = RawDataTypes.getSafeRawDataType("genepix");
    246         rba1 = createRawBioAssay(dc, genericPlatform, genepix, "Raw bioassay A.00h", sc1, genericDesign);
    247         rba2 = createRawBioAssay(dc, genericPlatform, genepix, "Raw bioassay A.24h", sc2, genericDesign);
    248         rba1DyeSwap = createRawBioAssay(dc, genericPlatform, genepix, "Raw bioassay A.00h (dye-swap)", sc1DyeSwap, genericDesign);
    249         rba2DyeSwap = createRawBioAssay(dc, genericPlatform, genepix, "Raw bioassay A.24h (dye-swap)", sc2DyeSwap, genericDesign);
     272        Protocol featureExtraction = Util.findProtocol(dc, "Feature extraction A");
     273        Protocol cufflinksSettings = Util.findProtocol(dc, "Cufflinks Settings A");
     274        Software softwareA = Util.findSoftware(dc, "Software A");
     275        Software cufflinks = Util.findSoftware(dc, "Cufflinks");
     276       
     277        rba1 = createRawBioAssay(dc, genericPlatform, genepix, "Raw bioassay A.00h", sc1, le1, featureExtraction, softwareA, genericDesign);
     278        rba2 = createRawBioAssay(dc, genericPlatform, genepix, "Raw bioassay A.24h", sc2, le2, featureExtraction, softwareA, genericDesign);
     279        rba1DyeSwap = createRawBioAssay(dc, genericPlatform, genepix, "Raw bioassay A.00h (dye-swap)", sc1DyeSwap, le1DyeSwap, featureExtraction, softwareA, genericDesign);
     280        rba2DyeSwap = createRawBioAssay(dc, genericPlatform, genepix, "Raw bioassay A.24h (dye-swap)", sc2DyeSwap, le2DyeSwap, featureExtraction, softwareA, genericDesign);
    250281       
    251282        // Affymetrix raw bioassays
    252         affyRaw1 = createRawBioAssay(dc, affymetrixPlatform, null, "Affymetrix raw A.1", affyScan1, affymetrixDesign);
    253         affyRaw2 = createRawBioAssay(dc, affymetrixPlatform, null, "Affymetrix raw A.2", affyScan2, affymetrixDesign);
    254         affyRaw3 = createRawBioAssay(dc, affymetrixPlatform, null, "Affymetrix raw A.3", affyScan3, affymetrixDesign);
    255  
     283        affyRaw1 = createRawBioAssay(dc, affymetrixPlatform, null, "Affymetrix raw A.1", affyScan1, le1, featureExtraction, softwareA, affymetrixDesign);
     284        affyRaw2 = createRawBioAssay(dc, affymetrixPlatform, null, "Affymetrix raw A.2", affyScan2, le2, featureExtraction, softwareA, affymetrixDesign);
     285        affyRaw3 = createRawBioAssay(dc, affymetrixPlatform, null, "Affymetrix raw A.3", affyScan3, leRef, featureExtraction, softwareA, affymetrixDesign);
     286 
     287        // Sequence raw data
     288        // TODO (#1613) - use different raw data type when added by #1153
     289        seqRaw1 = createRawBioAssay(dc, genericPlatform, genepix, "SeqRaw A.00h", assembly1, lib1, cufflinksSettings, cufflinks, genericDesign);
     290        seqRaw2 = createRawBioAssay(dc, genericPlatform, genepix, "SeqRaw A.24h", assembly2, lib2, cufflinksSettings, cufflinks, genericDesign);
     291        seqRawRef = createRawBioAssay(dc, genericPlatform, genepix, "SeqRaw A.ref", assemblyRef, libRef, cufflinksSettings, cufflinks, genericDesign);
     292       
    256293        // Assign Affymetrix CEL files
    257294        FileUtil.addDataFile(dc, affyRaw1, DataFileType.AFFYMETRIX_CEL, affy1, true);
     
    300337      affyRaw2 = Util.findRawBioAssay(dc, "Affymetrix raw A.2");
    301338      affyRaw3 = Util.findRawBioAssay(dc, "Affymetrix raw A.3");
     339      seqRaw1 = Util.findRawBioAssay(dc, "SeqRaw A.00h");
     340      seqRaw2 = Util.findRawBioAssay(dc, "SeqRaw A.24h");
     341      seqRawRef = Util.findRawBioAssay(dc, "SeqRaw A.ref");
     342     
    302343      inheritAnnotations(dc, rba1, s1, bioSource, sc1);
    303344      inheritAnnotations(dc, rba2, s2, bioSource, sc2);
     
    309350      inheritAnnotations(dc, affyRaw2, s2, bioSource, affyScan2);
    310351      inheritAnnotations(dc, affyRaw3, sRef, affyScan3);
     352     
     353      // Sequence
     354      inheritAnnotations(dc, seqRaw1, s1, bioSource);
     355      inheritAnnotations(dc, seqRaw2, s2, bioSource);
     356      inheritAnnotations(dc, seqRawRef, sRef);
    311357     
    312358      PluginConfiguration rawDataImporter = Util.findPluginConfiguration(dc, "Raw data for project A");
     
    326372      Experiment affyExperiment = createExperiment(dc, "Affymetrix A",
    327373        affymetrixPlatform.getRawDataType(), affyRaw1, affyRaw2, affyRaw3);
     374      // TODO (#1613) - use different raw data type when added by #1153
     375      Experiment seqExperiment = createExperiment(dc, "Sequence A",
     376        RawDataTypes.getSafeRawDataType("genepix"), seqRaw1, seqRaw2, seqRawRef);
    328377      dc.commit();
    329378     
     
    419468    return labeledExtract;
    420469  }
     470
     471  /**
     472    Create a library.
     473  */
     474  public static Extract createLibrary(DbControl dc, String name, Extract extract)
     475  {
     476    TestUtil.write("--Creating library: " + name + "\n");
     477   
     478    Extract library = Extract.getNew(dc);
     479    library.setItemSubtype(ItemSubtype.getById(dc, SystemItems.getId(Extract.LIBRARY)));
     480    library.setName(name);
     481    library.setOriginalQuantity(100.0f);
     482    library.getCreationEvent().setProtocol(Util.findProtocol(dc, "Library preparation A"));
     483    library.getCreationEvent().setSource(extract).setUsedQuantity(50.0f);
     484    dc.saveItem(library);
     485    return library;
     486  }
     487
    421488 
    422489  /**
     
    454521
    455522  /**
     523    Create a flow cell.
     524  */
     525  public static PhysicalBioAssay createFlowCell(DbControl dc, String name, int size, Extract... extracts)
     526  {
     527    TestUtil.write("--Creating flow cell: " + name + "\n");
     528    PhysicalBioAssay flowCell = PhysicalBioAssay.getNew(dc);
     529    flowCell.setItemSubtype(ItemSubtype.getById(dc, SystemItems.getId(PhysicalBioAssay.FLOW_CELL)));
     530    flowCell.setName(name);
     531    flowCell.setSize(size);
     532   
     533    BioMaterialEvent creationEvent = flowCell.getCreationEvent();
     534    creationEvent.setProtocol(Util.findProtocol(dc, "cBot Settings A"));
     535    creationEvent.setHardware(Util.findHardware(dc, "cBot A"));
     536    int pos = 1;
     537    for (Extract lib : extracts)
     538    {
     539      BioMaterialEventSource src = creationEvent.addSource(lib);
     540      src.setUsedQuantity(50.0f);
     541      src.setPosition(pos);
     542      pos++;
     543    }
     544    dc.saveItem(flowCell);
     545    return flowCell;
     546  }
     547
     548  /**
    456549    Create a scan.
    457550  */
     
    476569
    477570  /**
     571    Create a root derived bioassay.
     572  */
     573  public static DerivedBioAssay createRootDerivedBioAssay(DbControl dc, String name, PhysicalBioAssay parent,
     574    String subtype, String protocol, String hardware)
     575  {
     576    TestUtil.write("--Creating root bioassay: " + name + "\n");
     577    DerivedBioAssay bioAssay = DerivedBioAssay.getNew(dc, parent);
     578    bioAssay.setItemSubtype(ItemSubtype.getById(dc, SystemItems.getId(subtype)));
     579    bioAssay.setName(name);
     580    bioAssay.setProtocol(Util.findProtocol(dc, protocol));
     581    bioAssay.setHardware(Util.findHardware(dc, hardware));
     582    dc.saveItem(bioAssay);
     583 
     584    return bioAssay;
     585  }
     586
     587  /**
     588    Create a child derived bioassay.
     589  */
     590  public static DerivedBioAssay createDerivedBioAssay(DbControl dc, String name, DerivedBioAssay parent,
     591    Extract extract, String subtype, String protocol, String software)
     592  {
     593    TestUtil.write("--Creating derived bioassay: " + name + "\n");
     594    DerivedBioAssay bioAssay = DerivedBioAssay.getNew(dc, parent);
     595    bioAssay.setItemSubtype(ItemSubtype.getById(dc, SystemItems.getId(subtype)));
     596    bioAssay.setName(name);
     597    bioAssay.setProtocol(Util.findProtocol(dc, protocol));
     598    bioAssay.setSoftware(Util.findSoftware(dc, software));
     599    bioAssay.setExtract(extract);
     600    dc.saveItem(bioAssay);
     601 
     602    return bioAssay;
     603  }
     604
     605 
     606  /**
    478607    Create a raw bioassay.
    479608  */
    480609  public static RawBioAssay createRawBioAssay(DbControl dc, Platform platform,
    481     RawDataType rawDataType, String name, DerivedBioAssay scan, ArrayDesign design)
     610    RawDataType rawDataType, String name, DerivedBioAssay bioAssay, Extract extract,
     611    Protocol protocol, Software software, ArrayDesign design)
    482612  {
    483613    TestUtil.write("--Creating raw bioassay: " + name + "\n");
    484614    RawBioAssay rba = RawBioAssay.getNew(dc, platform, rawDataType);
    485615    rba.setName(name);
    486 //    TODO (#1153)
    487     //rba.setScan(scan);
    488     rba.setProtocol(Util.findProtocol(dc, "Feature extraction A"));
    489     rba.setSoftware(Util.findSoftware(dc, "Software A"));
     616    rba.setParentBioAssay(bioAssay);
     617    rba.setParentExtract(extract);
     618    rba.setProtocol(protocol);
     619    rba.setSoftware(software);
    490620    rba.setArrayDesign(design);
    491621    dc.saveItem(rba);
  • trunk/src/test/net/sf/basedb/test/roles/Util.java

    r5685 r5699  
    160160  {
    161161    ItemQuery<Software> query = Software.getQuery();
     162    query.include(Include.ALL);
    162163    query.restrict(Restrictions.eq(Hql.property("name"), Expressions.string(name)));
    163164    return query.list(dc).get(0);
Note: See TracChangeset for help on using the changeset viewer.