Changeset 6219


Ignore:
Timestamp:
Apr 20, 2021, 2:31:01 PM (13 months ago)
Author:
Nicklas Nordborg
Message:

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

It should now be fixed in the RNA/DNA pre-normalization wizards and the RNAQC wizards.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/css/normalize_extract.css

    r5361 r6219  
    9494}
    9595
    96 #extractTable .ndconc
     96#extractTable .conc
    9797{
    9898  width: 5em;
  • extensions/net.sf.basedb.reggie/trunk/resources/css/rnaqc_aliquot.css

    r3742 r6219  
    7777}
    7878
    79 #rnaQcTable .ndconc
     79#rnaQcTable .conc
    8080{
    8181  font-style: italic;
  • extensions/net.sf.basedb.reggie/trunk/resources/sampleproc/dna_normalization.js

    r5602 r6219  
    107107  normalize.sortByStorageLocation = function(a, b)
    108108  {
    109     if (a.bioWell.bioPlate.name == b.bioWell.bioPlate.name)
    110     {
    111       return a.bioWell.location < b.bioWell.location ? -1 : 1;
    112     }
    113     else
    114     {
    115       return a.bioWell.bioPlate.name < b.bioWell.bioPlate.name ? -1 : 1;
    116     }
    117  
     109    if (a.bioWell && b.bioWell)
     110    {
     111      if (a.bioWell.bioPlate.name == b.bioWell.bioPlate.name)
     112      {
     113        return a.bioWell.location < b.bioWell.location ? -1 : 1;
     114      }
     115      else
     116      {
     117        return a.bioWell.bioPlate.name < b.bioWell.bioPlate.name ? -1 : 1;
     118      }
     119    }
    118120    return a.id - b.id;
    119121  }
     
    310312    }
    311313    html += '<th>Storage</th>';
    312     html += '<th>NDConc</th>';
     314    html += '<th>Conc.</th>';
    313315    html += '<th>Remain</th>'; 
    314316    html += '<th colspan="2">Volumes</th>';
     
    358360        html += '<td class="qiacubepos">'+dna.QiacubePosition+'</td>';
    359361      }
    360       html += '<td class="box">'+Strings.encodeTags(dna.bioWell.bioPlate.name + ' ' + dna.bioWell.location)+'</td>';
    361       html += '<td class="ndconc">'+ Numbers.formatNumber(dna.NDConc, 1) + '</td>';
     362      html += '<td class="box">'+(dna.bioWell?Strings.encodeTags(dna.bioWell.bioPlate.name + ' ' + dna.bioWell.location):'unknown')+'</td>';
     363      html += '<td class="conc">'+ Numbers.formatNumber(dna.conc, 1) + '</td>';
    362364      html += '<td class="remain">'+ Numbers.formatNumber(dna.remainingQuantity, 2) + '</td>';
    363365      html += '<td class="volume" id="dnaVolume.'+dna.id+'"></td>';
     
    485487      // Aim for DNATargetAmount but not more than remiaingQuantity or less than DNAMinimalAmount
    486488      dna.usedQuantity = Math.max(Math.min(dna.remainingQuantity, protocol.DNATargetAmount), protocol.DNAMinimalAmount); // µg
    487       dna.volume = Math.ceil(10000*dna.usedQuantity/dna.NDConc) / 10;
     489      dna.volume = Math.ceil(10000*dna.usedQuantity/dna.conc) / 10;
    488490      dna.water = protocol.DNATargetVolume-dna.volume; // µl
    489491     
     
    493495        // Large mix since we do not want to take less than 1µl
    494496        dna.volume = MINIMAL_DNA_VOLUME;
    495         dna.usedQuantity = dna.volume * dna.NDConc / 1000; // µg
     497        dna.usedQuantity = dna.volume * dna.conc / 1000; // µg
    496498        var totalVolume = dna.usedQuantity / normalizedConc; // µl
    497499        dna.water = totalVolume - dna.volume;
     
    505507        dna.volume = protocol.DNATargetVolume;
    506508        dna.water = 0;
    507         dna.usedQuantity = dna.volume * dna.NDConc / 1000;
     509        dna.usedQuantity = dna.volume * dna.conc / 1000;
    508510      }
    509511     
     
    532534    html += '<td class="qiacubepos">'+qiacubePosition+'</td>';
    533535    html += '<td class="box"></td>';
    534     html += '<td class="ndconc"></td>';
     536    html += '<td class="conc"></td>';
    535537    html += '<td class="remain"></td>';
    536538    html += '<td class="volume"></td>';
     
    589591
    590592        normalizedDna.usedQuantity = dna.usedQuantity; // µg
    591         normalizedDna.NDConc = 1000 * dna.usedQuantity / (dna.volume+dna.water); // ng/µl
     593        normalizedDna.conc = 1000 * dna.usedQuantity / (dna.volume+dna.water); // ng/µl
     594        normalizedDna.ConcType = dna.NDConc ? 'ND_CONC' : 'QUBIT_CONC';
    592595       
    593596        normalizedDna.row = dna.well.row;
  • extensions/net.sf.basedb.reggie/trunk/resources/sampleproc/rna_normalization.js

    r5360 r6219  
    117117  normalize.sortByStorageLocation = function(a, b)
    118118  {
    119     if (a.bioWell.bioPlate.name == b.bioWell.bioPlate.name)
    120     {
    121       return a.bioWell.location < b.bioWell.location ? -1 : 1;
    122     }
    123     else
    124     {
    125       return a.bioWell.bioPlate.name < b.bioWell.bioPlate.name ? -1 : 1;
     119    if (a.bioWell && b.bioWell)
     120    {
     121      if (a.bioWell.bioPlate.name == b.bioWell.bioPlate.name)
     122      {
     123        return a.bioWell.location < b.bioWell.location ? -1 : 1;
     124      }
     125      else
     126      {
     127        return a.bioWell.bioPlate.name < b.bioWell.bioPlate.name ? -1 : 1;
     128      }
    126129    }
    127130 
     
    269272    }
    270273    html += '<th>Storage</th>';
    271     html += '<th>NDConc</th>';
     274    html += '<th>Conc.</th>';
    272275    html += '<th>Remain</th>'; 
    273276    html += '<th colspan="2">Volumes</th>';
     
    315318        html += '<td class="qiacubepos">'+rna.QiacubePosition+'</td>';
    316319      }
    317       html += '<td class="box">'+Strings.encodeTags(rna.bioWell.bioPlate.name + ' ' + rna.bioWell.location)+'</td>';
    318       html += '<td class="ndconc">'+ Numbers.formatNumber(rna.NDConc, 1) + '</td>';
     320      html += '<td class="box">'+(rna.bioWell ? Strings.encodeTags(rna.bioWell.bioPlate.name + ' ' + rna.bioWell.location):'unknown')+'</td>';
     321      html += '<td class="conc">'+ Numbers.formatNumber(rna.conc, 1) + '</td>';
    319322      html += '<td class="remain">'+ Numbers.formatNumber(rna.remainingQuantity, 2) + '</td>';
    320323      html += '<td class="volume" id="rnaVolume.'+rna.id+'"></td>';
     
    407410      // Aim for RNATargetAmount but not more than remiaingQuantity or less than RNAMinimalAmount
    408411      rna.usedQuantity = Math.max(Math.min(rna.remainingQuantity, protocol.RNATargetAmount), protocol.RNAMinimalAmount); // µg
    409       rna.volume = Math.ceil(10000*rna.usedQuantity/rna.NDConc) / 10;
     412      rna.volume = Math.ceil(10000*rna.usedQuantity/rna.conc) / 10;
    410413      rna.water = protocol.RNATargetVolume-rna.volume; // µl
    411414     
     
    415418        // Large mix since we do not want to take less than 1µl
    416419        rna.volume = MINIMAL_RNA_VOLUME;
    417         rna.usedQuantity = rna.volume * rna.NDConc / 1000; // µg
     420        rna.usedQuantity = rna.volume * rna.conc / 1000; // µg
    418421        var totalVolume = rna.usedQuantity / normalizedConc; // µl
    419422        rna.water = totalVolume - rna.volume;
     
    427430        rna.volume = protocol.RNATargetVolume;
    428431        rna.water = 0;
    429         rna.usedQuantity = rna.volume * rna.NDConc / 1000;
     432        rna.usedQuantity = rna.volume * rna.conc / 1000;
    430433      }
    431434     
     
    452455    html += '<td class="qiacubepos">'+qiacubePosition+'</td>';
    453456    html += '<td class="box"></td>';
    454     html += '<td class="ndconc"></td>';
     457    html += '<td class="conc"></td>';
    455458    html += '<td class="remain"></td>';
    456459    html += '<td class="volume"></td>';
     
    504507
    505508        normalizedRna.usedQuantity = rna.usedQuantity; // µg
    506         normalizedRna.NDConc = 1000 * rna.usedQuantity / (rna.volume+rna.water); // ng/µl
     509        normalizedRna.conc = 1000 * rna.usedQuantity / (rna.volume+rna.water); // ng/µl
     510        normalizedRna.ConcType = rna.NDConc ? 'ND_CONC' : 'QUBIT_CONC';
    507511       
    508512        rnaAliquots[rnaAliquots.length] = normalizedRna;
  • extensions/net.sf.basedb.reggie/trunk/resources/sampleproc/rnaqc_aliquot.js

    r4583 r6219  
    356356    html += '<th class="dottedleft">HiSense</th>';
    357357    html += '<th>Volume</th>';
    358     html += '<th>NDConc</th>';
     358    html += '<th>Conc.</th>';
    359359    html += '<th></th>';
    360360    html += '<th class="dottedleft"></th>';
     
    366366    html += '<th class="dottedleft">Row</th>';
    367367    html += '<th>Column</th>';
    368     html += '<th class="dottedleft">NDConc ‹ ' + HISENSE_LIMIT + '</th>';
     368    html += '<th class="dottedleft">Conc. ‹ ' + HISENSE_LIMIT + '</th>';
    369369    html += '<th>(µl)</th>';
    370370    html += '<th>(ng/µl)</th>';
     
    386386      var hiSenseChecked = '';
    387387      var hiSenseDisabled = isCaliper ? '' : ' disabled';
    388       var ndConc = null;
     388      var conc = null;
    389389      var volume = isCaliper ? ALIQUOT_VOLUME_NORMAL : ALIQUOT_VOLUME_BA;
    390       if (rna.NDConc)
    391       {
    392         ndConc = rna.NDConc;
    393         if (isCaliper && ndConc < HISENSE_LIMIT)
     390      if (rna.conc)
     391      {
     392        conc = rna.conc;
     393        if (isCaliper && conc < HISENSE_LIMIT)
    394394        {
    395395          hiSenseChecked = ' checked';
     
    401401      html += '<tr class="highlight'+(isYellow ? ' yellow-specimen' : '')+'">';
    402402      html += '<td class="rna if-yellow">'+img+Strings.encodeTags(rna.nextRnaQcName)+'</td>';
    403       html += '<td class="location dottedleft">'+Strings.encodeTags(rna.bioWell.bioPlate.name + ' ' + rna.bioWell.location)+'</td>';
     403      html += '<td class="location dottedleft">'+(rna.bioWell?Strings.encodeTags(rna.bioWell.bioPlate.name + ' ' + rna.bioWell.location):'unknown')+'</td>';
    404404      html += '<td class="dottedleft">';
    405405      html += '<input name="row.'+i+'" id="row.'+i+'" type="text" class="required" style="width: 3em; text-transform:uppercase;" maxlength="2"></td>';
     
    409409      html += '<input name="volume.'+i+'" id="volume.'+i+'" type="text" class="required" style="width: 3em;" maxlength="3" value="'+volume+'">';
    410410      html += '</td>';
    411       html += '<td class="ndconc">';
    412       if (ndConc) html += Reggie.formatNumber(ndConc);
     411      html += '<td class="conc">';
     412      if (conc) html += Reggie.formatNumber(conc);
    413413      html += '</td>';
    414414      html += '<td class="status" id="well.'+i+'.status"></td>';
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/ExtractionServlet.java

    r5791 r6219  
    423423          r.setAnnotation("nextAliquotName", r.getNextNormalizedAliquotName(dc));
    424424          r.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null);
     425          r.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null);
     426          r.coalesceInto("conc", "NDConc", "QubitConc");
    425427          r.loadAnnotations(dc, "QiacubeDate", Annotationtype.QIACUBE_DATE, Reggie.CONVERTER_DATE_TO_STRING);
    426428          r.loadAnnotations(dc, "QiacubeRunNo", Annotationtype.QIACUBE_RUN_NO, null);
     
    472474          d.setAnnotation("nextAliquotName", d.getNextNormalizedAliquotName(dc));
    473475          d.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null);
     476          d.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null);
     477          d.coalesceInto("conc", "NDConc", "QubitConc");
    474478          d.loadAnnotations(dc, "QiacubeDate", Annotationtype.QIACUBE_DATE, Reggie.CONVERTER_DATE_TO_STRING);
    475479          d.loadAnnotations(dc, "QiacubeRunNo", Annotationtype.QIACUBE_RUN_NO, null);
     
    911915            evtSrc.setUsedQuantity(usedQuantity.floatValue());
    912916           
    913             Number ndConc = (Number)jsonRnaAliquot.get("NDConc");
    914             Annotationtype.ND_CONC.setAnnotationValue(dc, normalizedRna, ndConc.floatValue());
     917            Number conc = (Number)jsonRnaAliquot.get("conc");
     918            Annotationtype concType = Annotationtype.getByCName((String)jsonRnaAliquot.get("ConcType"));
     919            concType.setAnnotationValue(dc, normalizedRna, conc.floatValue());
    915920           
    916921            numNormalized++;
     
    10131018            evtSrc.setUsedQuantity(usedQuantity.floatValue());
    10141019           
    1015             Number ndConc = (Number)jsonDnaAliquot.get("NDConc");
    1016             Annotationtype.ND_CONC.setAnnotationValue(dc, normalizedDna, ndConc.floatValue());
     1020            Number conc = (Number)jsonDnaAliquot.get("conc");
     1021            Annotationtype concType = Annotationtype.getByCName((String)jsonDnaAliquot.get("ConcType"));
     1022            concType.setAnnotationValue(dc, normalizedDna, conc.floatValue());
    10171023           
    10181024            Number row = (Number)jsonDnaAliquot.get("row");
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r6218 r6219  
    903903        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.RNA_NORMALIZED_ALIQUOT, createIfMissing,
    904904            Annotationtype.DILUTION_DATE, Annotationtype.DILUTION_OPERATOR,
    905             Annotationtype.ND_CONC,
     905            Annotationtype.ND_CONC, Annotationtype.QUBIT_CONC,
    906906            Annotationtype.AUTO_PROCESSING, Annotationtype.FLAG
    907907            ));
     
    928928        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.DNA_NORMALIZED_ALIQUOT, createIfMissing,
    929929            Annotationtype.DILUTION_DATE, Annotationtype.DILUTION_OPERATOR,
    930             Annotationtype.ND_CONC,
     930            Annotationtype.ND_CONC, Annotationtype.QUBIT_CONC,
    931931            Annotationtype.MIPS_PANEL, Annotationtype.MIPS_POOL_VOLUME,
    932932            Annotationtype.MIPS_NORMAL_TUMOR, Annotationtype.MIPS_FORM,
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/RnaQcServlet.java

    r5791 r6219  
    127127          r.setAnnotation("nextRnaQcName", r.getName()+"." + Subtype.RNAQC.getItemSuffix()); // Safe, since we know that the RNA has no RNAQC yet
    128128          r.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null);
     129          r.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null);
     130          r.coalesceInto("conc", "NDConc", "QubitConc");
    129131          if (sp != null)
    130132          {
     
    154156          rna.setAnnotation("nextRnaQcName", rna.getNextRnaQcName(dc));
    155157          rna.loadAnnotations(dc, "NDConc", Annotationtype.ND_CONC, null);
     158          rna.loadAnnotations(dc, "QubitConc", Annotationtype.QUBIT_CONC, null);
     159          rna.coalesceInto("conc", "NDConc", "QubitConc");
    156160          jsonRna.add(rna.asJSONObject());
    157161        }
     
    393397          if (volume != null)
    394398          {
    395             Float ndConc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, parentRna);
    396             if (ndConc != null)
     399            Float conc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, parentRna);
     400            if (conc == null) conc = (Float)Annotationtype.QUBIT_CONC.getAnnotationValue(dc, parentRna);
     401            if (conc != null)
    397402            {
    398               float usedQuantity = volume.floatValue() * ndConc / 1000;
     403              float usedQuantity = volume.floatValue() * conc / 1000;
    399404              evtSrc.setUsedQuantity(usedQuantity);
    400405            }
     
    510515            Extract rnaQc = Extract.getById(dc, rnaQcId.intValue());
    511516            Extract rna = (Extract)rnaQc.getParent();
    512             Float ndConc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, rna); // ng/µl
     517            Float conc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, rna); // ng/µl
     518            if (conc == null) conc = (Float)Annotationtype.QUBIT_CONC.getAnnotationValue(dc, rna);
    513519           
    514520            BioMaterialEvent extraEvent = rna.newEvent();
    515521            extraEvent.setEventDate(runDate);
    516             if (ndConc != null)
     522            if (conc != null)
    517523            {
    518               extraEvent.setUsedQuantity(ndConc * volume.floatValue() / 1000); // µg
     524              extraEvent.setUsedQuantity(conc * volume.floatValue() / 1000); // µg
    519525            }
    520526            extraEvent.setComment(volume + " µl extra aliquot for additional RNAQC" + (comment == null ? "" : ": " + comment));
Note: See TracChangeset for help on using the changeset viewer.