Changeset 4976


Ignore:
Timestamp:
Sep 24, 2018, 8:37:21 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #1054: Even more functionality in the Flagged alignment wizard

Added an indicator for re-processing that is enabled if there is no other alignment for the same specimen. Alignments from the same RNA (if a Qiacube filter is active) or library (if HET filter or libplate filter is active) are not counted as a separate alignment.

When the High HET filter is active there is also an indicator for DoNotUse that is active if there is another alignement without an "error" condition.

Location:
extensions/net.sf.basedb.reggie/trunk/resources/flaggedalignment
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/flaggedalignment/search.js

    r4975 r4976  
    442442      html += '<th class="mode-reprocess num-col">RNA<br>(µg)</th>';
    443443      html += '<th class="mode-reprocess" id="reprocess-header">Re-process</th>';
     444      // Note! Two "mode-resolve" columns here to get the same order for grouping
     445      html += '<th class="mode-resolve dottedleft">Ok / Do not use?</th>';
     446      html += '<th class="mode-resolve comment-col">Comment</th>';
     447
    444448      html += '<th class="mode-reprocess comment-col">Comment</th>';
    445449      html += '<th class="mode-reprocess flag-col dottedright">Flag</th>';
    446      
    447       html += '<th class="mode-resolve dottedleft">Ok / Do not use?</th>';
    448       html += '<th class="mode-resolve comment-col">Comment</th>';
    449450    }
    450451    html += '<th></th>';
     
    467468      var lys = aligned.lysate;
    468469      var sp = aligned.specimen;
     470      var recommendReprocess = false;
     471      var recommendDoNotUse = false;
    469472     
    470473      var libPlate = lib ? lib.bioWell.bioPlate : null;
     
    481484      else
    482485      {
    483         html += '<tbody class="highlight" id="section.'+aligned.tmpId+'"><tr>';
     486        // Try to give a re-process recommendation based on the assumption that the
     487        // current alignment is incorrect. We look for other alignments from the same
     488        // patient and specimen but with either a different RNA or Library
     489        if (filter && aligned.flagged && !aligned.QC_GENOTYPE_VERIFIED && sp)
     490        {
     491          recommendReprocess = true;
     492          var otherAlignments = alignmentsByPat[sp.patientName];
     493          for (var otherNo = 0; otherNo < otherAlignments.length; otherNo++)
     494          {
     495            var otherA = otherAlignments[otherNo];       
     496            if (otherA.bugged && otherA.buglevel > 0) continue; // Ignore items that we "know" to be incorrect
     497           
     498            var sameLib = otherA.lib && otherA.lib.id == lib.id;
     499            var sameRNA = otherA.rna && otherA.rna.id == rna.id;
     500            var sameSp = otherA.specimen && otherA.specimen.id == sp.id;
     501            if (sameSp)
     502            {
     503              if (!sameRNA && qiacubefilter || !sameLib && (libplatefilter || highHetFilter))
     504              {
     505                recommendReprocess = false;
     506              }
     507              if (!sameLib && highHetFilter) recommendDoNotUse = true;
     508            }
     509          }
     510        }
     511       
     512        html += '<tbody class="highlight'+(recommendReprocess ? ' recommend-reprocess' : '')+(recommendDoNotUse ? ' recommend-donotuse' : '')+'" id="section.'+aligned.tmpId+'"><tr>';
    484513        html += '<td rowspan="'+tbodySpan+'">'+(sp ? HTMLHelper.colorMatch(sp.patientName, null, 'Click to highlight this patient') : '')+'</td>';
    485514        html += '<td rowspan="'+tbodySpan+'" class="'+(qiacubefilter?'':'mode-genotype')+'">'+(sp ? HTMLHelper.qiaCubeLink(rna.QIACUBE_DATE, rna.QIACUBE_RUN_NO, rna.QIACUBE_POSITION, qiacubefilter, false) : '')+'</td>';
     
    505534          html += '<td rowspan="'+tbodySpan+'" class="mode-reprocess num-col">'+(lys ? Math.round(lys.remainingQuantity) : '')+'</td>';
    506535          html += '<td rowspan="'+tbodySpan+'" class="mode-reprocess num-col">'+(sp ? Reggie.formatNumber(rna.remainingQuantity, null, 2, 2) : '')+'</td>';
    507           html += '<td rowspan="'+tbodySpan+'" class="mode-reprocess">'+(sp ? HTMLHelper.reprocessOptions(aligned) : '')+'</td>';
     536          html += '<td rowspan="'+tbodySpan+'" class="mode-reprocess">'+(sp ? HTMLHelper.reprocessOptions(aligned, recommendReprocess) : '')+'</td>';
    508537
    509538          html += '<td rowspan="'+tbodySpan+'" class="mode-resolve dottedleft">'+(sp ? HTMLHelper.resolveOptions(aligned, filterType) : '')+'</td>';
     
    703732       
    704733        var otherA = alignmentByName[msg.alignment];
    705         if (otherA.bugged && otherA.bugLevel > 0) continue; // The other alignment is a known problem, so we ignore it here
     734        if (otherA.bugged && otherA.buglevel > 0) continue; // The other alignment is a known problem, so we ignore it here
    706735       
    707736        // If the other alignment is in the same context it may not be useful unless it is a verified alignment
     
    14081437 
    14091438 
    1410   helper.reprocessOptions = function(aligned)
     1439  helper.reprocessOptions = function(aligned, recommendReprocess)
    14111440  {
    14121441    var id = 'reprocess.'+aligned.tmpId;
     1442    var title = '';
     1443   
    14131444    var currentReProcess = null;
    14141445    if (aligned.specimen.AutoProcessing == 'ReProcess')
     
    14261457   
    14271458    var html = '';
    1428     html += '<select id="'+id+'" name="'+id+'">';
     1459    html += '<select id="'+id+'" name="'+id+'" '+(recommendReprocess? 'title="Re-processing is recommended"':'')+'>';
    14291460    if (!currentReProcess) html += '<option value="" selected>&nbsp;';
    14301461    html += '<option '+(currentReProcess=='Specimen'?'value="" selected':'value="specimen"')+'>Specimen';
  • extensions/net.sf.basedb.reggie/trunk/resources/flaggedalignment/search.jsp

    r4974 r4976  
    189189}
    190190
    191 td.mode-reprocess, td.mode-resolve
    192 {
    193   background-color: #fffff0;
    194 }
    195 
    196 .mode-reprocess-header, .mode-resolve-header
    197 {
    198   background-color: #fffff0;
     191td.mode-reprocess
     192{
     193  background-color: #FFFFF0;
     194}
     195
     196.mode-reprocess-header
     197{
     198  background-color: #FFFFF0;
    199199  border-width: 1px;
    200200  font-size: 120%;
    201201}
    202202
     203.recommend-reprocess .mode-reprocess select
     204{
     205  border-right-width: 8px;
     206  border-right-color: #2288AA;
     207}
     208
     209td.mode-resolve
     210{
     211  background-color: #FFFFF0;
     212}
     213
     214.mode-resolve-header
     215{
     216  background-color: #FFFFF0;
     217  border-width: 1px;
     218  font-size: 120%;
     219}
     220
     221.recommend-donotuse .mode-resolve select
     222{
     223  border-right-width: 8px;
     224  border-right-color: #2288AA;
     225}
    203226</style>
    204227</base:head>
     
    243266          <label><input type="radio" name="mode" id="mode-genotype" checked value="genotype">Genotype analysis</label>
    244267          <label><input type="radio" name="mode" id="mode-reprocess" value="reprocess" disabled>Add comments and schedule re-processing</label>
    245           <label><input type="radio" name="mode" id="mode-resolve" value="resolve" disabled>Resolve problems</label>
     268          <label><input type="radio" name="mode" id="mode-resolve" value="resolve" disabled>Resolve as <b>DoNotUse</b> or <b>OkToUse</b></label>
    246269        </td>
    247270      </tr>
     
    258281  <tr>
    259282    <td><base:button id="gocancel" title="Cancel" /></td>
    260     <td><base:button id="goreprocess" title="Register" image="<%=home+"/images/gonext.png"%>" /></td>
    261     <td><base:button id="goresolve" title="Register" image="<%=home+"/images/gonext.png"%>" /></td>
     283    <td><base:button id="goreprocess" title="Register re-processing" image="<%=home+"/images/gonext.png"%>" /></td>
     284    <td><base:button id="goresolve" title="Register resolutions" image="<%=home+"/images/gonext.png"%>" /></td>
    262285    <td id="gonext-message" class="message"></td>
    263286  </tr>
Note: See TracChangeset for help on using the changeset viewer.