Changeset 2237


Ignore:
Timestamp:
Feb 20, 2014, 9:48:35 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #562: Re-design clustering and sequencing startup wizards

Load and display information about pools and library plate in the sequencing startup wizard to make it easier to verify that the correct runparameters.xml file has been selected.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/libprep/sequencing_started.jsp

    r2231 r2237  
    153153  setInnerHTML('startDate', '');
    154154  setInnerHTML('sequencingCycles', '');
     155  setInnerHTML('flowCellName', 'Flow cell information');
     156  setInnerHTML('pools', '');
     157  setInnerHTML('libPlate', '');
    155158  Main.hide('existing-sequencing-runs');
    156159  setInnerHTML('existing-sequencing-runs', '');
     
    247250  if (flowCell == null)
    248251  {
     252    setInnerHTML('flowCellName', 'Can\'t find flow cell ' + info.FlowCellID);
    249253    throw 'Flow cell with ID='+info.FlowCellID+' not found.';
    250254  }
     255 
     256  setInnerHTML('flowCellName', Main.encodeTags(flowCell.name));
     257
     258  var pools = flowCell.pools;
     259  var html = '';
     260  var libPlateHtml = '';
     261  for (var poolNo = 0; poolNo < pools.length; poolNo++)
     262  {
     263    var pool = pools[poolNo];
     264    if (poolNo > 0) html += ', ';
     265    html += Main.encodeTags(pool.name);
     266    if (pool.LibPlate && libPlateHtml.indexOf(pool.LibPlate.name) == -1)
     267    {
     268      if (libPlateHtml.length > 0) libPlateHtml += ', ';
     269      libPlateHtml += Main.encodeTags(pool.LibPlate.name);
     270    }
     271  }
     272  setInnerHTML('pools', html);
     273  setInnerHTML('libPlate', libPlateHtml || 'n/a');
     274
    251275  var html = '';
    252276  html += '<tr valign="top" class="fc-info">';
    253   html += '<td class="prompt" colspan="2">Existing sequencing runs for ' + flowCell.name + '</td>';
     277  html += '<td class="prompt" colspan="2">Existing sequencing runs</td>';
    254278  html += '';
    255279  html += '<td class="status"></td>';
     
    534558        </td>
    535559        <td class="status" id="runParametersXml.status"></td>
    536         <td class="help" rowspan="8"><span id="runParametersXml.message" class="message" style="display:none;"></span>
     560        <td class="help" rowspan="12"><span id="runParametersXml.message" class="message" style="display:none;"></span>
    537561          Select the <b>runParameters.xml</b> file that was created by the HiSeq. Typically found in
    538562          <b>D:\Illumina\HiSeqTemp\&lt;run-folder&gt;</b> subfolder.
     
    540564      </tr>
    541565      <tr valign="top" class="fc-info" style="border-top: 1em solid transparent;">
     566        <td class="prompt" colspan="2">Sequencing information</td>
     567        <td class="status"></td>
     568      </tr>
     569      <tr valign="top" class="fc-info">
    542570        <td class="subprompt">Experiment</td>
    543571        <td class="input" id="experimentName"></td>
     
    572600        <td class="subprompt">Sequencing cycles</td>
    573601        <td class="input" id="sequencingCycles"></td>
     602        <td class="status"></td>
     603      </tr>
     604      <tr valign="top" class="fc-info">
     605        <td class="prompt" colspan="2" id="flowCellName">Flow cell information</td>
     606        <td class="status"></td>
     607      </tr>
     608      <tr valign="top" class="fc-info">
     609        <td class="subprompt">Pools</td>
     610        <td class="input" id="pools"></td>
     611        <td class="status"></td>
     612      </tr>
     613      <tr valign="top" class="fc-info">
     614        <td class="subprompt">LibPlate</td>
     615        <td class="input" id="libPlate"></td>
    574616        <td class="status"></td>
    575617      </tr>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/FlowCellServlet.java

    r2225 r2237  
    1919import org.json.simple.parser.JSONParser;
    2020
     21import net.sf.basedb.core.AnyToAny;
    2122import net.sf.basedb.core.Application;
    2223import net.sf.basedb.core.BioMaterialEvent;
     
    4142import net.sf.basedb.reggie.dao.Annotationtype;
    4243import net.sf.basedb.reggie.dao.BiomaterialList;
     44import net.sf.basedb.reggie.dao.BioplateType;
    4345import net.sf.basedb.reggie.dao.FlowCell;
    4446import net.sf.basedb.reggie.dao.PooledLibrary;
     
    235237          fc.loadAnnotations(dc, "SequencingCycles", Annotationtype.SEQUENCING_CYCLES, null);
    236238          fc.loadAnnotations(dc, "externalId", Annotationtype.FLOWCELL_ID, null);
     239         
     240          // Load pools on flow cell
     241          List<PooledLibrary> pools = PooledLibrary.getByFlowCell(dc, fc);
     242          JSONArray jsonPools = new JSONArray();
     243          for (PooledLibrary pool : pools)
     244          {
     245            try
     246            {
     247              AnyToAny libPlateLink = AnyToAny.getByName(dc, pool.getExtract(), "LibPlate");
     248              ReactionPlate libPlate = ReactionPlate.getById(dc, libPlateLink.getToId(), BioplateType.LIBRARY);
     249              pool.setAnnotation("LibPlate", libPlate.asJSONObject());
     250            }
     251            catch (RuntimeException ex)
     252            {}
     253            jsonPools.add(pool.asJSONObject());
     254          }
     255          fc.setAnnotation("pools", jsonPools);
    237256        }
    238257       
Note: See TracChangeset for help on using the changeset viewer.