Changeset 6218
- Timestamp:
- Apr 20, 2021, 1:16:43 PM (13 months ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/libprep/external_protocol.js
r5891 r6218 176 176 if (stratageneConc > 0) 177 177 { 178 if (rna.stratagene && !rna. NDConc) rna.NDConc = stratageneConc;178 if (rna.stratagene && !rna.conc) rna.conc = stratageneConc; 179 179 } 180 180 181 181 // Calculate volume to use and water to add based on concentration 182 182 var remarks = []; 183 if (rna. NDConc && rna.usedQuantity)184 { 185 rna.volume = Math.ceil(10000*rna.usedQuantity/rna. NDConc) / 10; // µl183 if (rna.conc && rna.usedQuantity) 184 { 185 rna.volume = Math.ceil(10000*rna.usedQuantity/rna.conc) / 10; // µl 186 186 187 187 var totalVolume = lib.DilutionConc ? 1000 * rna.usedQuantity / lib.DilutionConc : lib.DilutionVolume; … … 217 217 remarks[remarks.length] = 'Low quantity'; 218 218 } 219 if (!rna. NDConc)220 { 221 remarks[remarks.length] = 'No NDConc value';222 } 223 } 224 else 225 { 226 if (!rna. NDConc && rna.usedQuantity)219 if (!rna.conc) 220 { 221 remarks[remarks.length] = 'No concentration'; 222 } 223 } 224 else 225 { 226 if (!rna.conc && rna.usedQuantity) 227 227 { 228 228 remarks[remarks.length] = 'Use ' + Numbers.formatNumber(rna.usedQuantity, 2) + ' µg RNA'; … … 268 268 Doc.element('rna.'+idSuffix).innerHTML = img+Strings.encodeTags(rna.external && lib.externalId ? lib.externalId : rna.name); 269 269 Doc.element('box.'+idSuffix).innerHTML = Strings.encodeTags(protocol.getPlateCoordinate(rna, true)); 270 Doc.element(' ndconc.'+idSuffix).innerHTML = Numbers.formatNumber(rna.NDConc, 2);270 Doc.element('conc.'+idSuffix).innerHTML = Numbers.formatNumber(rna.conc, 2); 271 271 Doc.element('remain.'+idSuffix).innerHTML = Numbers.formatNumber(rna.remainingQuantity, 2); 272 272 Doc.element('volume.'+idSuffix).innerHTML = Numbers.formatNumber(rna.volume, 1); … … 335 335 text += '<div class="box">'+Strings.encodeTags(Protocol.getPlateCoordinate(rna, true))+'</div>'; 336 336 text += '<div class="remain">'+Numbers.formatNumber(rna.remainingQuantity, 2, 'µg')+'</div>'; 337 text += '<div class=" ndconc">'+Numbers.formatNumber(rna.NDConc, 2, 'ng/µl') + '</div>';337 text += '<div class="conc">'+Numbers.formatNumber(rna.conc, 2, 'ng/µl') + '</div>'; 338 338 339 339 if (rna.volume >= 0 && rna.water >= 0) -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/external_protocol2.jsp
r5891 r6218 162 162 text-align: center; 163 163 } 164 #listview . ndconc164 #listview .conc 165 165 { 166 166 width: 4.5em; … … 223 223 margin-bottom: 0.25em; 224 224 } 225 #plateview . ndconc225 #plateview .conc 226 226 { 227 227 display: none; … … 333 333 <th class="rna"></th> 334 334 <th class="box">Storage</th> 335 <th> NDConc</th>335 <th>Conc.</th> 336 336 <th>Remain</th> 337 337 <th class="workplate">Work</th> … … 375 375 <td class="rna if-yellow" id="rna.<%=idSuffix%>">empty</td> 376 376 <td class="box" id="box.<%=idSuffix%>"></td> 377 <td class=" ndconc" id="ndconc.<%=idSuffix%>"></td>377 <td class="conc" id="conc.<%=idSuffix%>"></td> 378 378 <td class="remain" id="remain.<%=idSuffix%>"></td> 379 379 <td class="workplate"><%=rowF.format(r)+colF.format(c)%></td> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/mrna_protocol.js
r5740 r6218 170 170 if (stratageneConc > 0) 171 171 { 172 if (rna.stratagene && !rna. NDConc) rna.NDConc = stratageneConc;172 if (rna.stratagene && !rna.conc) rna.conc = stratageneConc; 173 173 } 174 174 175 175 // Calculate volume to use and water to add based on concentration 176 176 var remarks = []; 177 if (rna. NDConc && rna.usedQuantity)178 { 179 rna.volume = Math.ceil(10000*rna.usedQuantity/rna. NDConc) / 10; // µl177 if (rna.conc && rna.usedQuantity) 178 { 179 rna.volume = Math.ceil(10000*rna.usedQuantity/rna.conc) / 10; // µl 180 180 181 181 var totalVolume = mrna.DilutionConc ? 1000 * rna.usedQuantity / mrna.DilutionConc : mrna.DilutionVolume; … … 211 211 remarks[remarks.length] = 'Low quantity'; 212 212 } 213 if (!rna. NDConc)214 { 215 remarks[remarks.length] = 'No NDConc value';216 } 217 } 218 else 219 { 220 if (!rna. NDConc && rna.usedQuantity)213 if (!rna.conc) 214 { 215 remarks[remarks.length] = 'No concentration'; 216 } 217 } 218 else 219 { 220 if (!rna.conc && rna.usedQuantity) 221 221 { 222 222 remarks[remarks.length] = 'Use ' + Numbers.formatNumber(rna.usedQuantity, 2) + ' µg RNA'; … … 262 262 Doc.element('rna.'+idSuffix).innerHTML = img+Strings.encodeTags(rna.external && mrna.externalId ? mrna.externalId : rna.name); 263 263 Doc.element('box.'+idSuffix).innerHTML = Strings.encodeTags(protocol.getPlateCoordinate(rna, true)); 264 Doc.element(' ndconc.'+idSuffix).innerHTML = Numbers.formatNumber(rna.NDConc, 2);264 Doc.element('conc.'+idSuffix).innerHTML = Numbers.formatNumber(rna.conc, 2); 265 265 Doc.element('remain.'+idSuffix).innerHTML = Numbers.formatNumber(rna.remainingQuantity, 2); 266 266 Doc.element('volume.'+idSuffix).innerHTML = Numbers.formatNumber(rna.volume, 1); … … 329 329 text += '<div class="box">'+Strings.encodeTags(Protocol.getPlateCoordinate(rna, true))+'</div>'; 330 330 text += '<div class="remain">'+Numbers.formatNumber(rna.remainingQuantity, 2, 'µg')+'</div>'; 331 text += '<div class=" ndconc">'+Numbers.formatNumber(rna.NDConc, 2, 'ng/µl') + '</div>';331 text += '<div class="conc">'+Numbers.formatNumber(rna.conc, 2, 'ng/µl') + '</div>'; 332 332 333 333 if (rna.volume >= 0 && rna.water >= 0) -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/mrna_protocol2.jsp
r3976 r6218 163 163 text-align: center; 164 164 } 165 #listview . ndconc165 #listview .conc 166 166 { 167 167 width: 4.5em; … … 224 224 margin-bottom: 0.25em; 225 225 } 226 #plateview . ndconc226 #plateview .conc 227 227 { 228 228 display: none; … … 355 355 <th class="rna"></th> 356 356 <th class="box">Storage</th> 357 <th> NDConc</th>357 <th>Conc.</th> 358 358 <th>Remain</th> 359 359 <th class="workplate">Work</th> … … 397 397 <td class="rna if-yellow" id="rna.<%=idSuffix%>">empty</td> 398 398 <td class="box" id="box.<%=idSuffix%>"></td> 399 <td class=" ndconc" id="ndconc.<%=idSuffix%>"></td>399 <td class="conc" id="conc.<%=idSuffix%>"></td> 400 400 <td class="remain" id="remain.<%=idSuffix%>"></td> 401 401 <td class="workplate"><%=rowF.format(r)+colF.format(c)%></td> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/select_rna.js
r5891 r6218 58 58 Events.addEventHandler('quantity', 'click', selectrna.toggleInfo); 59 59 Events.addEventHandler('quality-score', 'click', selectrna.toggleInfo); 60 Events.addEventHandler(' ndconc', 'click', selectrna.toggleInfo);60 Events.addEventHandler('conc', 'click', selectrna.toggleInfo); 61 61 Events.addEventHandler('volumes', 'click', selectrna.toggleInfo); 62 62 Events.addEventHandler('qiacube-date', 'click', selectrna.toggleInfo); … … 1493 1493 rna.dilutionConc = 1000 * rna.usedQuantity / TOTAL_VOLUME; // ng/µl 1494 1494 1495 var volRNA = Math.ceil(10000*rna.usedQuantity/info. NDConc) / 10; // µl, rounded to 1 decimal1495 var volRNA = Math.ceil(10000*rna.usedQuantity/info.conc) / 10; // µl, rounded to 1 decimal 1496 1496 var water = TOTAL_VOLUME - volRNA; 1497 1497 … … 1500 1500 // Large mix since we do not want to take less than 1µl 1501 1501 volRNA = MINIMAL_RNA_VOLUME; 1502 rna.usedQuantity = volRNA * info. NDConc / 1000; // µg1502 rna.usedQuantity = volRNA * info.conc / 1000; // µg 1503 1503 var totalVolume = 1000 * rna.usedQuantity / rna.dilutionConc; // µl 1504 1504 water = totalVolume - volRNA; … … 1508 1508 { 1509 1509 volRNA = TOTAL_VOLUME; 1510 rna.usedQuantity = volRNA * info. NDConc / 1000; // µg1511 rna.dilutionConc = info. NDConc;1510 rna.usedQuantity = volRNA * info.conc / 1000; // µg 1511 rna.dilutionConc = info.conc; 1512 1512 water = 0; 1513 1513 } … … 1546 1546 warningMsg[warningMsg.length] = 'No RQS/RIN value'; 1547 1547 } 1548 if (info. NDConc)1549 { 1550 text += '<div class=" ndconc">'+Numbers.formatNumber(info.NDConc, 2) + 'ng/µl</div>';1548 if (info.conc) 1549 { 1550 text += '<div class="conc">'+Numbers.formatNumber(info.conc, 2) + 'ng/µl</div>'; 1551 1551 text += '<div class="volumes"><span class="volume">'+Numbers.formatNumber(volRNA, 1)+'</span> + <span class="water">'+Numbers.formatNumber(water, 1)+'µl</span></div>'; 1552 1552 } 1553 1553 else 1554 1554 { 1555 if (!rna.external) warningMsg[warningMsg.length] = 'No NDConc value';1555 if (!rna.external) warningMsg[warningMsg.length] = 'No concentration'; 1556 1556 } 1557 1557 if (info.QiacubeDate) -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/select_rna.jsp
r5882 r6218 102 102 display: none; 103 103 } 104 .plate.hide- ndconc .ndconc104 .plate.hide-conc .conc 105 105 { 106 106 display: none; … … 418 418 <td> 419 419 <input type="checkbox" name="quality-score" id="quality-score"><label for="quality-score">RQS/RIN</label><br> 420 <input type="checkbox" name=" ndconc" id="ndconc"><label for="ndconc">NDConc</label><br>420 <input type="checkbox" name="conc" id="conc"><label for="conc" title="NanoDrop or Qubit concentration">Conc.</label><br> 421 421 </td> 422 422 <td> … … 511 511 </div> 512 512 513 <table id="plate" class="plate hide-volumes hide- ndconc hide-quality-score hide-qiacube-date"513 <table id="plate" class="plate hide-volumes hide-conc hide-quality-score hide-qiacube-date" 514 514 style="margin: 1em auto 0 auto;"> 515 515 <% -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/ReggieItem.java
r6193 r6218 152 152 153 153 /** 154 Get the first non-null value of 'key' and 'keys' 155 and put it into 'key'. Return the value. 156 @since 4.32 157 */ 158 public Object coalesceInto(String key, String... keys) 159 { 160 JSONObject json = asJSONObject(); 161 Object val = json.get(key); 162 int index = 0; 163 while (val == null && index < keys.length) 164 { 165 val = json.get(keys[index]); 166 index++; 167 } 168 if (index > 0) json.put(key, val); 169 return val; 170 } 171 172 /** 154 173 Load annotations for the given annotation type and store the values in 155 174 the given JSON key. Single-valued annotation types are stored as a simple -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Rna.java
r6193 r6218 342 342 r.loadDoNotUseAnnotations(dc, manager); 343 343 r.loadAnnotations(dc, manager, "NDConc", Annotationtype.ND_CONC, null); 344 r.loadAnnotations(dc, manager, "QubitConc", Annotationtype.QUBIT_CONC, null); 345 r.coalesceInto("conc", "NDConc", "QubitConc"); 344 346 r.loadAnnotations(dc, manager, "DilutionDate", Annotationtype.DILUTION_DATE, Reggie.CONVERTER_DATE_TO_STRING); 345 347 } … … 513 515 r.loadDoNotUseAnnotations(dc, manager); 514 516 r.loadAnnotations(dc, manager, "NDConc", Annotationtype.ND_CONC, null); 517 r.loadAnnotations(dc, manager, "QubitConc", Annotationtype.QUBIT_CONC, null); 518 r.coalesceInto("conc", "NDConc", "QubitConc"); 515 519 r.loadAnnotations(dc, manager, "QiacubeDate", Annotationtype.QIACUBE_DATE, Reggie.CONVERTER_DATE_TO_STRING); 516 520 } … … 566 570 r.setAnnotation("remainingQuantity", e.getRemainingQuantity()); 567 571 r.loadAnnotations(dc, manager, "NDConc", Annotationtype.ND_CONC, null); 572 r.loadAnnotations(dc, manager, "QubitConc", Annotationtype.QUBIT_CONC, null); 573 r.coalesceInto("conc", "NDConc", "QubitConc"); 568 574 r.loadDoNotUseAnnotations(dc, manager); 569 575 -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java
r6215 r6218 892 892 Annotationtype.QIACUBE_POSITION, Annotationtype.QIACUBE_RUN_NO, 893 893 Annotationtype.ND_CONC, Annotationtype.ND_260_BY_280, Annotationtype.ND_260_BY_230, 894 Annotationtype.QUBIT_CONC, 894 895 Annotationtype.ALLPREP_MINI_KIT, Annotationtype.ETOH70, 895 896 Annotationtype.BUFFER_RW1, Annotationtype.BUFFER_RPE, … … 915 916 Annotationtype.QIACUBE_POSITION, Annotationtype.QIACUBE_RUN_NO, 916 917 Annotationtype.ND_CONC, Annotationtype.ND_260_BY_280, Annotationtype.ND_260_BY_230, 918 Annotationtype.QUBIT_CONC, 917 919 Annotationtype.ALLPREP_MINI_KIT, Annotationtype.ETOH70, 918 920 Annotationtype.BUFFER_RW1, Annotationtype.BUFFER_RPE, -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/LibPrepServlet.java
r5900 r6218 317 317 } 318 318 rna.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null); 319 rna.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null); 320 rna.coalesceInto("conc", "NDConc", "QubitConc"); 319 321 320 322 Float used = lib.getItem().getCreationEvent().getUsedQuantity(rna.getItem()); … … 587 589 row.getCell(5).setCellValue(well.getCoordinate()); // Plate position 588 590 589 // NanoDrop measurements591 // NanoDrop/Qubit measurements 590 592 Float ndConc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, rna.getItem()); 591 setNumericCell(row.getCell(6), ndConc, oneDecimal); // ND Stock conc 593 Float qubitConc = (Float)Annotationtype.QUBIT_CONC.getAnnotationValue(dc, rna.getItem()); 594 setNumericCell(row.getCell(6), ndConc != null ? ndConc : qubitConc, oneDecimal); // ND Stock conc or Qubit 592 595 Float nd260by280 = (Float)Annotationtype.ND_260_BY_280.getAnnotationValue(dc, rna.getItem()); 593 596 setNumericCell(row.getCell(7), nd260by280, oneDecimal); // ND 260/280 -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MRnaServlet.java
r5891 r6218 210 210 211 211 rna.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null); 212 212 rna.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null); 213 rna.coalesceInto("conc", "NDConc", "QubitConc"); 214 213 215 Float used = r.getItem().getCreationEvent().getUsedQuantity(rna.getItem()); 214 216 Float remain = rna.getItem().getRemainingQuantity(); … … 361 363 r.loadDoNotUseAnnotations(dc, manager); 362 364 r.loadAnnotations(dc, manager, "NDConc", Annotationtype.ND_CONC, null); 365 r.loadAnnotations(dc, manager, "QubitConc", Annotationtype.QUBIT_CONC, null); 366 r.coalesceInto("conc", "NDConc", "QubitConc"); 363 367 r.loadAnnotations(dc, manager, "AutoProcessing", Annotationtype.AUTO_PROCESSING, null); 364 368 r.loadYellowLabelInfo(dc, manager);
Note: See TracChangeset
for help on using the changeset viewer.