Changeset 2143
- Timestamp:
- Nov 19, 2013, 9:16:07 AM (10 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/libprep/auto_select_rna.jsp
r1945 r2143 36 36 var frm = document.forms['options']; 37 37 38 var startDate = frm.startDate.value; 39 if (startDate && !Dates.isDate(startDate, 'yyyyMMdd')) 40 { 41 frm.startDate.focus(); 42 alert('Not a valid date: ' + startDate); 43 return; 44 } 45 38 46 var qRegular = parseFloat(frm.quantity_regular.value); 39 47 if (!(qRegular > 0)) … … 52 60 } 53 61 62 if (startDate) options.startDate = startDate; 54 63 if (frm.remainingQuantity.checked) options.remainingQuantity = qRegular; 55 64 if (frm.qualityScore.checked) options.qualityScore = qualityScore; … … 59 68 { 60 69 showLoadingAnimation('Finding RNA. Please wait...'); 61 window.opener.autoSelect(options); 70 var msg = window.opener.autoSelect(options); 71 if (msg) alert(msg); 62 72 window.close(); 63 73 } … … 78 88 } 79 89 } 90 91 function setStartDate(frmName, dateField, date) 92 { 93 var frm = document.forms[frmName]; 94 frm[dateField].value = date; 95 frm[dateField].focus(); 96 } 97 80 98 </script> 81 99 <style> … … 95 113 96 114 <table class="fullform input100"> 115 <tr> 116 <th>Start date</th> 117 <td> 118 <input type="text" name="startDate" value="" style="width: 12em;" maxlength="10" 119 title="Enter start date in YYYYMMDD format"> 120 <base:icon 121 onclick="Dates.selectDate('Start date', 'options', 'startDate', 'setStartDate', 'yyyyMMdd')" 122 image="calendar.png" 123 tooltip="Select a date from a calendar" 124 tabindex="-1" 125 /> (empty = start from oldest) 126 </td> 127 </tr> 97 128 <tr valign="top"> 98 129 <th>Active filters</th> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/select_rna.jsp
r1960 r2143 251 251 warningMsg[warningMsg.length] = 'No NDConc value'; 252 252 } 253 if (info.QiaCubeDate) 254 { 255 text += '<div class="qiacube-date">'+info.QiaCubeDate+'</div>'; 256 } 257 else 258 { 259 warningMsg[warningMsg.length] = 'No QiaCubeDate value'; 260 } 253 261 } 254 262 else if (!rna.id) … … 903 911 if (response.rna.length == 0) 904 912 { 905 alert('Could not find any unprocessed RNA at this time.');913 return 'Could not find any unprocessed RNA at this time.'; 906 914 } 907 915 … … 1549 1557 } 1550 1558 .plate.hide-quality-score .quality-score 1559 { 1560 display: none; 1561 } 1562 .plate.hide-qiacube-date .qiacube-date 1551 1563 { 1552 1564 display: none; … … 1808 1820 <td> 1809 1821 <input type="checkbox" name="volumes" id="volumes" onclick="toggleInfo('volumes')"><label for="volumes">Used volume+water</label><br> 1822 <input type="checkbox" name="qiacube-date" id="qiacube-date" onclick="toggleInfo('qiacube-date')"><label for="qiacube-date">QiaCube date</label><br> 1810 1823 </td> 1811 1824 </tr> … … 1911 1924 </div> 1912 1925 1913 <table class="plate hide-volumes hide-ndconc hide-quality-score " style="margin: 1em 1em 0 1em;" id="plate"1926 <table class="plate hide-volumes hide-ndconc hide-quality-score hide-qiacube-date" style="margin: 1em 1em 0 1em;" id="plate" 1914 1927 onmouseup="contextEvent(event)" 1915 1928 oncontextmenu="contextEvent(event)" … … 1958 1971 { 1959 1972 %> 1960 <td id="well.<%=r%>.<%=c%>" 1973 <td id="well.<%=r%>.<%=c%>" class="well empty primary" 1961 1974 onclick="toggleWell(<%=r%>,<%=c%>)" 1962 1975 onmouseenter="highlightReplicated(<%=r%>, <%=c%>, true)" 1963 1976 onmouseleave="highlightReplicated(<%=r%>, <%=c%>, false)" 1964 title="Select/deselect this well"> </td>1977 title="Select/deselect this well">empty</td> 1965 1978 <% 1966 1979 } -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Rna.java
r2134 r2143 305 305 if (rnaqc.size() > 0) 306 306 { 307 lastQc = rnaqc.get(0);308 307 Date lastQcDate = null; 309 308 // Try to find the last QC run on either Caliper or BioAnalyzer … … 323 322 BioWell well = qc.getBioWell(); 324 323 Date qcDate = null; 324 // Try to get QC date from RNAQC reaction plate 325 325 if (well != null) 326 326 { … … 328 328 qcDate = (Date)Annotationtype.QC_RUN_DATE.getAnnotationValue(dc, plate); 329 329 } 330 // If not found, get creation date from extract 330 331 if (qcDate == null) 331 332 { 332 333 qcDate = qc.getCreationEvent().getEventDate(); 333 334 } 334 if ((lastQcDate == null && qcDate != null) || (qcDate != null && qcDate.after(lastQcDate))) 335 336 // Use the current RNAQC if this is the first found or if the date is after 337 if (lastQc == null || lastQcDate != null && qcDate != null && qcDate.after(lastQcDate)) 335 338 { 336 339 lastQcDate = qcDate; -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MRnaServlet.java
r1999 r2143 301 301 r.setAnnotation("remainingQuantity", r.getExtract().getRemainingQuantity()); 302 302 r.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null); 303 r.loadAnnotations(dc, "QiaCubeDate", Annotationtype.QIACUBE_DATE, Reggie.CONVERTER_DATE_TO_STRING); 303 304 r.setAnnotation("comment", r.getExtract().getDescription()); 304 305 jsonRna.add(r.asJSONObject()); … … 316 317 JSONArray jsonIgnore = (JSONArray)jsonReq.get("ignore"); 317 318 319 Date startDate = Reggie.CONVERTER_STRING_TO_DATE.convert((String)jsonReq.get("startDate")); 318 320 Float remainingQuantityLimit = JsonUtil.getAsFloat(jsonReq, "remainingQuantity"); 319 321 Float qualityScoreLimit = JsonUtil.getAsFloat(jsonReq, "qualityScore"); … … 331 333 } 332 334 333 // Filter for non-empty creation date 335 // Filter for non-empty creation date or creation date after startdate 334 336 query.join(Hql.innerJoin("creationEvent", "ce")); 335 query.restrict(Restrictions.neq(Hql.property("ce", "eventDate"), null)); 337 if (startDate == null) 338 { 339 query.restrict(Restrictions.neq(Hql.property("ce", "eventDate"), null)); 340 } 341 else 342 { 343 query.restrict(Restrictions.gteq(Hql.property("ce", "eventDate"), Expressions.parameter("startDate", startDate, Type.DATE))); 344 } 345 336 346 // Filter on parent != null (to get rid of 'Stratagene' 337 347 query.restrict(Restrictions.neq(Hql.property("parent"), null)); … … 390 400 r.loadBioPlateLocation(); 391 401 Float qualityScore = r.loadRnaQc(dc); 402 if (qualityScore == null) continue; // QC has not been measuered; ignore 403 392 404 r.setAnnotation("remainingQuantity", remainingQuantity); 393 405 r.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null); 406 r.loadAnnotations(dc, "QiaCubeDate", Annotationtype.QIACUBE_DATE, Reggie.CONVERTER_DATE_TO_STRING); 394 407 395 408 if (reProcess) … … 410 423 if (okToProcess && qualityScoreLimit != null) 411 424 { 412 if (qualityScore == null || qualityScore< qualityScoreLimit)425 if (qualityScore < qualityScoreLimit) 413 426 { 414 427 okToProcess = false;
Note: See TracChangeset
for help on using the changeset viewer.