Changeset 6220


Ignore:
Timestamp:
Apr 20, 2021, 3:10:40 PM (2 years ago)
Author:
Nicklas Nordborg
Message:

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

Fixed in case summary, the outtake wizards and release exporter.

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/outtake/define.js

    r4994 r6220  
    6666    Doc.element('listSize').innerHTML = '';
    6767    Doc.element('listRemainingQuantity').innerHTML = '';
    68     Doc.element('listNdConc').innerHTML = '';
     68    Doc.element('listConc').innerHTML = '';
    6969
    7070    var list = event.detail;
     
    8585    Wizard.setInputStatus('sourceList');
    8686    Wizard.setInputStatus('listRemainingQuantity');
    87     Wizard.setInputStatus('listNdConc');
     87    Wizard.setInputStatus('listConc');
    8888    Wizard.setInputStatus('targetAmount');
    8989    Wizard.setInputStatus('targetVolume');
     
    118118      }
    119119    }
    120     var ndConc = sourceList.ndConc;
    121     if (ndConc)
    122     {
    123       Doc.element('listNdConc').innerHTML =
    124         Reggie.formatNumber(ndConc.min, ' ng/µl (min), ', 2) +
    125         Reggie.formatNumber(ndConc.max, ' ng/µl (max)', 2);
    126      
    127       if (ndConc.nulls > 0)
     120    var conc = sourceList.conc;
     121    if (conc)
     122    {
     123      Doc.element('listConc').innerHTML =
     124        Reggie.formatNumber(conc.min, ' ng/µl (min), ', 2) +
     125        Reggie.formatNumber(conc.max, ' ng/µl (max)', 2);
     126     
     127      if (conc.nulls > 0)
    128128      {
    129         Wizard.setInputStatus('listNdConc', 'warning', ndConc.nulls + ' items have unknown concentration');
     129        Wizard.setInputStatus('listConc', 'warning', conc.nulls + ' items have unknown concentration');
    130130      }
    131131    }
     
    249249      }
    250250     
    251       if (sourceList.ndConc && sourceList.ndConc.min < targetConc)
     251      if (sourceList.conc && sourceList.conc.min < targetConc)
    252252      {
    253         Wizard.setInputStatus('targetVolume', 'warning', 'Some items in the list has too low concentration: '+ Reggie.formatNumber(sourceList.ndConc.min, ' ng/µl', 2));
     253        Wizard.setInputStatus('targetVolume', 'warning', 'Some items in the list has too low concentration: '+ Reggie.formatNumber(sourceList.conc.min, ' ng/µl', 2));
    254254      }
    255255    }
  • extensions/net.sf.basedb.reggie/trunk/resources/outtake/define.jsp

    r4153 r6220  
    101101      <tr>
    102102        <td class="prompt">Concentration</td>
    103         <td class="info" id="listNdConc"></td>
    104         <td class="status" id="listNdConc.status"></td>
    105         <td class="help"><span id="listNdConc.message" class="message"></span></td>
     103        <td class="info" id="listConc"></td>
     104        <td class="status" id="listConc.status"></td>
     105        <td class="help"><span id="listConc.message" class="message"></span></td>
    106106      </tr>
    107107      </tbody>
  • extensions/net.sf.basedb.reggie/trunk/resources/outtake/picklist.js

    r5310 r6220  
    116116      var p = a.parent;
    117117     
    118       var storageBox = p.bioWell.bioPlate;
     118      var storageBox = p.bioWell ? p.bioWell.bioPlate : { 'name': 'Unknown box', 'id': 0 };
    119119      var aliquotBox = a.bioWell.bioPlate;
    120120      var markNewBox = false;
     
    181181        {
    182182          // Happens when source concentration is lower that target concentration
    183           remarks[remarks.length] = 'Conc: ' + Reggie.formatNumber(p.NdConc, ' ng/µl', 2);
     183          remarks[remarks.length] = 'Conc: ' + Reggie.formatNumber(p.conc, ' ng/µl', 2);
    184184          dilution.water = null;
    185185        }
  • extensions/net.sf.basedb.reggie/trunk/resources/reports/case-summary.js

    r6154 r6220  
    386386          cs.addColumn('rna.remainingQuantity', cs.asQuantity(r.remainingQuantity, ' µg'));
    387387          cs.addColumn('rna.originalQuantity', cs.asQuantity(r.originalQuantity, ' µg'));
    388           cs.addColumn('rna.ndConc', cs.asQuantity(r.ndConc, ' ng/µl'));
     388          cs.addColumn('rna.conc', cs.asQuantity(r.conc, ' ng/µl'));
    389389          cs.addColumn('rna.comment', cs.truncate(r.comment, truncateAt));
    390390         
     
    430430          cs.addColumn('dna.remainingQuantity', cs.asQuantity(d.remainingQuantity, ' µg'));
    431431          cs.addColumn('dna.originalQuantity', cs.asQuantity(d.originalQuantity, ' µg'));
    432           cs.addColumn('dna.ndConc', cs.asQuantity(d.ndConc, ' ng/µl'));
     432          cs.addColumn('dna.conc', cs.asQuantity(d.conc, ' ng/µl'));
    433433          cs.addColumn('dna.comment', cs.truncate(d.comment, truncateAt));
    434434        }
  • extensions/net.sf.basedb.reggie/trunk/resources/reports/case_summary.jsp

    r6154 r6220  
    557557              <th>Original quantity</th>
    558558            </tr>
    559             <tr id="rna.ndConc">
    560               <th>ND Conc.</th>
     559            <tr id="rna.conc">
     560              <th>Conc.</th>
    561561            </tr>
    562562            <tr id="rna.comment" class="comment dynamic-column">
     
    619619              <th>Original quantity</th>
    620620            </tr>
    621             <tr id="dna.ndConc">
    622               <th>ND Conc.</th>
     621            <tr id="dna.conc">
     622              <th>Conc.</th>
    623623            </tr>
    624624            <tr id="dna.comment" class="comment dynamic-column">
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/release/DnaWriter.java

    r5320 r6220  
    6969      jsonAnnotations.add(item.createAnnotationJSON("DNAOriginalQuantity", dna.getOriginalQuantity()));
    7070      jsonAnnotations.add(item.createAnnotationJSON("DNARemainingQuantity", dna.getRemainingQuantity()));
     71      jsonAnnotations.add(item.getAnnotationJSON(Annotationtype.QUBIT_CONC, dna, null));
    7172      jsonAnnotations.add(item.getAnnotationJSON(Annotationtype.ND_CONC, dna, null));
    7273      jsonAnnotations.add(item.getAnnotationJSON(Annotationtype.ND_260_BY_230, dna, null));
     
    9293    dnaFactory.createAnnotationType("DNAOriginalQuantity", Type.FLOAT).setUnit(µg);
    9394    dnaFactory.createAnnotationType("DNARemainingQuantity", Type.FLOAT).setUnit(µg).setProjectSpecificValues(true);
     95    dnaFactory.createAnnotationType(Annotationtype.QUBIT_CONC).setUnit(UnitUtil.getUnit(dc, Quantity.DENSITY, "ng/µl"));
    9496    dnaFactory.createAnnotationType(Annotationtype.ND_CONC).setUnit(UnitUtil.getUnit(dc, Quantity.DENSITY, "ng/µl"));
    9597    dnaFactory.createAnnotationType(Annotationtype.ND_260_BY_230);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/release/RnaWriter.java

    r5320 r6220  
    7474      jsonAnnotations.add(item.createAnnotationJSON("RNARemainingQuantity", rna.getRemainingQuantity()));
    7575
     76      jsonAnnotations.add(item.getAnnotationJSON(Annotationtype.QUBIT_CONC, rna, null));
    7677      jsonAnnotations.add(item.getAnnotationJSON(Annotationtype.ND_CONC, rna, null));
    7778      jsonAnnotations.add(item.getAnnotationJSON(Annotationtype.ND_260_BY_230, rna, null));
     
    101102    rnaFactory.createAnnotationType("RNAOriginalQuantity", Type.FLOAT).setUnit(µg);
    102103    rnaFactory.createAnnotationType("RNARemainingQuantity", Type.FLOAT).setUnit(µg).setProjectSpecificValues(true);
     104    rnaFactory.createAnnotationType(Annotationtype.QUBIT_CONC).setUnit(UnitUtil.getUnit(dc, Quantity.DENSITY, "ng/µl"));
    103105    rnaFactory.createAnnotationType(Annotationtype.ND_CONC).setUnit(UnitUtil.getUnit(dc, Quantity.DENSITY, "ng/µl"));
    104106    rnaFactory.createAnnotationType(Annotationtype.ND_260_BY_230);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/CaseSummaryServlet.java

    r6154 r6220  
    892892    rna.setAnnotation("comment", e.getDescription());
    893893    rna.loadAnnotations(dc, "ndConc", Annotationtype.ND_CONC, null);
     894    rna.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null);
     895    rna.coalesceInto("conc", "ndConc", "QubitConc");
    894896   
    895897    List<RnaQc> rnaqc = RnaQc.findByRna(dc, rna);
     
    943945    dna.setAnnotation("comment", e.getDescription());
    944946    dna.loadAnnotations(dc, "ndConc", Annotationtype.ND_CONC, null);
     947    dna.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null);
     948    dna.coalesceInto("conc", "ndConc", "QubitConc");
    945949  }
    946950
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/OuttakeServlet.java

    r6183 r6220  
    110110         
    111111          MinMax remainingQuantity = new MinMax();
    112           MinMax ndConc = new MinMax();
     112          MinMax conc = new MinMax();
    113113                   
    114114          Iterator<Extract> it = memberQuery.iterate(dc);
     
    117117            Extract e = it.next();
    118118            remainingQuantity.add(e.getRemainingQuantity());
    119             ndConc.add((Float)Annotationtype.ND_CONC.getAnnotationValue(dc, e));
     119            Float c = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, e);
     120            if (c == null) c = (Float)Annotationtype.QUBIT_CONC.getAnnotationValue(dc, e);
     121            conc.add(c);
    120122           
    121123            ItemSubtype subtype = e.getItemSubtype();
     
    129131         
    130132          jsonList.put("remainingQuantity", remainingQuantity.asJSONObject());
    131           jsonList.put("ndConc", ndConc.asJSONObject());
     133          jsonList.put("conc", conc.asJSONObject());
    132134          jsonList.put("numDoNotUse", numDoNotUse);
    133135        }
     
    293295
    294296          Float remain = parent.getRemainingQuantity();
    295           Float ndConc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, parent);
    296          
    297           if (remain != null && ndConc != null)
    298           {
    299             Dilution d = new Dilution(targetAmount, targetVolume, ndConc, remain);
     297          Float conc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, parent);
     298          if (conc == null) conc = (Float)Annotationtype.QUBIT_CONC.getAnnotationValue(dc, parent);
     299         
     300          if (remain != null && conc != null)
     301          {
     302            Dilution d = new Dilution(targetAmount, targetVolume, conc, remain);
    300303            jsonA.put("dilution", d.asJSONObject());
    301304          }
     
    305308          jsonP.put("name", parent.getName());
    306309          jsonP.put("bioWell", JsonUtil.getBioWellAsJSON(parent.getBioWell(), true));
    307           jsonP.put("NdConc", ndConc);
     310          jsonP.put("conc", conc);
    308311          jsonP.put("remainingQuantity", remain);
    309312         
     
    579582         
    580583          Float remain = parent.getRemainingQuantity();
    581           Float ndConc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, parent);
    582          
    583           if (remain != null && ndConc != null)
     584          Float conc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, parent);
     585          if (conc == null) conc = (Float)Annotationtype.QUBIT_CONC.getAnnotationValue(dc, parent);
     586         
     587          if (remain != null && conc != null)
    584588          {
    585589            boolean isException = except.contains(aliquot.getId());
     
    588592            if (sampleConsumed != isException)
    589593            {
    590               Dilution d = new Dilution(targetAmount, targetVolume, ndConc, remain);
     594              Dilution d = new Dilution(targetAmount, targetVolume, conc, remain);
    591595              creationEvent.getEventSource(parent).setUsedQuantity(d.amount);
    592596              aliquot.setOriginalQuantity(d.amount);
Note: See TracChangeset for help on using the changeset viewer.