Changeset 3827


Ignore:
Timestamp:
Apr 5, 2016, 10:00:29 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

References #861: YellowLabel? tracking wizard

Added RQS/RIN column.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/reggie-2.js

    r3787 r3827  
    131131    var numDecimals;
    132132    if (!baseDecimals) baseDecimals = 3;
    133     if (number < 10)
     133    var tmp = Math.abs(number);
     134    if (tmp < 10)
    134135    {
    135136      numDecimals = baseDecimals;
    136137    }
    137     else if (number < 100)
     138    else if (tmp < 100)
    138139    {
    139140      numDecimals = baseDecimals-1;
  • extensions/net.sf.basedb.reggie/trunk/resources/yellowlabel/list.js

    r3826 r3827  
    2020    Events.addEventHandler('consentDateFilter', 'change', yellow.filterOnChange);
    2121    Events.addEventHandler('extractionDateFilter', 'change', yellow.filterOnChange);
     22    Events.addEventHandler('rnaqcFilter', 'change', yellow.filterOnChange);
    2223    Events.addEventHandler('libraryDateFilter', 'change', yellow.filterOnChange);
    2324    Events.addEventHandler('rawBioAssayDateFilter', 'change', yellow.filterOnChange);
     
    8687      var sp = specimen[spNo];
    8788      var rna = sp.rna;
     89      var rnaqc = sp.rnaqc;
    8890      var lib = sp.library;
    8991      var raw = sp.raw;
     
    123125      html += '<td class="dottedleft">'+(rna ? Reggie.reformatDate(rna.QiacubeDate):'')+'</td>';
    124126      html += '<td class="iconcol-2">'+yellow.asItemLink(rna, 'EXTRACT')+yellow.asFlag(rna)+'</td>';
     127      html += '<td>'+(rnaqc ? Reggie.formatNumber(rnaqc.RQS || rnaqc.RIN, '', 1) : '')+'</td>';
    125128      html += '<td class="dottedleft">'+(lib ? Reggie.reformatDate(lib.creationDate):'')+'</td>';
    126129      html += '<td class="iconcol-1">'+yellow.asItemLink(lib, 'EXTRACT')+'</td>';
     
    218221    filter.addDateCriteria(ItemProperty.ConsentDate, frm.consentDateFilter.value);
    219222    filter.addDateCriteria(ItemProperty.ExtractionDate, frm.extractionDateFilter.value);
     223    filter.addNumericCriteria(ItemProperty.RqsOrRin, frm.rnaqcFilter.value);
    220224    filter.addDateCriteria(ItemProperty.LibraryDate, frm.libraryDateFilter.value);
    221225    filter.addDateCriteria(ItemProperty.RawDate, frm.rawBioAssayDateFilter.value);
     
    557561  }
    558562 
     563  p.RqsOrRin = function(item)
     564  {
     565    return item.rnaqc ? (item.rnaqc.RQS || item.rnaqc.RIN) : null;
     566  }
     567 
    559568  p.LibraryDate = function(item)
    560569  {
  • extensions/net.sf.basedb.reggie/trunk/resources/yellowlabel/list.jsp

    r3826 r3827  
    150150          <th class="index"></th>
    151151          <th class="dottedleft" colspan="6">Specimen</th>
    152           <th class="dottedleft" colspan="2">RNA</th>
     152          <th class="dottedleft" colspan="3">RNA</th>
    153153          <th class="dottedleft" colspan="2">Library</th>
    154154          <th class="dottedleft" colspan="2">Raw bioassay</th>
     
    165165          <th>Consent date</th>
    166166          <th class="dottedleft" colspan="2">Extraction date</th>
     167          <th>RQS/RIN</th>
    167168          <th class="dottedleft" colspan="2">Created date</th>
    168169          <th class="dottedleft" colspan="2">Created date</th>
     
    183184          <th><input type="text" name="consentDateFilter" id="consentDateFilter"></th>
    184185          <th class="dottedleft" colspan="2"><input type="text" name="extractionDateFilter" id="extractionDateFilter"></th>
     186          <th><input type="text" name="rnaqcFilter" id="rnaqcFilter"></th>
    185187          <th class="dottedleft" colspan="2"><input type="text" name="libraryDateFilter" id="libraryDateFilter"></th>
    186188          <th class="dottedleft" colspan="2"><input type="text" name="rawBioAssayDateFilter" id="rawBioAssayDateFilter"></th>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/YellowLabelServlet.java

    r3826 r3827  
    4646import net.sf.basedb.reggie.dao.ReggieRole;
    4747import net.sf.basedb.reggie.dao.Rna;
     48import net.sf.basedb.reggie.dao.RnaQc;
    4849import net.sf.basedb.reggie.dao.SpecimenTube;
    4950import net.sf.basedb.reggie.dao.Subtype;
     
    126127            rna.loadAnnotations(dc, manager, "Flag", Annotationtype.FLAG, null);
    127128            sp.setAnnotation("rna", rna.asJSONObject());
     129           
     130            RnaQc rnaQc = rna.findLastRnaQc(dc, manager);
     131            if (rnaQc != null)
     132            {
     133              rnaQc.loadAnnotations(dc, manager, "RIN", Annotationtype.BA_RIN, null);
     134              rnaQc.loadAnnotations(dc, manager, "RQS", Annotationtype.CA_RQS, null);
     135              sp.setAnnotation("rnaqc", rnaQc.asJSONObject());
     136            }
    128137           
    129138            // Use the RNA name here so we don't get a Library from a different RNA
Note: See TracChangeset for help on using the changeset viewer.