Changeset 2049
- Timestamp:
- Oct 7, 2013, 3:38:52 PM (10 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/index.jsp
r2033 r2049 295 295 var msg = error || 'Number of flow cells waiting for registration'; 296 296 var count = error ? -1 : response.count; 297 setCount('count.flow-cells. 0', count, 'flow cells', msg);298 setCount('count.flow-cells ', count, 'flow cells', msg);297 setCount('count.flow-cells.1', count, 'flow cells', msg); 298 setCount('count.flow-cells.2', count, 'flow cells', msg); 299 299 } 300 300 … … 505 505 <li><a href="libprep/pool_registration.jsp?ID=<%=ID%>">Register pooled libraries</a> <span class="counter" id="count.pools.2" title="Counting..."><img src="images/loading-small.gif"></span> 506 506 <li><a href="libprep/create_flowcells.jsp?ID=<%=ID%>">Create flow cells</a> <span class="counter" id="count.pools.3" title="Counting..."><img src="images/loading-small.gif"></span> 507 <li><a href="libprep/flowcell_protocol.jsp?ID=<%=ID%>">Lab protocols for clustering </a> <span class="counter" id="count.flow-cells.0" title="Counting..."><img src="images/loading-small.gif"></span>508 <li><a href="libprep/flowcell_registration.jsp?ID=<%=ID%>">Register flow cells</a> <span class="counter" id="count.flow-cells" title="Counting..."><img src="images/loading-small.gif"></span>507 <li><a href="libprep/flowcell_protocol.jsp?ID=<%=ID%>">Lab protocols for clustering & sequence start</a> <span class="counter" id="count.flow-cells.1" title="Counting..."><img src="images/loading-small.gif"></span> 508 <li><a href="libprep/flowcell_registration.jsp?ID=<%=ID%>">Register sequence start of flow cells</a> <span class="counter" id="count.flow-cells.2" title="Counting..."><img src="images/loading-small.gif"></span> 509 509 </ul> 510 510 </dd> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/flowcell_registration.jsp
r2031 r2049 226 226 if (date == '') 227 227 { 228 setInputStatus(dateField, 'Missing date', 'warning'); 228 var required = frm[dateField].className.indexOf('required') != -1; 229 setInputStatus(dateField, 'Missing date', required ? 'invalid' : 'warning'); 230 if (required) dateIsValid[dateField] = false; 229 231 return; 230 232 } … … 320 322 321 323 if (dateIsValid['clusterDate'] == false) return false; 322 if (dateIsValid['sequenceStartDate'] == false) return false; 324 if (dateIsValid['sequencingStartDate'] != true) 325 { 326 dateOnChange('sequencingStartDate'); 327 return false; 328 } 323 329 324 330 var frm = document.forms['reggie']; … … 348 354 frm.clusterDate.disabled = true; 349 355 frm.clusterOperator.disabled = true; 350 frm.sequenc eStartDate.disabled = true;351 frm.sequenc eOperator.disabled = true;356 frm.sequencingStartDate.disabled = true; 357 frm.sequencingOperator.disabled = true; 352 358 frm.clusterProtocol.disabled = true; 353 359 frm.comments.disabled = true; … … 370 376 submitInfo.clusterDate = frm.clusterDate.value; 371 377 submitInfo.clusterOperator = frm.clusterOperator.value; 372 submitInfo.sequenc eStartDate = frm.sequenceStartDate.value;373 submitInfo.sequenc eOperator = frm.sequenceOperator.value;378 submitInfo.sequencingStartDate = frm.sequencingStartDate.value; 379 submitInfo.sequencingOperator = frm.sequencingOperator.value; 374 380 submitInfo.comments = frm.comments.value; 375 381 … … 524 530 <td> 525 531 <input type="text" name="clusterOperator" value="<%=HTML.encodeTags(user.getName()) %>" 526 style="width: 95%;" maxlength="255" onkeypress="focusOnEnter(event, 'sequenc eStartDate')">532 style="width: 95%;" maxlength="255" onkeypress="focusOnEnter(event, 'sequencingStartDate')"> 527 533 </td> 528 534 <td class="status" id="clusterDate.status"></td> 529 535 </tr> 530 536 <tr> 531 <td class="subprompt">Sequenc estart</td>537 <td class="subprompt">Sequencing start</td> 532 538 <td> 533 <input type="text" name="sequenceStartDate" maxlength="10" style="width: 8em;"534 onblur="dateOnChange('sequenc eStartDate')" onkeypress="focusOnEnter(event, 'sequenceOperator')">539 <input type="text" class="required" name="sequencingStartDate" maxlength="10" style="width: 8em;" 540 onblur="dateOnChange('sequencingStartDate')" onkeypress="focusOnEnter(event, 'sequencingOperator')"> 535 541 <base:icon 536 onclick="Dates.selectDate('Sequence start date', 'reggie', 'sequenc eStartDate', 'setDate', 'yyyyMMdd')"542 onclick="Dates.selectDate('Sequence start date', 'reggie', 'sequencingStartDate', 'setDate', 'yyyyMMdd')" 537 543 image="calendar.png" 538 544 tooltip="Select a date from a calendar" … … 541 547 </td> 542 548 <td> 543 <input type="text" name="sequenc eOperator" value="<%=HTML.encodeTags(user.getName()) %>"549 <input type="text" name="sequencingOperator" value="<%=HTML.encodeTags(user.getName()) %>" 544 550 style="width: 95%;" maxlength="255" onkeypress="focusOnEnter(event, 'clusterProtocol')"> 545 551 </td> 546 <td class="status" id="sequenc eStartDate.status"></td>552 <td class="status" id="sequencingStartDate.status"></td> 547 553 </tr> 548 554 <tr valign="top"> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Annotationtype.java
r2041 r2049 563 563 564 564 /** 565 The "SequencingStart" annotation, used for derived bioassays (SequencingRun). 566 @since 2.13 567 */ 568 public static final Annotationtype SEQUENCING_START = 569 new Annotationtype("SequencingStart", Type.DATE, Item.DERIVEDBIOASSAY); 570 571 /** 572 The "SequencingOperator" annotation, used for derived bioassays (SequencingRun). 573 @since 2.13 574 */ 575 public static final Annotationtype SEQUENCING_OPERATOR = 576 new Annotationtype("SequencingOperator", Type.STRING, Item.DERIVEDBIOASSAY); 577 578 579 /** 565 580 Get the annotation type by name of the static constant defined in this class. 566 581 -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Subtype.java
r2020 r2049 182 182 public static final Subtype FLOW_CELL = new Subtype("FlowCell", Item.PHYSICALBIOASSAY, false); 183 183 184 185 /** 186 The definition of the "SequencingRun" derived bioassay subtype. 187 @since 2.12 188 */ 189 public static final Subtype SEQUENCING_RUN = new Subtype("SequencingRun", Item.DERIVEDBIOASSAY, false); 190 184 191 /** 185 192 The definition of the "mRNA preparation" protocol subtype. -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/FlowCellServlet.java
r2045 r2049 21 21 import net.sf.basedb.core.BioMaterialEventSource; 22 22 import net.sf.basedb.core.DbControl; 23 import net.sf.basedb.core.DerivedBioAssay; 23 24 import net.sf.basedb.core.Extract; 24 25 import net.sf.basedb.core.ItemQuery; … … 38 39 import net.sf.basedb.reggie.dao.PooledLibrary; 39 40 import net.sf.basedb.reggie.dao.ReactionPlate; 41 import net.sf.basedb.reggie.dao.SequencingRun; 40 42 import net.sf.basedb.reggie.dao.Subtype; 41 43 import net.sf.basedb.util.Values; … … 326 328 JSONArray jsonFlowCells = (JSONArray)jsonReq.get("flowCells"); 327 329 330 DerivedBioAssay sequenceRun = null; 331 if (!failed) 332 { 333 sequenceRun = DerivedBioAssay.getNew(dc, true, null); 334 sequenceRun.setName(SequencingRun.generateNamesForBatch(dc, 1, 1).get(0)); 335 sequenceRun.setDescription(comment); 336 dc.saveItem(sequenceRun); 337 338 Date seqStartDate = Reggie.CONVERTER_STRING_TO_DATE.convert((String)jsonReq.get("sequencingStartDate")); 339 340 Annotationtype.SEQUENCING_START.setAnnotationValue(dc, sequenceRun, seqStartDate); 341 Annotationtype.SEQUENCING_OPERATOR.setAnnotationValue(dc, sequenceRun, Values.getStringOrNull((String)jsonReq.get("sequencingOperator"))); 342 343 jsonMessages.add("Created '" + sequenceRun.getName()+"'."); 344 } 345 328 346 for (int fcNo = 0; fcNo < jsonFlowCells.size(); ++fcNo) 329 347 { … … 332 350 333 351 PhysicalBioAssay flowCell = PhysicalBioAssay.getById(dc, fcId.intValue()); 334 335 352 BioMaterialEvent createEvent = flowCell.getCreationEvent(); 336 353 createEvent.setEventDate(clusterDate); 337 354 createEvent.setProtocol(clusterProtocol); 338 355 createEvent.setComment(comment); 339 340 flowCell.setDescription(comment); 356 357 if (sequenceRun != null) 358 { 359 sequenceRun.addPhysicalBioAssay(flowCell); 360 } 361 362 //flowCell.setDescription(comment); 341 363 Annotationtype.OPERATOR.setAnnotationValue(dc, flowCell, operator); 342 364 Annotationtype.READ_STRING.setAnnotationValue(dc, flowCell, jsonFlowCell.get("ReadString")); … … 354 376 { 355 377 Annotationtype.PLATE_PROCESS_RESULT.setAnnotationValue(dc, flowCell, ReactionPlate.PROCESS_SUCCESSFUL); 356 jsonMessages.add("Flow cell '" + flowCell.getName() + "' registered as completed."); 357 358 // TODO - Create DerivedBioAssay SequenceRun000N and add selected flow cells to it?? 359 // Should the SEQUENCE_START_DATE be added to this instead of the flow cells?? 378 jsonMessages.add("Sequencing started for flow cell '" + flowCell.getName() + "'."); 360 379 361 380 } -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java
r2041 r2049 167 167 jsonChecks.add(checkSubtype(dc, Subtype.CALIPER_WELL_TABLE, createIfMissing)); 168 168 jsonChecks.add(checkSubtype(dc, Subtype.QUBIT_CSV, createIfMissing)); 169 jsonChecks.add(checkSubtype(dc, Subtype.SEQUENCING_RUN, createIfMissing, Subtype.FLOW_CELL)); 169 170 170 171 // Plate geometries … … 284 285 jsonChecks.add(checkAnnotationType(dc, Annotationtype.READ_STRING, 1, null, effectiveOptions, createIfMissing)); 285 286 287 jsonChecks.add(checkAnnotationType(dc, Annotationtype.SEQUENCING_START, 1, null, effectiveOptions, createIfMissing)); 288 jsonChecks.add(checkAnnotationType(dc, Annotationtype.SEQUENCING_OPERATOR, 1, null, effectiveOptions, createIfMissing)); 289 286 290 // Annotation type categories 287 291 jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.PATIENT, createIfMissing, … … 361 365 Annotationtype.FLOWCELL_ID, Annotationtype.READ_STRING, Annotationtype.OPERATOR, 362 366 Annotationtype.PLATE_PROCESS_RESULT)); 367 368 jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.SEQUENCING_RUN, createIfMissing, 369 Annotationtype.SEQUENCING_START, Annotationtype.SEQUENCING_OPERATOR 370 )); 363 371 364 372 // Plugin definitions and configurations
Note: See TracChangeset
for help on using the changeset viewer.