Changeset 2141
- Timestamp:
- Nov 18, 2013, 2:36:50 PM (10 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/libprep/create_pools.jsp
r2140 r2141 139 139 submitInfo.flagged = []; 140 140 var frm = document.forms['reggie']; 141 var libPlate = frm.bioplate[frm.bioplate.selectedIndex].bioplate; 141 142 submitInfo.targetVolumeInPoolPerLib = parseFloat(frm.target_volume.value); 142 143 submitInfo.targetPoolMolarity = TARGET_MOLARITY_IN_POOL; … … 152 153 poolInfo.comment = frm['comment.'+poolNo].value; 153 154 poolInfo.ebVolumeExtra = POOL_DATA[poolNo].ebVolumeExtra; 155 poolInfo.libPlate = libPlate.id; 154 156 poolInfo.libs = []; 155 157 poolInfo.excluded = []; -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/pool_protocol.jsp
r2108 r2141 52 52 var pool = pools[poolNo]; 53 53 // Shortcut to single-plate pools 54 var libPlateForPool = pool.libPlates.length == 1 ? pool.libPlates[0] : null;55 pool.libPlate = libPlateForPool 54 var libPlateForPool = pool.libPlates.length == 1 && !pool.isManual ? pool.libPlates[0] : null; 55 pool.libPlate = libPlateForPool; 56 56 57 57 // If the pool has a single library bioplate add it to the selection list 58 58 // If the pool doesn't have a single library bioplate, nothing is added to 59 // the list and the pool can only be selected when the 'm ultiple' option is59 // the list and the pool can only be selected when the 'manual' option is 60 60 // active for the bioplates list 61 61 if (libPlateForPool != null && !libPlates[libPlateForPool.name]) … … 128 128 if (addPool) 129 129 { 130 frm.pools[frm.pools.length] = new Option(pool.name, pool.id, libPlateId); 130 var name = pool.name; 131 if (pool.libPlate == null) 132 { 133 134 name += ' - '; 135 var numPlates = pool.libPlates.length; 136 var title = ''; 137 if (numPlates <= 2) 138 { 139 for (var plateNo=0; plateNo < numPlates; plateNo++) 140 { 141 var libPlate = pool.libPlates[plateNo]; 142 if (plateNo > 0) name += ', '; 143 name += libPlate.name; 144 } 145 } 146 else 147 { 148 name += pool.libPlates[0].name + ' + ' + (numPlates-1) + ' more...'; 149 for (var plateNo=0; plateNo < numPlates; plateNo++) 150 { 151 var libPlate = pool.libPlates[plateNo]; 152 if (plateNo > 0) title += ', '; 153 title += libPlate.name; 154 } 155 } 156 } 157 158 frm.pools[frm.pools.length] = new Option(name, pool.id, libPlateId || frm.pools.length == 0); 131 159 } 132 160 } … … 135 163 if (libPlateId) 136 164 { 137 frm.pools.disabled = true;165 //frm.pools.disabled = true; 138 166 Main.removeClass(document.getElementById('plateview'), 'disabled'); 139 167 } … … 153 181 if (libPlateId == 0) 154 182 { 155 // 'm ultiple' option selected, check that at least one pool is selected183 // 'manual' option selected, check that at least one pool is selected 156 184 var numSelectedPools = 0; 157 185 for (var poolNo = 0; poolNo < frm.pools.length; poolNo++) … … 213 241 <td class="input"> 214 242 <select style="width:90%;" name="bioplate" id="bioplate" onchange="bioplateOnChange()"> 215 <option value="0">- m ultiple-243 <option value="0">- manual pools - 216 244 </select> 217 <br>218 <i>- or -</i>219 245 </td> 220 246 <td class="status" id="bioplate.status"></td> … … 222 248 Select the library bioplate that should be pooled in this step. The list contains 223 249 all plates with pools that has not yet been created (determined by abscense of creation date). 224 Use the <b>m ultiple</b> option to select pools with libraries from multiple plates.250 Use the <b>manual pools</b> option to select pools that has been manually created. 225 251 </td> 226 252 </tr> -
extensions/net.sf.basedb.reggie/trunk/resources/libprep/pool_registration.jsp
r2108 r2141 56 56 57 57 // Shortcut to single-plate pools 58 var libPlateForPool = pool.libPlates.length == 1 ? pool.libPlates[0] : null;58 var libPlateForPool = pool.libPlates.length == 1 && !pool.isManual ? pool.libPlates[0] : null; 59 59 pool.libPlate = libPlateForPool 60 60 61 61 // If the pool has a single library bioplate add it to the selection list 62 62 // If the pool doesn't have a single library bioplate, nothing is added to 63 // the list and the pool can only be selected when the 'm ultiple' option is63 // the list and the pool can only be selected when the 'manual pools' option is 64 64 // active for the bioplates list 65 65 if (libPlateForPool != null && !libPlates[libPlateForPool.name]) … … 133 133 if (addPool) 134 134 { 135 var option = new Option(pool.name, pool.id, libPlateId); 135 var name = pool.name; 136 if (pool.libPlate == null) 137 { 138 139 name += ' - '; 140 var numPlates = pool.libPlates.length; 141 var title = ''; 142 if (numPlates <= 2) 143 { 144 for (var plateNo=0; plateNo < numPlates; plateNo++) 145 { 146 var libPlate = pool.libPlates[plateNo]; 147 if (plateNo > 0) name += ', '; 148 name += libPlate.name; 149 } 150 } 151 else 152 { 153 name += pool.libPlates[0].name + ' + ' + (numPlates-1) + ' more...'; 154 for (var plateNo=0; plateNo < numPlates; plateNo++) 155 { 156 var libPlate = pool.libPlates[plateNo]; 157 if (plateNo > 0) title += ', '; 158 title += libPlate.name; 159 } 160 } 161 } 162 163 var option = new Option(name, pool.id, libPlateId || frm.pools.length == 0); 136 164 option.pool = pool; 137 165 frm.pools[frm.pools.length] = option; … … 425 453 <td class="input"> 426 454 <select style="width:90%;" name="bioplate" id="bioplate" onchange="bioplateOnChange()"> 427 <option value="0">- m ultiple-455 <option value="0">- manual pools - 428 456 </select> 429 <br>430 <i>- or -</i>431 457 </td> 432 458 <td class="status" id="bioplate.status"></td> … … 434 460 Select the library bioplate that should be pooled in this step. The list contains 435 461 all plates with pools that has not yet been created (determined by abscense of creation date). 436 Use the <b>m ultiple</b> option to select pools with libraries from multiple plates.462 Use the <b>manual pools</b> option to select pools that has been manually created. 437 463 </td> 438 464 </tr> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Annotationtype.java
r2140 r2141 605 605 public static final Annotationtype POOL_TARGET_MOLARITY = 606 606 new Annotationtype("PoolTargetMolarity", Type.FLOAT, Item.EXTRACT); 607 608 /** 609 The "PoolIsManual" annotation, used for extracts (PooledLibrary). 610 Store a flag indicating if the pool is manaually created. If not set, 611 it is asssumed that the pool is created from an entire library working plate. 612 @since 2.14 613 */ 614 public static final Annotationtype POOL_IS_MANUAL = 615 new Annotationtype("PoolIsManual", Type.BOOLEAN, Item.EXTRACT); 616 607 617 608 618 /** -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java
r2140 r2141 278 278 jsonChecks.add(checkAnnotationType(dc, Annotationtype.POOL_TARGET_VOLUME_PER_LIB, 1, null, effectiveOptions, createIfMissing)); 279 279 jsonChecks.add(checkAnnotationType(dc, Annotationtype.POOL_TARGET_MOLARITY, 1, null, effectiveOptions, createIfMissing)); 280 jsonChecks.add(checkAnnotationType(dc, Annotationtype.POOL_IS_MANUAL, 1, null, effectiveOptions, createIfMissing)); 280 281 jsonChecks.add(checkAnnotationType(dc, Annotationtype.POOL_MIXING_STRATEGY, 1, 281 282 new ValueOptions(PooledLibrary.MIXING_STRATEGY_FIXED, PooledLibrary.MIXING_STRATEGY_DYNAMIC), … … 384 385 jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.POOLED_LIBRARY, createIfMissing, 385 386 Annotationtype.POOL_MOLARITY, Annotationtype.POOL_CONC, Annotationtype.POOL_TARGET_VOLUME_PER_LIB, 386 Annotationtype.POOL_TARGET_MOLARITY, 387 Annotationtype.POOL_TARGET_MOLARITY, Annotationtype.POOL_IS_MANUAL, 387 388 Annotationtype.POOL_MIXING_STRATEGY, Annotationtype.POOL_DATE, Annotationtype.OPERATOR, 388 389 Annotationtype.FLAG, Annotationtype.AUTO_PROCESSING)); -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/PoolServlet.java
r2140 r2141 19 19 20 20 21 21 22 import net.sf.basedb.clients.web.util.HTML; 23 import net.sf.basedb.core.AnyToAny; 22 24 import net.sf.basedb.core.Application; 23 25 import net.sf.basedb.core.BioMaterialEvent; … … 274 276 pool.loadAnnotations(dc, "molarity", Annotationtype.POOL_MOLARITY, null); 275 277 pool.loadAnnotations(dc, "conc", Annotationtype.POOL_CONC, null); 278 pool.loadAnnotations(dc, "isManual", Annotationtype.POOL_IS_MANUAL, null); 276 279 pool.setAnnotation("remainingQuantity", pool.getExtract().getRemainingQuantity()); 277 280 pool.setAnnotation("comments", pool.getExtract().getDescription()); … … 391 394 JSONArray jsonExcluded = (JSONArray)jsonPool.get("excluded"); 392 395 396 Number libPlateId = (Number)jsonPool.get("libPlate"); 397 393 398 // Create PooledLibrary item 394 399 Extract pool = Extract.getNew(dc); … … 399 404 Annotationtype.POOL_TARGET_MOLARITY.setAnnotationValue(dc, pool, targetPoolMolarity.floatValue()); 400 405 Annotationtype.POOL_MIXING_STRATEGY.setAnnotationValue(dc, pool, mixingStrategy); 406 407 // Link with library plate 408 if (libPlateId != null) 409 { 410 BioPlate libPlate = BioPlate.getById(dc, libPlateId.intValue()); 411 AnyToAny libPlateLink = AnyToAny.getNew(dc, pool, libPlate, "LibPlate", true); 412 dc.saveItemIf(pool, libPlateLink, false); 413 jsonMessages.add("Linked pool " + pool.getName() + " with " + libPlateLink); 414 } 415 else 416 { 417 Annotationtype.POOL_IS_MANUAL.setAnnotationValue(dc, pool, true); 418 } 401 419 402 420 BioMaterialEvent poolEvent = pool.getCreationEvent();
Note: See TracChangeset
for help on using the changeset viewer.