Changeset 6218


Ignore:
Timestamp:
Apr 20, 2021, 1:16:43 PM (13 months ago)
Author:
Nicklas Nordborg
Message:

References #1302: Qubit concentration instead of NanoDrop? on RNA and DNA items

Started to work on this. The QubitConc annotation has been added to RNA and DNA categories.

It should be fixed in the library preparation wizards that create new mRNA plates/library plates and the lab protocols that are related.

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  
    176176    if (stratageneConc > 0)
    177177    {
    178       if (rna.stratagene && !rna.NDConc) rna.NDConc = stratageneConc;
     178      if (rna.stratagene && !rna.conc) rna.conc = stratageneConc;
    179179    }
    180180   
    181181    // Calculate volume to use and water to add based on concentration
    182182    var remarks = [];
    183     if (rna.NDConc && rna.usedQuantity)
    184     {
    185       rna.volume = Math.ceil(10000*rna.usedQuantity/rna.NDConc) / 10; // µl
     183    if (rna.conc && rna.usedQuantity)
     184    {
     185      rna.volume = Math.ceil(10000*rna.usedQuantity/rna.conc) / 10; // µl
    186186     
    187187      var totalVolume = lib.DilutionConc ? 1000 * rna.usedQuantity / lib.DilutionConc : lib.DilutionVolume;
     
    217217        remarks[remarks.length] = 'Low quantity';
    218218      }
    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)
    227227      {
    228228        remarks[remarks.length] = 'Use ' + Numbers.formatNumber(rna.usedQuantity, 2) + ' µg RNA';
     
    268268      Doc.element('rna.'+idSuffix).innerHTML = img+Strings.encodeTags(rna.external && lib.externalId ? lib.externalId : rna.name);
    269269      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);
    271271      Doc.element('remain.'+idSuffix).innerHTML = Numbers.formatNumber(rna.remainingQuantity, 2);
    272272      Doc.element('volume.'+idSuffix).innerHTML = Numbers.formatNumber(rna.volume, 1);
     
    335335      text += '<div class="box">'+Strings.encodeTags(Protocol.getPlateCoordinate(rna, true))+'</div>';
    336336      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>';
    338338
    339339      if (rna.volume >= 0 && rna.water >= 0)
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/external_protocol2.jsp

    r5891 r6218  
    162162    text-align: center;
    163163  }
    164   #listview .ndconc
     164  #listview .conc
    165165  {
    166166    width: 4.5em;
     
    223223    margin-bottom: 0.25em;
    224224  }
    225   #plateview .ndconc
     225  #plateview .conc
    226226  {
    227227    display: none;
     
    333333        <th class="rna"></th>
    334334        <th class="box">Storage</th>
    335         <th>NDConc</th>
     335        <th>Conc.</th>
    336336        <th>Remain</th>
    337337        <th class="workplate">Work</th>
     
    375375          <td class="rna if-yellow" id="rna.<%=idSuffix%>">empty</td>
    376376          <td class="box" id="box.<%=idSuffix%>"></td>
    377           <td class="ndconc" id="ndconc.<%=idSuffix%>"></td>
     377          <td class="conc" id="conc.<%=idSuffix%>"></td>
    378378          <td class="remain" id="remain.<%=idSuffix%>"></td>
    379379          <td class="workplate"><%=rowF.format(r)+colF.format(c)%></td>
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/mrna_protocol.js

    r5740 r6218  
    170170    if (stratageneConc > 0)
    171171    {
    172       if (rna.stratagene && !rna.NDConc) rna.NDConc = stratageneConc;
     172      if (rna.stratagene && !rna.conc) rna.conc = stratageneConc;
    173173    }
    174174   
    175175    // Calculate volume to use and water to add based on concentration
    176176    var remarks = [];
    177     if (rna.NDConc && rna.usedQuantity)
    178     {
    179       rna.volume = Math.ceil(10000*rna.usedQuantity/rna.NDConc) / 10; // µl
     177    if (rna.conc && rna.usedQuantity)
     178    {
     179      rna.volume = Math.ceil(10000*rna.usedQuantity/rna.conc) / 10; // µl
    180180     
    181181      var totalVolume = mrna.DilutionConc ? 1000 * rna.usedQuantity / mrna.DilutionConc : mrna.DilutionVolume;
     
    211211        remarks[remarks.length] = 'Low quantity';
    212212      }
    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)
    221221      {
    222222        remarks[remarks.length] = 'Use ' + Numbers.formatNumber(rna.usedQuantity, 2) + ' µg RNA';
     
    262262      Doc.element('rna.'+idSuffix).innerHTML = img+Strings.encodeTags(rna.external && mrna.externalId ? mrna.externalId : rna.name);
    263263      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);
    265265      Doc.element('remain.'+idSuffix).innerHTML = Numbers.formatNumber(rna.remainingQuantity, 2);
    266266      Doc.element('volume.'+idSuffix).innerHTML = Numbers.formatNumber(rna.volume, 1);
     
    329329      text += '<div class="box">'+Strings.encodeTags(Protocol.getPlateCoordinate(rna, true))+'</div>';
    330330      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>';
    332332
    333333      if (rna.volume >= 0 && rna.water >= 0)
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/mrna_protocol2.jsp

    r3976 r6218  
    163163    text-align: center;
    164164  }
    165   #listview .ndconc
     165  #listview .conc
    166166  {
    167167    width: 4.5em;
     
    224224    margin-bottom: 0.25em;
    225225  }
    226   #plateview .ndconc
     226  #plateview .conc
    227227  {
    228228    display: none;
     
    355355        <th class="rna"></th>
    356356        <th class="box">Storage</th>
    357         <th>NDConc</th>
     357        <th>Conc.</th>
    358358        <th>Remain</th>
    359359        <th class="workplate">Work</th>
     
    397397          <td class="rna if-yellow" id="rna.<%=idSuffix%>">empty</td>
    398398          <td class="box" id="box.<%=idSuffix%>"></td>
    399           <td class="ndconc" id="ndconc.<%=idSuffix%>"></td>
     399          <td class="conc" id="conc.<%=idSuffix%>"></td>
    400400          <td class="remain" id="remain.<%=idSuffix%>"></td>
    401401          <td class="workplate"><%=rowF.format(r)+colF.format(c)%></td>
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/select_rna.js

    r5891 r6218  
    5858    Events.addEventHandler('quantity', 'click', selectrna.toggleInfo);
    5959    Events.addEventHandler('quality-score', 'click', selectrna.toggleInfo);
    60     Events.addEventHandler('ndconc', 'click', selectrna.toggleInfo);
     60    Events.addEventHandler('conc', 'click', selectrna.toggleInfo);
    6161    Events.addEventHandler('volumes', 'click', selectrna.toggleInfo);
    6262    Events.addEventHandler('qiacube-date', 'click', selectrna.toggleInfo);
     
    14931493        rna.dilutionConc = 1000 * rna.usedQuantity / TOTAL_VOLUME; // ng/µl
    14941494
    1495         var volRNA = Math.ceil(10000*rna.usedQuantity/info.NDConc) / 10; // µl, rounded to 1 decimal
     1495        var volRNA = Math.ceil(10000*rna.usedQuantity/info.conc) / 10; // µl, rounded to 1 decimal
    14961496        var water = TOTAL_VOLUME - volRNA;
    14971497       
     
    15001500          // Large mix since we do not want to take less than 1µl
    15011501          volRNA = MINIMAL_RNA_VOLUME;
    1502           rna.usedQuantity = volRNA * info.NDConc / 1000; // µg
     1502          rna.usedQuantity = volRNA * info.conc / 1000; // µg
    15031503          var totalVolume = 1000 * rna.usedQuantity / rna.dilutionConc; // µl
    15041504          water = totalVolume - volRNA;
     
    15081508        {
    15091509          volRNA = TOTAL_VOLUME;
    1510           rna.usedQuantity = volRNA * info.NDConc / 1000; // µg
    1511           rna.dilutionConc = info.NDConc;
     1510          rna.usedQuantity = volRNA * info.conc / 1000; // µg
     1511          rna.dilutionConc = info.conc;
    15121512          water = 0;
    15131513        }
     
    15461546          warningMsg[warningMsg.length] = 'No RQS/RIN value';
    15471547        }
    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>';
    15511551          text += '<div class="volumes"><span class="volume">'+Numbers.formatNumber(volRNA, 1)+'</span> + <span class="water">'+Numbers.formatNumber(water, 1)+'µl</span></div>';
    15521552        }
    15531553        else
    15541554        {
    1555           if (!rna.external) warningMsg[warningMsg.length] = 'No NDConc value';
     1555          if (!rna.external) warningMsg[warningMsg.length] = 'No concentration';
    15561556        }
    15571557        if (info.QiacubeDate)
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/select_rna.jsp

    r5882 r6218  
    102102  display: none;
    103103}
    104 .plate.hide-ndconc .ndconc
     104.plate.hide-conc .conc
    105105{
    106106  display: none;
     
    418418            <td>
    419419              <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>
    421421            </td>
    422422            <td>
     
    511511        </div>
    512512
    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"
    514514          style="margin: 1em auto 0 auto;">
    515515        <%
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/ReggieItem.java

    r6193 r6218  
    152152 
    153153  /**
     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  /**
    154173    Load annotations for the given annotation type and store the values in
    155174    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  
    342342          r.loadDoNotUseAnnotations(dc, manager);
    343343          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");
    344346          r.loadAnnotations(dc, manager, "DilutionDate", Annotationtype.DILUTION_DATE, Reggie.CONVERTER_DATE_TO_STRING);
    345347        }
     
    513515          r.loadDoNotUseAnnotations(dc, manager);
    514516          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");
    515519          r.loadAnnotations(dc, manager, "QiacubeDate", Annotationtype.QIACUBE_DATE, Reggie.CONVERTER_DATE_TO_STRING);
    516520        }
     
    566570        r.setAnnotation("remainingQuantity", e.getRemainingQuantity());
    567571        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");
    568574        r.loadDoNotUseAnnotations(dc, manager);
    569575       
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r6215 r6218  
    892892            Annotationtype.QIACUBE_POSITION, Annotationtype.QIACUBE_RUN_NO,
    893893            Annotationtype.ND_CONC, Annotationtype.ND_260_BY_280, Annotationtype.ND_260_BY_230,
     894            Annotationtype.QUBIT_CONC,
    894895            Annotationtype.ALLPREP_MINI_KIT, Annotationtype.ETOH70,
    895896            Annotationtype.BUFFER_RW1, Annotationtype.BUFFER_RPE,
     
    915916            Annotationtype.QIACUBE_POSITION, Annotationtype.QIACUBE_RUN_NO,
    916917            Annotationtype.ND_CONC, Annotationtype.ND_260_BY_280, Annotationtype.ND_260_BY_230,
     918            Annotationtype.QUBIT_CONC,
    917919            Annotationtype.ALLPREP_MINI_KIT, Annotationtype.ETOH70,
    918920            Annotationtype.BUFFER_RW1, Annotationtype.BUFFER_RPE,
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/LibPrepServlet.java

    r5900 r6218  
    317317            }
    318318            rna.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null);
     319            rna.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null);
     320            rna.coalesceInto("conc", "NDConc", "QubitConc");
    319321           
    320322            Float used = lib.getItem().getCreationEvent().getUsedQuantity(rna.getItem());
     
    587589          row.getCell(5).setCellValue(well.getCoordinate());  // Plate position
    588590
    589           // NanoDrop measurements
     591          // NanoDrop/Qubit measurements
    590592          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
    592595          Float nd260by280 = (Float)Annotationtype.ND_260_BY_280.getAnnotationValue(dc, rna.getItem());
    593596          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  
    210210
    211211          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
    213215          Float used = r.getItem().getCreationEvent().getUsedQuantity(rna.getItem());
    214216          Float remain = rna.getItem().getRemainingQuantity();
     
    361363          r.loadDoNotUseAnnotations(dc, manager);
    362364          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");
    363367          r.loadAnnotations(dc, manager, "AutoProcessing", Annotationtype.AUTO_PROCESSING, null);
    364368          r.loadYellowLabelInfo(dc, manager);
Note: See TracChangeset for help on using the changeset viewer.