Changeset 3545


Ignore:
Timestamp:
Oct 16, 2015, 9:55:36 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #818: Track volumes of RNAQC aliquots

Changes the default RNA volume in the 'DNA/RNA/FlowThrough registration' wizard to 53 (was 51).

The 'Create aliquots on Bioanalyzer/Caliper? plates' has been updated with input fields for the aliquot volumes. The default values are 2µl for normal, and 6µl for HiSense.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/sampleproc/extraction_registration.js

    r3473 r3545  
    3636  var DEFAULT_LYSATE_USED = 350;
    3737  var DEFAULT_DNA_VOLUME = 95;
    38   var DEFAULT_RNA_VOLUME = 51;
     38  var DEFAULT_RNA_VOLUME = 53;
    3939  var DEFAULT_FT_VOLUME = 550;
    4040  var MINIMAL_PRE_NORMALIZE_QUANTITY = 0; // µg, =0 since we no longer handle NotEnoughQuantity in this wizard
  • extensions/net.sf.basedb.reggie/trunk/resources/sampleproc/rnaqc_aliquot.js

    r3544 r3545  
    44 
    55  var HISENSE_LIMIT = 35.0;
     6  var ALIQUOT_VOLUME_NORMAL = 2.0;
     7  var ALIQUOT_VOLUME_HISENSE = 6.0;
    68 
    79  var selectedRna;
     
    349351    html += '<th colspan="2" class="dottedleft">' + Strings.encodeTags(selectedBioPlate.name) + '</th>';
    350352    html += '<th class="dottedleft">HiSense</th>';
     353    html += '<th>Volume</th>';
    351354    html += '<th>NDConc</th>';
    352355    html += '<th></th>';
     
    359362    html += '<th>Column</th>';
    360363    html += '<th class="dottedleft">NDConc ‹ ' + HISENSE_LIMIT + '</th>';
     364    html += '<th>(µl)</th>';
    361365    html += '<th>(ng/µl)</th>';
    362366    html += '<th></th>';
     
    370374      var rna = selectedRna[i];
    371375      rna.isValid = false;
     376      rna.isValidVolume = true;
    372377     
    373378      var hiSenseChecked = '';
    374379      var ndConc = null;
     380      var volume = ALIQUOT_VOLUME_NORMAL;
    375381      if (rna.NDConc)
    376382      {
     
    379385        {
    380386          hiSenseChecked = 'checked';
     387          volume = ALIQUOT_VOLUME_HISENSE;
    381388        }
    382389      }
     
    388395      html += '<td><input name="column.'+i+'" id="column.'+i+'" type="text" class="required" style="width: 3em;" maxlength="3"></td>';
    389396      html += '<td class="dottedleft"><input name="hiSense.'+i+'" id="hiSense.'+i+'" type="checkbox" value="1" ' + hiSenseChecked + '></td>';
    390       html += '<td class="ndconc">'
     397      html += '<td>';
     398      html += '<input name="volume.'+i+'" id="volume.'+i+'" type="text" class="required" style="width: 3em;" maxlength="3" value="'+volume+'">';
     399      html += '</td>';
     400      html += '<td class="ndconc">';
    391401      if (ndConc) html += Reggie.formatNumber(ndConc);
    392402      html += '</td>';
     
    411421    {
    412422      Events.addEventHandler('row.'+i, 'keypress', Wizard.focusOnEnter, { 'next-focus': 'column.'+i });
    413       Events.addEventHandler('column.'+i, 'keypress', Wizard.focusOnEnter, { 'next-focus': 'row.'+(i+1) });
     423      Events.addEventHandler('column.'+i, 'keypress', Wizard.focusOnEnter, { 'next-focus': 'volume.'+i });
     424      Events.addEventHandler('volume.'+i, 'keypress', Wizard.focusOnEnter, { 'next-focus': 'row.'+(i+1) });
     425      Events.addEventHandler('volume.'+i, 'keypress', Numbers.numberOnly);
    414426
    415427      Events.addEventHandler('row.'+i, 'focus', rnaqc.wellOnFocus);
    416428      Events.addEventHandler('row.'+i, 'change', rnaqc.wellOnChange, { 'index': i });
    417429      Events.addEventHandler('column.'+i, 'change', rnaqc.wellOnChange, { 'index': i });
     430      Events.addEventHandler('volume.'+i, 'change', rnaqc.wellOnChange, { 'index': i });
     431      Events.addEventHandler('hiSense.'+i, 'click', rnaqc.hiSenseOnClick, { 'index': i });
    418432     
    419433      rnaqc.suggestWell(i);
     
    495509    var row = frm['row.'+index].value;
    496510    var column = frm['column.'+index].value;
     511    var volume = frm['volume.'+index].value;
    497512   
    498513    selectedRna[index].isValid = false;
     514    selectedRna[index].isValidVolume = false;
    499515   
    500516    if (row == '' || column == '')
     
    503519      return;
    504520    }
     521   
     522    if (volume == '')
     523    {
     524      Wizard.setInputStatus('well.'+index, 'invalid', 'Missing volume');
     525      return;
     526    }
     527    else if (parseFloat(volume) <= 0 || isNaN(parseFloat(volume)))
     528    {
     529      Wizard.setInputStatus('well.'+index, 'invalid', 'Volume must be &gt; 0');
     530      return;
     531    }
     532    selectedRna[index].isValidVolume = true;
    505533   
    506534    var rowC = Reggie.alphaToWell(row);
     
    535563    rnaqc.duplicateWellCheck();
    536564  }
    537 
    538565
    539566  //  Get a well from a plate given a coordinate.
     
    586613  }
    587614 
     615  rnaqc.hiSenseOnClick = function(event)
     616  {
     617    var frm = document.forms['reggie'];
     618    var index = Data.int(event.currentTarget, 'index');
     619    var hiSenseChecked = event.currentTarget.checked;
     620   
     621    var volume = parseFloat(frm['volume.'+index].value);
     622    // Switch default volume when HiSense is toggled (unless the volume has been modified)
     623    if (volume == (hiSenseChecked ? ALIQUOT_VOLUME_NORMAL : ALIQUOT_VOLUME_HISENSE))
     624    {
     625      frm['volume.'+index].value = hiSenseChecked ? ALIQUOT_VOLUME_HISENSE : ALIQUOT_VOLUME_NORMAL;
     626      Events.sendChangeEvent(frm['volume.'+index]);
     627    }
     628   
     629  }
    588630 
    589631  rnaqc.printVersion = function()
     
    607649      if (!rna.isValid || rna.isDuplicate)
    608650      {
    609         frm['row.'+i].focus();
    610651        event.preventDefault();
     652        // Focus on the 'row' or 'volume' field
     653        frm[(rna.isValidVolume ? 'row.' : 'volume.')+i].focus();
    611654        return;
    612655      }
     
    633676      rnaQc.column = frm['column.'+i].value;
    634677      rnaQc.QCHiSense = frm['hiSense.'+i].checked ? true : false;
     678      rnaQc.volume = parseFloat(frm['volume.'+i].value);
    635679      rnaQcExtracts[rnaQcExtracts.length] = rnaQc;
    636680    }
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/RnaQcServlet.java

    r3059 r3545  
    364364         
    365365          Boolean hiSense = (Boolean)jsonRnaQc.get("QCHiSense");
     366          Number volume = (Number)jsonRnaQc.get("volume");
    366367         
    367368          // Create a child RNAQC extract
     
    370371          rnaQc.setName((String)jsonRnaQc.get("name"));
    371372          BioMaterialEventSource evtSrc = rnaQc.getCreationEvent().setSource(parentRna);
    372           // TODO - used quantity from parent
    373           //evtSrc.setUsedQuantity(...);
     373          if (volume != null)
     374          {
     375            Float ndConc = (Float)Annotationtype.ND_CONC.getAnnotationValue(dc, parentRna);
     376            if (ndConc != null)
     377            {
     378              float usedQuantity = volume.floatValue() * ndConc / 1000;
     379              evtSrc.setUsedQuantity(usedQuantity);
     380            }
     381          }
    374382         
    375383          if (Boolean.TRUE.equals(hiSense))
    376384          {
    377             rnaQc.getAnnotationSet().getAnnotation(qcHiSenseType).setValue(hiSense);
     385            Annotationtype.QC_HISENSE.setAnnotationValue(dc, rnaQc, hiSense);
    378386          }
    379387         
Note: See TracChangeset for help on using the changeset viewer.