Changeset 2509
- Timestamp:
- Jun 16, 2014, 9:16:09 AM (9 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk
- Property svn:mergeinfo changed
/extensions/net.sf.basedb.reggie/branches/2.15-stable merged: 2461,2503-2507 /extensions/net.sf.basedb.reggie/tags/2.15.3 (added) merged: 2508
- Property svn:mergeinfo changed
-
extensions/net.sf.basedb.reggie/trunk/resources/index.jsp
r2420 r2509 275 275 <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/mrna_protocol.jsp?ID=<%=ID%>" 276 276 >Lab protocols for mRNA and cDNA preparation</span> 277 <span class="counter" id="count.mrna-plates .1"277 <span class="counter" id="count.mrna-plates" 278 278 data-servlet="MRna.servlet?cmd=CountUnprocessedPlates&plateType=MRNA" 279 279 title="Number of mRNA plates waiting for registration"><img src="images/loading-small.gif"></span> 280 280 281 <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/rna_dilution_registration.jsp?ID=<%=ID%>" 282 >RNA dilution registration</span> 283 <span class="counter" id="count.undiluted-mrna-plates" 284 data-servlet="MRna.servlet?cmd=CountUndilutedMRNAPlates" 285 title="Number of mRNA plates waiting for dilution"><img src="images/loading-small.gif"></span> 286 281 287 <li><span class="require-permission" data-role="LibraryPrep" data-link="libprep/mrna_registration.jsp?ID=<%=ID%>" 282 288 >mRNA registration and quality control results</span> 283 <span class="counter" id="count. mrna-plates.2"284 data- copy-from="count.mrna-plates.1"289 <span class="counter" id="count.diluted-mrna-plates" 290 data-servlet="MRna.servlet?cmd=CountDilutedMRNAPlates" 285 291 title="Number of mRNA plates waiting for registration"><img src="images/loading-small.gif"></span> 286 292 -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/create_flowcells.jsp
r2412 r2509 37 37 38 38 var DEFAULT_READ_HISEQ = [55, 7, 54]; 39 var DEFAULT_READ_NEXTSEQ = [7 5, 7, 75];39 var DEFAULT_READ_NEXTSEQ = [76, 6, 76]; 40 40 var VOLUME_TO_USE_FROM_POOL = 10.0; // µl 41 41 -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/create_pools.jsp
r2454 r2509 1018 1018 color: #999999 !important; 1019 1019 } 1020 1021 .well.low-volume, .well.high-adapter 1022 { 1023 background-image: url('../images/warning.png'); 1024 background-position: 98% 5%; 1025 background-repeat: no-repeat; 1026 } 1027 1020 1028 .well.flagged 1021 1029 { … … 1025 1033 } 1026 1034 1027 .well.low-volume, .well.high-adapter 1028 { 1029 background-image: url('../images/warning.png') !important; 1030 background-position: 98% 5%; 1031 background-repeat: no-repeat; 1032 } 1035 1033 1036 </style> 1034 1037 </base:head> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/mrna_protocol.jsp
r1927 r2509 42 42 { 43 43 var bioplate = bioplates[i]; 44 var option = new Option(bioplate.name, bioplate.id); 44 var name = bioplate.name; 45 if (bioplate.DilutionDate) 46 { 47 name += ' (diluted ' + formatDate(bioplate.DilutionDate) + ')'; 48 } 49 var option = new Option(name, bioplate.id); 45 50 option.bioplate = bioplate; 46 51 plates.options[plates.length] = option; … … 56 61 setFatalError(msg); 57 62 } 63 } 64 65 function formatDate(value) 66 { 67 if (!value) return ''; 68 if (value.length == 8) 69 { 70 // YYYYMMDD 71 value = value.substr(0, 4) + '-' + value.substr(4, 2) + '-' + value.substr(6, 2); 72 } 73 else if (value.length == 13) 74 { 75 // YYYYMMDD HHMM 76 value = value.substr(0, 4) + '-' + value.substr(4, 2) + '-' + value.substr(6, 2) + ' ' + value.substr(9, 2) + ':' + value.substr(11, 2); 77 } 78 return value; 58 79 } 59 80 -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/mrna_protocol2.jsp
r2216 r2509 91 91 } 92 92 93 var plate = response.plate; 94 if (plate.DilutionDate) 95 { 96 setInnerHTML('dilution-date', formatDate(plate.DilutionDate)); 97 setInnerHTML('dilution-operator', plate.DilutionOperator); 98 } 99 93 100 var list = response.mrna; 94 101 // Find QUANTITY_REGULAR = lowest used value … … 115 122 } 116 123 %> 124 Main.show('protocol'); 125 } 126 127 function formatDate(value) 128 { 129 if (!value) return ''; 130 if (value.length == 8) 131 { 132 // YYYYMMDD 133 value = value.substr(0, 4) + '-' + value.substr(4, 2) + '-' + value.substr(6, 2); 134 } 135 else if (value.length == 13) 136 { 137 // YYYYMMDD HHMM 138 value = value.substr(0, 4) + '-' + value.substr(4, 2) + '-' + value.substr(6, 2) + ' ' + value.substr(9, 2) + ':' + value.substr(11, 2); 139 } 140 return value; 117 141 } 118 142 … … 534 558 <h1>Lab protocol for mRNA and cDNA preparation <span class="reggie">Reggie <%=reggie.getAbout().getVersion() %></span></h1> 535 559 560 <div class="loading" id="loading" style="display: none;"><table><tr><td><img src="../images/loading.gif"></td><td id="loading.msg">Please wait...</td></tr></table></div> 561 <div class="messagecontainer error" id="errorMessage" style="display: none;"></div> 562 563 <div id="protocol" style="display: none;"> 536 564 <table style="width: 100%;" class="protocolheader"> 537 565 <tr style="border-bottom: 1px solid #000000;"> … … 545 573 <td rowspan="5" colspan="2" style="width: 50%; border-right: 1px solid #000000;"><%=HTML.niceFormat(plate.getDescription()) %></td> 546 574 <td style="border-right: 1px solid #000000;">Dilution</td> 547 <td style="border-right: 1px solid #000000;" ></td>548 <td ></td>575 <td style="border-right: 1px solid #000000;" id="dilution-date"></td> 576 <td id="dilution-operator"></td> 549 577 </tr> 550 578 <tr style="border-top: 1px solid #CCCCCC;"> … … 570 598 </table> 571 599 572 <div class="loading" id="loading" style="display: none;"><table><tr><td><img src="../images/loading.gif"></td><td id="loading.msg">Please wait...</td></tr></table></div>573 <div class="messagecontainer error" id="errorMessage" style="display: none;"></div>574 600 <% 575 601 if (view.equals("list")) … … 690 716 <i>Low quantity = The remaining quantity is too low for the RNA to be re-processed one more time</i> 691 717 </div> 718 </div> 692 719 </body> 693 720 </html> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/mrna_registration.jsp
r2073 r2509 100 100 { 101 101 showLoadingAnimation('Loading histology work lists...'); 102 var url = '../MRna.servlet?ID=<%=ID%>&cmd=GetUnprocessedPlates&plateType=MRNA ';102 var url = '../MRna.servlet?ID=<%=ID%>&cmd=GetUnprocessedPlates&plateType=MRNA&onlyDiluted=1'; 103 103 request.open("GET", url, false); 104 104 request.send(null); … … 153 153 } 154 154 155 frm. dilutionDate.focus();155 frm.purificationDate.focus(); 156 156 } 157 157 … … 308 308 if (!pdfIsValid || !commentsIsValid) return false; 309 309 310 if (dateIsValid['dilutionDate'] == false) return false;311 310 if (dateIsValid['purificationDate'] == false) return false; 312 311 if (dateIsValid['fragmentationDate'] == false) return false; … … 339 338 frm['pdf.path'].disabled = true; 340 339 Main.addClass(document.getElementById('btnPdf'), 'disabled'); 341 frm.dilutionDate.disabled = true;342 frm.dilutionOperator.disabled = true;343 340 frm.purificationDate.disabled = true; 344 341 frm.purificationOperator.disabled = true; … … 355 352 submitInfo.failed = document.getElementById('outcomeSuccess').checked ? false : true; 356 353 submitInfo.pdf = pdfId; 357 submitInfo.dilutionDate = frm.dilutionDate.value;358 submitInfo.dilutionOperator = frm.dilutionOperator.value;359 354 submitInfo.purificationDate = frm.purificationDate.value; 360 355 submitInfo.purificationOperator = frm.purificationOperator.value; … … 457 452 <td class="help"><span id="bioplate.message" class="message" style="display: none;"></span> 458 453 Select an existing mRNA bioplate. The list contain all mRNA bioplates that 459 has not yet been processed (determined by the absence of a 'creation' date). 454 has been diluted, but not yet registered as completed (determined by the absence of a 455 'creation' date). 460 456 </td> 461 457 </tr> … … 495 491 <td><b>Operator</b></td> 496 492 <td class="status"></td> 497 <td class="help" rowspan=" 5">493 <td class="help" rowspan="4"> 498 494 <span id="mrnaDate.message" class="message" style="display: none;"></span> 499 495 Enter date and operator for each step in the mRNA preparation. 500 496 (YYYYMMDD or MMDD) 501 497 </td> 502 </tr>503 <tr>504 <td class="subprompt">Dilution</td>505 <td>506 <input type="text" name="dilutionDate" maxlength="10" style="width: 8em;"507 onblur="dateOnChange('dilutionDate')" onkeypress="focusOnEnter(event, 'dilutionOperator')">508 <base:icon509 onclick="Dates.selectDate('Dilution date', 'reggie', 'dilutionDate', 'setDate', 'yyyyMMdd')"510 image="calendar.png"511 tooltip="Select a date from a calendar"512 tabindex="-1"513 />514 </td>515 <td>516 <input type="text" name="dilutionOperator" value="<%=HTML.encodeTags(user.getName()) %>"517 style="width: 95%;" maxlength="255" onkeypress="focusOnEnter(event, 'purificationDate')">518 </td>519 <td class="status" id="dilutionDate.status"></td>520 498 </tr> 521 499 <tr> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MRnaServlet.java
r2161 r2509 123 123 json.put("count", count); 124 124 } 125 else if ("CountUndilutedMRNAPlates".equals(cmd)) 126 { 127 dc = sc.newDbControl(); 128 BioplateType plateType = BioplateType.MRNA; 129 130 // Find plates of the given 'plate type' without 'dilution date' and no 'destroyed' flag set 131 ItemQuery<BioPlate> query = BioPlate.getQuery(); 132 query.setIncludes(Reggie.INCLUDE_IN_CURRENT_PROJECT); 133 // Must not have a DILUTION_DATE annotation 134 query.join(Annotations.leftJoin(null, Annotationtype.DILUTION_DATE.load(dc), "dd")); 135 query.restrict(Restrictions.eq(Hql.alias("dd"), null)); 136 plateType.addFilter(dc, query, true); 137 query.setCacheResult(true); 138 long count = query.count(dc); 139 json.put("count", count); 140 } 141 else if ("CountDilutedMRNAPlates".equals(cmd)) 142 { 143 dc = sc.newDbControl(); 144 BioplateType plateType = BioplateType.MRNA; 145 146 // Find plates of the given 'plate type' with 'dilution date', but no 'create date' and no 'destroyed' flag set 147 ItemQuery<BioPlate> query = BioPlate.getQuery(); 148 query.setIncludes(Reggie.INCLUDE_IN_CURRENT_PROJECT); 149 // Must have a DILUTION_DATE annotation 150 query.join(Annotations.leftJoin(null, Annotationtype.DILUTION_DATE.load(dc), "dd")); 151 query.restrict(Restrictions.neq(Hql.alias("dd"), null)); 152 query.restrict(Restrictions.eq(Hql.property("eventDate"), null)); 153 plateType.addFilter(dc, query, true); 154 query.setCacheResult(true); 155 long count = query.count(dc); 156 json.put("count", count); 157 } 125 158 else if ("GetUnprocessedPlates".equals(cmd)) 126 159 { … … 133 166 query.restrict(Restrictions.eq(Hql.property("eventDate"), null)); 134 167 plateType.addFilter(dc, query, true); 168 169 if (req.getParameter("onlyDiluted") != null) 170 { 171 // Must have a DILUTION_DATE annotation 172 query.join(Annotations.leftJoin(null, Annotationtype.DILUTION_DATE.load(dc), "dd")); 173 query.restrict(Restrictions.neq(Hql.alias("dd"), null)); 174 } 175 else if (req.getParameter("onlyUndiluted") != null) 176 { 177 // Must NOT have a DILUTION_DATE annotation 178 query.join(Annotations.leftJoin(null, Annotationtype.DILUTION_DATE.load(dc), "dd")); 179 query.restrict(Restrictions.eq(Hql.alias("dd"), null)); 180 } 181 135 182 query.order(Orders.desc(Hql.property("id"))); 136 183 … … 143 190 jsonPlate.put("name", plate.getName()); 144 191 jsonPlate.put("comments", plate.getDescription()); 192 if (plateType == BioplateType.MRNA) 193 { 194 jsonPlate.put("DilutionDate", Reggie.CONVERTER_DATE_TO_STRING.convert((Date)Annotationtype.DILUTION_DATE.getAnnotationValue(dc, plate))); 195 jsonPlate.put("DilutionOperator", Annotationtype.DILUTION_OPERATOR.getAnnotationValue(dc, plate)); 196 } 145 197 jsonPlate.put("poolSchema", Annotationtype.POOL_SCHEMA.getAnnotationValue(dc, plate)); 146 198 jsonPlates.add(jsonPlate); … … 199 251 BioPlate mRnaPlate = BioPlate.getById(dc, mRnaPlateId); 200 252 253 JSONObject jsonPlate = new JSONObject(); 254 jsonPlate.put("id", mRnaPlate.getId()); 255 jsonPlate.put("name", mRnaPlate.getName()); 256 jsonPlate.put("comments", mRnaPlate.getDescription()); 257 jsonPlate.put("DilutionDate", Reggie.CONVERTER_DATE_TO_STRING.convert((Date)Annotationtype.DILUTION_DATE.getAnnotationValue(dc, mRnaPlate))); 258 jsonPlate.put("DilutionOperator", Annotationtype.DILUTION_OPERATOR.getAnnotationValue(dc, mRnaPlate)); 259 jsonPlate.put("poolSchema", Annotationtype.POOL_SCHEMA.getAnnotationValue(dc, mRnaPlate)); 260 201 261 ItemQuery<Extract> query = Extract.getQuery(); 202 262 query.join(Hql.innerJoin(null, "bioWell", "bw", true)); … … 241 301 242 302 json.put("mrna", jsonMRna); 303 json.put("plate", jsonPlate); 243 304 } 244 305 … … 556 617 jsonMessages.add("Created " + mRnaPlate.getName() + " with " + jsonWells.size() + " mRNA child items"); 557 618 } 619 else if ("RegisterRNADilution".equals(cmd)) 620 { 621 dc = sc.newDbControl(); 622 623 ReggieRole.checkPermission(dc, "'" + cmd + "' wizard", ReggieRole.LIBRARY_PREP, ReggieRole.ADMINISTRATOR); 624 625 JSONObject jsonReq = (JSONObject)new JSONParser().parse(req.getReader()); 626 627 Number bioPlateId = (Number)jsonReq.get("bioplate"); 628 629 // Load mRNA plate and the creation event 630 ReactionPlate mrnaReactionPlate = ReactionPlate.getById(dc, bioPlateId.intValue(), BioplateType.MRNA); 631 BioPlate mrnaPlate = mrnaReactionPlate.getBioPlate(); 632 633 // Dates and operators 634 Annotationtype.DILUTION_DATE.setAnnotationValue(dc, mrnaPlate, Reggie.CONVERTER_STRING_TO_DATE.convert((String)jsonReq.get("dilutionDate"))); 635 Annotationtype.DILUTION_OPERATOR.setAnnotationValue(dc, mrnaPlate, Values.getStringOrNull((String)jsonReq.get("dilutionOperator"))); 636 637 // Comment about the plate 638 mrnaPlate.setDescription((String)jsonReq.get("comments")); 639 640 jsonMessages.add("RNA dilution for mRNA plate '" + mrnaPlate.getName() + "' registered successfully."); 641 642 dc.commit(); 643 } 558 644 559 645 else if ("ImportMRnaQCResults".equals(cmd)) … … 606 692 607 693 // Dates and operators 608 Annotationtype.DILUTION_DATE.setAnnotationValue(dc, mrnaPlate, Reggie.CONVERTER_STRING_TO_DATE.convert((String)jsonReq.get("dilutionDate")));609 Annotationtype.DILUTION_OPERATOR.setAnnotationValue(dc, mrnaPlate, Values.getStringOrNull((String)jsonReq.get("dilutionOperator")));610 694 Annotationtype.PURIFICATION_DATE.setAnnotationValue(dc, mrnaPlate, Reggie.CONVERTER_STRING_TO_DATE.convert((String)jsonReq.get("purificationDate"))); 611 695 Annotationtype.PURIFICATION_OPERATOR.setAnnotationValue(dc, mrnaPlate, Values.getStringOrNull((String)jsonReq.get("purificationOperator")));
Note: See TracChangeset
for help on using the changeset viewer.