Changeset 5797


Ignore:
Timestamp:
Dec 18, 2019, 8:33:26 AM (2 years ago)
Author:
Nicklas Nordborg
Message:

References #1216: Finalize the "Confirm MIPs demux" wizard

Added some more columns: Plate, Barcode and MIPS_Panel. Also changed the sort order to sort by plate location.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/mipsanalysis/demux_confirm.js

    r5788 r5797  
    198198    var url = '../DemuxMerge.servlet?ID='+App.getSessionId();
    199199    url += '&cmd=GetMergedSequences&job='+job.id;
     200    url += '&pipeline=MIPS';
    200201   
    201202    Wizard.showLoadingAnimation('Loading demuxed sequences...');
     
    214215   
    215216    var mergedSeq = response.mergedSequences;
    216     mergedSeq.sort(demux.sortByPool);
     217    mergedSeq.sort(demux.sortByLibPlate);
    217218    job.mergedSequences = mergedSeq;
    218219     
     
    221222    // Header row
    222223    html += '<tr>';
     224    html += '<th></th>';
     225    html += '<th></th>';
     226    html += '<th></th>';
    223227    html += '<th></th>';
    224228    html += '<th class="dottedleft"></th>';
     
    228232    html += '</tr>';
    229233    html += '<tr>';
     234    html += '<th>Plate</th>';
    230235    html += '<th>Library</th>';
    231     html += '<th class="dottedleft">Pools</th>';
     236    html += '<th>MIPS_Panel</th>';
     237    html += '<th>Barcode</th>';
     238    html += '<th class="dottedleft">Pool</th>';
    232239    html += '<th class="dottedleft">READS</th>';
    233240    html += '<th>PF_READS</th>';
     
    267274        html += 'style="border-top: 1px solid #000000;"';
    268275      }
    269       html += '><td class="prompt if-yellow">'+img+Strings.encodeTags(merged.name)+'</td>';
     276      html += '><td>'+Strings.encodeTags(lib.bioWell.bioPlate.name+' '+lib.bioWell.location)+'</td>';
     277      html += '<td class="prompt if-yellow">'+img+Strings.encodeTags(merged.name)+'</td>';
     278      html += '<td>'+Strings.encodeTags(lib.MIPSPanel)+'</td>';
     279      html += '<td>'+Strings.encodeTags(lib.barcode.name)+'</td>';
    270280      html += '<td class="dottedleft">';
    271281      for (var poolNo = 0; poolNo < pools.length; poolNo++)
     
    329339    return a.id - b.id;
    330340  }
     341 
     342  /**
     343    Sort by library plate location.
     344  */
     345  demux.sortByLibPlate = function(a, b)
     346  {
     347    var p1 = a.lib.bioWell.bioPlate.name;
     348    var p2 = b.lib.bioWell.bioPlate.name;
     349    if (p1 < p2) return -1;
     350    if (p1 > p2) return 1;
     351    var w1 = a.lib.bioWell;
     352    var w2 = b.lib.bioWell;
     353    if (w1.column != w2.column) return w1.column - w2.column;
     354    return w1.row - w2.row;
     355  }
    331356
    332357  demux.outcomeOnChange = function()
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/DemuxMergeServlet.java

    r5788 r5797  
    221221      {
    222222        int jobId = Values.getInt(req.getParameter("job"));
     223        Pipeline pipeline = Pipeline.getByCName(req.getParameter("pipeline"));
    223224        dc = sc.newDbControl();
    224225       
     
    239240        {
    240241          Library lib = mg.getLibrary(dc);
     242          lib.loadBioPlateLocation();
     243          if (pipeline == Pipeline.MIPS)
     244          {
     245            Extract dna = (Extract)lib.findSingleParent(dc, Subtype.DNA_NORMALIZED_ALIQUOT);
     246            lib.setAnnotation("MIPSPanel", Annotationtype.MIPS_PANEL.getAnnotationValue(dc, dna));
     247          }
    241248          // All pools for the library, but we only keep those used in the demux
    242249          List<PooledLibrary> pools = lib.getPools(dc);
Note: See TracChangeset for help on using the changeset viewer.