Changeset 1942


Ignore:
Timestamp:
Apr 19, 2013, 11:11:26 AM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #424: Select RNA items for library preparation

Added support for setting the RNA quantities to use for regular processing and for QC. Default values are 1.1 and 1.22 µg as before. The auto-select wizard uses the lower quantity when searching for RNA.

Location:
extensions/net.sf.basedb.reggie/trunk/resources/libprep
Files:
2 edited

Legend:

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

    r1940 r1942  
    3131
    3232<script>
     33var QUANTITY_REGULAR = 1.1;
    3334function autoSelect()
    3435{
    3536  var options = {};
    3637  var frm = document.forms['options'];
    37   if (frm.remainingQuantity.checked) options.remainingQuantity = 1.1;
     38  if (frm.remainingQuantity.checked) options.remainingQuantity = QUANTITY_REGULAR;
    3839  if (frm.qualityScore.checked) options.qualityScore = 6.0;
    3940  if (frm.flag.checked) options.flag = 1;
     
    5051  }
    5152}
     53
     54function init()
     55{
     56  var frm = window.opener.document.forms['reggie'];
     57  var qRegular = parseFloat(frm.quantity_regular.value);
     58  if (qRegular > 0) QUANTITY_REGULAR = qRegular;
     59 
     60  setInnerHTML('quantity_regular', QUANTITY_REGULAR);
     61}
    5262</script>
    5363<style>
     
    5969</style>
    6070</base:head>
    61 <base:body>
     71<base:body onload="init()">
    6272  <h1><%=title %></h1>
    6373
     
    7080      <th>Active filters</th>
    7181      <td>
    72         <input type="checkbox" name="remainingQuantity" id="remainingQuantity" value="1" checked><label for="remainingQuantity">Remaining quantity ≥ 1.1µg</label><br>
    73         <input type="checkbox" name="qualityScore" id="qualityScore" value="1" checked><label for="qualityScore">RQS/RIN ≥ 6</label><br>
     82        <input type="checkbox" name="remainingQuantity" id="remainingQuantity" value="1" checked>
     83          <label for="remainingQuantity">Remaining quantity ≥ <span id="quantity_regular"></span> µg</label><br>
     84        <input type="checkbox" name="qualityScore" id="qualityScore" value="1" checked>
     85          <label for="qualityScore">RQS/RIN ≥ 6</label><br>
    7486      </td>
    7587    </tr>
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/select_rna.jsp

    r1940 r1942  
    3838var debug = true;
    3939
    40 var QUANTITY_REGULAR = 1.1;
    41 var QUANTITY_QC = 1.22;
    42 var LOW_QUANTITY_WARNING_FACTOR = 1.5;
     40var quantitiesAreValid = false;
     41var QUANTITY_REGULAR;
     42var QUANTITY_QC;
     43var LOW_QUANTITY_WARNING_FACTOR = 2;
    4344var QUALITY_SCORE_WARNING_LIMIT = 8;
    4445
     
    198199      if (info && info.id && !rna.stratagene && !rna.external)
    199200      {
    200         var quantity = 1000 * (rna.qc ? QUANTITY_QC : QUANTITY_REGULAR);
    201         var use = Math.ceil(quantity/info.NDConc);
     201        var quantity = 10000 * (rna.qc ? QUANTITY_QC : QUANTITY_REGULAR);
     202        var use = Math.ceil(quantity/info.NDConc) / 10;
    202203        var water = Math.round(50-use);
    203204        if (info.remainingQuantity)
    204205        {
    205206          text += '<div class="quantity">'+Numbers.formatNumber(info.remainingQuantity, 2) + 'µg</div>';
    206           // Must have at least 1.1µg or 1.22µg
     207          // Must have at least 1.1µg or 1.22µg (if default values are used)
    207208          var remainLimit = rna.qc ? QUANTITY_QC : QUANTITY_REGULAR;
    208209          if (info.remainingQuantity < remainLimit)
     
    277278  keepSessionAlive('<%=ID%>', false, '../');
    278279 
     280  quantityOnBlur();
     281 
    279282  var frm = document.forms['reggie'];
    280283  var schema = PoolSchema.initList(frm.pool_schema);
     
    11911194function goCreate()
    11921195{
     1196  if (!quantitiesAreValid)
     1197  {
     1198    setInnerHTML('gonext.message', 'Invalid RNA quantities');
     1199    return;
     1200  }
     1201 
    11931202  var submitInfo = {};
    11941203  var plateInfo = {};
     
    11981207  submitInfo.flagged = flaggedRnaInfo;
    11991208  var frm = document.forms['reggie'];
    1200  
    12011209  var schema = POOL_SCHEMA[frm.pool_schema.selectedIndex];
    12021210 
     
    12891297
    12901298  if (debug) Main.debug(JSON.stringify(submitInfo));
    1291  
     1299
    12921300  var request = Ajax.getXmlHttpRequest();
    12931301  var url = '../MRna.servlet?ID=<%=ID%>';
     
    13401348  Plate.paint(Plate.getWells());
    13411349  PoolSchema.buildPoolTableRow(schema, Plate.columns, true);
     1350}
     1351
     1352function quantityOnBlur()
     1353{
     1354  var frm = document.forms['reggie'];
     1355  quantitiesAreValid = false;
     1356  setInnerHTML('gonext.message', '');
     1357 
     1358  var qRegular = parseFloat(frm.quantity_regular.value);
     1359  if (!(qRegular > 0))
     1360  {
     1361    setInputStatus('quantities', 'Amount must be ≥ 0.', 'invalid');
     1362    return;
     1363  }
     1364  var qQc = parseFloat(frm.quantity_qc.value);
     1365  if (!(qQc > qRegular))
     1366  {
     1367    setInputStatus('quantities', 'Amount QC must be &gt; ' + qRegular + '.', 'invalid');
     1368    return;
     1369  }
     1370 
     1371  quantitiesAreValid = true;
     1372  QUANTITY_REGULAR = qRegular;
     1373  QUANTITY_QC = qQc;
     1374  setInputStatus('quantities', '', 'valid');
     1375  Plate.paint(Plate.getWells());
    13421376}
    13431377
     
    15521586        <td class="prompt">Name</td>
    15531587        <td class="input" id="plateName"></td>
     1588        <td class="status"></td>
    15541589        <td class="help">Select RNA items to use for the new mRNA plate.</td>
     1590      </tr>
     1591      <tr valign="top">
     1592        <td class="prompt">Preliminary pool layout</td>
     1593        <td class="input">
     1594          <select name="pool_schema" onchange="poolSchemaOnChange()" style="width: 25em;" class="required"></select>
     1595        </td>
     1596        <td class="status"></td>
     1597        <td class="help">Preliminary pool layout (can be changed later).</td>
    15551598      </tr>
    15561599      <tr valign="top">
    15571600        <td class="prompt">Stratagene to use</td>
    15581601        <td class="input">
    1559           <select name="stratagene" style="width: 25em;"></select>
     1602          <select name="stratagene" style="width: 25em;" class="required"></select>
    15601603        </td>
     1604        <td class="status"></td>
    15611605        <td class="help">
    15621606          Select the Stratagene tube to use. If not known, the
     
    15651609      </tr>
    15661610      <tr valign="top">
    1567         <td class="prompt">Preliminary pool layout</td>
     1611        <td class="prompt">Amount of RNA</td>
    15681612        <td class="input">
    1569           <select name="pool_schema" onchange="poolSchemaOnChange()" style="width: 25em;"></select>
     1613          Normal <input type="text" class="text required" name="quantity_regular"
     1614            value="1.1" style="width: 4em;"
     1615            onblur="quantityOnBlur()"
     1616            onkeypress="return Numbers.numberOnly(event)">µg,
     1617          QC <input type="text" class="text required" name="quantity_qc"
     1618            value="1.22" style="width: 4em;"
     1619            onblur="quantityOnBlur()"
     1620            onkeypress="return Numbers.numberOnly(event)">µg
    15701621        </td>
    1571         <td class="help">Preliminary pool layout (can be changed later).</td>
     1622        <td class="status" id="quantities.status"></td>
     1623        <td class="help">
     1624          <span id="quantities.message" class="message" style="display: none;"></span>
     1625          Specify the amount of RNA to use. Aliquots for QC usually need 0.12µg extra.
     1626        </td>
    15721627      </tr>
    15731628      <tr valign="top">
     
    15761631          <textarea rows="2" style="width: 90%;" name="comments" value=""></textarea>
    15771632        </td>
     1633        <td class="status"></td>
    15781634        <td class="help">Comments about the new mRNA plate.</td>
    15791635      </tr>
     
    15951651          </table>
    15961652        </td>
     1653        <td class="status"></td>
    15971654        <td class="help">Toggles visiblity of the selected information inside each well on the plate.</td>
    15981655      </tr>
     
    16041661          <br>
    16051662        </td>
     1663        <td class="status"></td>
    16061664        <td class="help">Use the selected mouse button to display a context-menu when clicking on the plate.</td>
    16071665      </tr>
     
    17721830    <td><base:button id="gocreate" title="Create" image="<%=home+"/images/gonext.png"%>" onclick="goCreate()" /></td>
    17731831    <td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" onclick="goRestart(true)" style="display: none;"/></td>
     1832    <td id="gonext.message" class="message"></td>
    17741833  </tr>
    17751834  </table>
Note: See TracChangeset for help on using the changeset viewer.