Changeset 2151


Ignore:
Timestamp:
Nov 26, 2013, 9:52:40 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #538: Count and display number of libraries with low and high concentration in create pooled library wizards

Added three counters to the two pooling wizards:

  • Separate mix: the number of libraries that need to be mixed separately before pooling
  • Low quantity: the number of libraries with less remaining quantity that required to reach the target molarity/volume for the pool
  • Excluded: the number of libraries that has been excluded from the pool
Location:
extensions/net.sf.basedb.reggie/trunk/resources/libprep
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/create_manual_pool.jsp

    r2150 r2151  
    341341  var mixingStrategy = Forms.getCheckedRadio(frm.mixing_strategy).value;
    342342
     343  var numSeparateMix = 0;
     344  var numLowQuantity = 0;
     345  var numExcluded = 0;
     346
    343347  // Get all libs into an array
    344348  var libs = [];
     
    362366      PoolMix.calculateEbVolume(lib, TARGET_MOLARITY_IN_POOL, targetVolumePerLib, mixingStrategy);
    363367    }
     368    else
     369    {
     370      numExcluded++;
     371    }
    364372  }
    365373   
     
    403411        setInnerHTML('lib.'+lib.id+'.eb', '-');
    404412      }
     413      if (lib.eb != 0 || mixingStrategy == 'fixed') numSeparateMix++;
     414      if (lib.volume > lib.actualVolume) numLowQuantity++;
    405415    }
    406416   
     
    440450  poolData += '</div>';
    441451  poolDiv.innerHTML = poolData;
     452 
     453  setInnerHTML('num_separate_mix', numSeparateMix);
     454  setInnerHTML('num_low_quantity', numLowQuantity);
     455  setInnerHTML('num_excluded', numExcluded);
     456
    442457}
    443458
     
    816831        />
    817832      </tbl:toolbar>
    818      
     833
    819834      <div id="pool-table" class="bottomborder">
    820835      <table style="width: 100%;">
     
    830845     
    831846      <div id="lib-table" style="display: none;">
    832       <table class="bottomborder">
     847      <div style="margin: 1em;" class="messagecontainer note">
     848        <base:icon image="info.png"/>
     849        <b>Separate mix:</b> <span id="num_separate_mix"></span>,
     850        <b>Low quantity:</b> <span id="num_low_quantity"></span>,
     851        <b>Excluded:</b> <span id="num_excluded"></span>
     852      </div>
     853      <table class="bottomborder topborder">
    833854      <thead>
    834855        <tr>
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/create_pools.jsp

    r2150 r2151  
    432432  var schema = PoolSchema.getById(libPlate.poolSchema);
    433433  var barcodeVariant = PoolSchema.getBarcodeVariantByName(schema, libPlate.barcodeVariant);
     434
     435  var numSeparateMix = 0;
     436  var numLowQuantity = 0;
     437  var numExcluded = 0;
    434438 
    435439  for (var poolNo = 0; poolNo < Plate.getPools(); poolNo++)
     
    442446      var well = wells[wellNo];
    443447      var lib = well.extract;
    444       if (lib && !lib.excludeFromPool)
    445       {
    446         libs[libs.length] = lib;
     448      if (lib)
     449      {
     450        if (lib.excludeFromPool)
     451        {
     452          numExcluded++;
     453        }
     454        else
     455        {
     456          libs[libs.length] = lib;
     457        }
    447458      }
    448459    }
     
    457468      var lib = libs[libNo];
    458469      calculateRemarks(lib, schema, barcodeVariant);
     470      if (lib.eb != 0 || mixingStrategy == 'fixed') numSeparateMix++;
     471      if (lib.volume > lib.actualVolume) numLowQuantity++;
    459472    }
    460473   
     
    490503    frm['comment.'+poolNo].value = comments;
    491504  }
     505 
     506  setInnerHTML('num_separate_mix', numSeparateMix);
     507  setInnerHTML('num_low_quantity', numLowQuantity);
     508  setInnerHTML('num_excluded', numExcluded);
    492509}
    493510
     
    9881005      </tbl:toolbar>
    9891006     
     1007      <div style="margin: 1em;" class="messagecontainer note">
     1008        <base:icon image="info.png"/>
     1009        <b>Separate mix:</b> <span id="num_separate_mix"></span>,
     1010        <b>Low quantity:</b> <span id="num_low_quantity"></span>,
     1011        <b>Excluded:</b> <span id="num_excluded"></span>
     1012      </div>
     1013     
    9901014      <table class="plate" style="margin: 1em 1em 1em 1em;" id="plate">
    9911015      <%
Note: See TracChangeset for help on using the changeset viewer.