Changeset 1944


Ignore:
Timestamp:
Apr 19, 2013, 11:41:04 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #425: Generate a lab protocol for RNA -> cDNA processing

The protocol wizard now find out the actual regular quantity and marks all higher that that as items selected for QC.

File:
1 edited

Legend:

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

    r1938 r1944  
    5050  <title>Lab protocol for <%=HTML.encodeTags(plate.getName())%> - <%=view.equals("list") ? "list" : "table"%></title>
    5151  <link rel="SHORTCUT ICON" href="<%=home%>/images/pipette.png">
     52  <link rel="stylesheet" type="text/css" href="<%=home %>/css/reggie.css">
    5253  <link rel="stylesheet" type="text/css" href="<%=home %>/css/printable.css">
    5354  <link rel="stylesheet" type="text/css" href="<%=home %>/css/plate.css">
     
    6364
    6465  var QUANTITY_REGULAR = 1.1;
    65   var QUANTITY_QC = 1.22;
    66   var LOW_QUANTITY_WARNING_FACTOR = 1.5;
     66  var LOW_QUANTITY_WARNING_FACTOR = 2;
    6767
    6868  function init()
     
    9191   
    9292    var list = response.mrna;
     93    // Find QUANTITY_REGULAR = lowest used value
     94    QUANTITY_REGULAR = findLowestUsedQuantity(list);
     95   
    9396    // Pre-process the return mRNA items
    9497    for (var i = 0; i < list.length; i++)
     
    133136 
    134137  /**
     138    Find the lowest used quantity. This is the QUANTITY_REGULAR
     139    value. RNA with larger used quantities are assumed to be selected
     140    for QC.
     141  */
     142  function findLowestUsedQuantity(mrnaList)
     143  {
     144    var lowestQuantity = mrnaList[0].rna.usedQuantity;
     145    for (var i = 1; i < mrnaList.length; i++)
     146    {
     147      var rna = mrnaList[i].rna;
     148      if (rna.usedQuantity < lowestQuantity)
     149      {
     150        lowestQuantity = rna.usedQuantity;
     151      }
     152    }
     153    return lowestQuantity;
     154  }
     155 
     156  /**
    135157    Check the mRNA and RNA items for problems and calculate derived
    136158    information such as volume and water, qc/stratagene flags.
     
    175197        remarks[remarks.length] = 'No quantity';
    176198      }
    177       else if (rna.remainingQuantity < (rna.qc ? QUANTITY_QC : QUANTITY_REGULAR) * LOW_QUANTITY_WARNING_FACTOR)
     199      else if (rna.remainingQuantity < QUANTITY_REGULAR * LOW_QUANTITY_WARNING_FACTOR)
    178200      {
    179201        remarks[remarks.length] = 'Low quantity';
     
    270292        text += '<div class="ndconc">'+Numbers.formatNumber(rna.NDConc, 2, 'ng/µl') + '</div>';
    271293
    272         if (rna.volume && rna.water)
     294        if (rna.volume >= 0 && rna.water >= 0)
    273295        {
    274296          text += '<div><span class="volume">'+Numbers.formatNumber(rna.volume, 1)+'µl</span>';
     
    631653  }
    632654  %>
     655  <i>Low quantity = The remaining quantity is too low for the RNA to be re-processed one more time</i>
    633656  </div>
    634657</body>
Note: See TracChangeset for help on using the changeset viewer.