Changeset 2089


Ignore:
Timestamp:
Oct 21, 2013, 9:02:52 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #481: Register prepared flow cells

Replaces ReadString with SequencingCycles.

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

Legend:

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

    r2079 r2089  
    3030<script language="JavaScript">
    3131
    32 var debug = true;
     32var debug = 0;
    3333var currentStep = 1;
    3434
     
    3737var dateIsValid = [];
    3838var flowCellIdIsValid = [];
    39 var readStringIsValid = [];
     39var sequencingCyclesIsValid = [];
    4040
    4141function init()
     
    128128    {
    129129      var fc = frm.flowcells[i].flowCell;
    130       //Main.debug(fc.name + ':'+ fc.id + ':' + flowCellIsValid['fc.'+fc.id+'.id'] + ':' + flowCellIsValid['fc.'+fc.id+'.readString']);
    131130      if (flowCellIdIsValid['fc-'+index+'.externalId'] != true) return false;
    132131      if (dateIsValid['fc-'+index+'.clusterDate'] != true) return false;
     
    157156    {
    158157      var fc = frm.flowcells[i].flowCell;
    159       //Main.debug(fc.name + ':'+ fc.id + ':' + flowCellIsValid['fc.'+fc.id+'.id'] + ':' + flowCellIsValid['fc.'+fc.id+'.readString']);
    160       if (readStringIsValid['fc-'+index+'.readString'] != true) return false;
     158      if (sequencingCyclesIsValid['fc-'+index+'.sequencingCycles'] != true) return false;
    161159      index++;
    162160    }
     
    318316      var fc = frm.flowcells[i].flowCell;
    319317      var prefix = 'fc-'+index;
    320       setInnerHTML(prefix+'.name.s', fc.name);
    321       setInnerHTML(prefix+'.externalId', '<b>ID:</b> ' + frm[prefix+'.externalId'].value);
    322       frm[prefix+'.readString'].value = fc.ReadString;
    323       readStringOnBlur(prefix+'.readString');
     318      setInnerHTML(prefix+'.externalId', frm[prefix+'.externalId'].value);
     319      document.getElementById(prefix+'.externalId').title = fc.name;
     320      frm[prefix+'.sequencingCycles'].value = fc.SequencingCycles;
     321      sequencingCyclesOnBlur(prefix+'.sequencingCycles');
    324322      index++;
    325323    }
     
    492490}
    493491
    494 function readStringOnBlur(readStringField)
    495 {
    496   var frm = document.forms['reggie'];
    497  
    498   setInputStatus(readStringField, '', '');
    499   readStringIsValid[readStringField] = false;
    500  
    501   var readString = frm[readStringField].value;
    502   if (readString == '')
    503   {
    504     setInputStatus(readStringField, 'ReadString is a required value', 'invalid');
     492function sequencingCyclesOnBlur(sequencingCyclesField)
     493{
     494  var frm = document.forms['reggie'];
     495 
     496  setInputStatus(sequencingCyclesField, '', '');
     497  sequencingCyclesIsValid[sequencingCyclesField] = false;
     498 
     499  var sequencingCycles = frm[sequencingCyclesField].value;
     500  if (sequencingCycles == '')
     501  {
     502    setInputStatus(sequencingCyclesField, 'Sequencing cycles is a required value', 'invalid');
    505503    return;
    506504  }
    507   if (!readString.match(/^([YNIJ]\d+)+$/))
    508   {
    509     setInputStatus(readStringField, 'Not a valid ReadString value', 'invalid');
     505  if (!sequencingCycles.match(/^\d+\-\d+\-\d+$/))
     506  {
     507    setInputStatus(sequencingCyclesField, 'Not a valid Sequencing cycles value', 'invalid');
    510508    return;
    511509  }
    512510 
    513   readStringIsValid[readStringField] = true;
    514   setInputStatus(readStringField, '', 'valid');
     511  sequencingCyclesIsValid[sequencingCyclesField] = true;
     512  setInputStatus(sequencingCyclesField, '', 'valid');
    515513}
    516514
     
    563561    {
    564562      var fc = frm.flowcells[i].flowCell;
    565       frm['fc-'+index+'.readString'].disabled = true;
     563      frm['fc-'+index+'.sequencingCycles'].disabled = true;
    566564      fc.externalId = frm['fc-'+index+'.externalId'].value;
    567565      fc.clusterDate = frm['fc-'+index+'.clusterDate'].value;
     
    570568      if (!failed)
    571569      {
    572         fc.ReadString = frm['fc-'+index+'.readString'].value;
     570        fc.SequencingCycles = frm['fc-'+index+'.sequencingCycles'].value;
    573571        fc.HiSeqPosition = Forms.getCheckedRadio(frm['fc-'+index+'.pos']).value;
    574572      }
     
    910908        <td class="prompt"></td>
    911909        <td style="font-weight: bold;">HiSeq position</td>
    912         <td style="font-weight: bold;">ReadString</td>
     910        <td style="font-weight: bold;">Sequencing cycles</td>
    913911        <td class="status"></td>
    914912        <td class="help"></td>
    915913      </tr>
     914      <tr valign="top">
     915        <td class="prompt"></td>
     916        <td></td>
     917        <td style="font-style: italic;">(Read 1 - Index - Read 2)</td>
     918        <td class="status"></td>
     919        <td class="help"></td>
     920      </tr>
    916921      <tr valign="top" class="fc-0">
    917         <td class="subprompt"><span id="fc-0.name.s"></span></td>
     922        <td class="subprompt"><span id="fc-0.externalId"></span></td>
    918923        <td>&nbsp;
    919924          <label><input type="radio" name="fc-0.pos" value="A" onclick="hiseqPosOnClick(0)" checked>A</label>
     
    921926          <label><input type="radio" name="fc-0.pos" value="B" onclick="hiseqPosOnClick(0)">B</label>
    922927        </td>
    923         <td><input type="text" class="required" name="fc-0.readString" onblur="readStringOnBlur(this.name)"></td>
    924         <td class="status" id="fc-0.readString.status"></td>
    925         <td class="help"><span id="fc-0.readString.message" class="message"></span><span id="fc-0.externalId"></span></td>
     928        <td><input type="text" class="required" name="fc-0.sequencingCycles" onblur="sequencingCyclesOnBlur(this.name)"></td>
     929        <td class="status" id="fc-0.sequencingCycles.status"></td>
     930        <td class="help"><span id="fc-0.sequencingCycles.message" class="message"></span></td>
    926931      </tr>
    927932      <tr valign="top" class="fc-1">
    928         <td class="subprompt"><span id="fc-1.name.s"></span></td>
     933        <td class="subprompt"><span id="fc-1.externalId"></span></td>
    929934        <td>&nbsp;
    930935          <label><input type="radio" name="fc-1.pos" value="A" onclick="hiseqPosOnClick(1)">A</label>
     
    932937          <label><input type="radio" name="fc-1.pos" value="B" onclick="hiseqPosOnClick(1)" checked>B</label>
    933938        </td>
    934         <td><input type="text" class="required" name="fc-1.readString" onblur="readStringOnBlur(this.name)"></td>
    935         <td class="status" id="fc-1.readString.status"></td>
    936         <td class="help"><span id="fc-1.readString.message" class="message"></span><span id="fc-1.externalId"></span></td>
     939        <td><input type="text" class="required" name="fc-1.sequencingCycles" onblur="sequencingCyclesOnBlur(this.name)"></td>
     940        <td class="status" id="fc-1.sequencingCycles.status"></td>
     941        <td class="help"><span id="fc-1.sequencingCycles.message" class="message"></span></td>
    937942      </tr>
    938943
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/FlowCellServlet.java

    r2087 r2089  
    165165        for (FlowCell fc : flowCells)
    166166        {
    167           fc.loadAnnotations(dc, "ReadString", Annotationtype.READ_STRING, null);
     167          fc.loadAnnotations(dc, "SequencingCycles", Annotationtype.SEQUENCING_CYCLES, null);
    168168          fc.loadAnnotations(dc, "externalId", Annotationtype.FLOWCELL_ID, null);
    169169          fc.setAnnotation("comments", fc.getPhysicalBioAssay().getDescription());
     
    429429          {
    430430            sequenceRun.addPhysicalBioAssay(flowCell);
    431             Annotationtype.READ_STRING.setAnnotationValue(dc, flowCell, jsonFlowCell.get("ReadString"));
     431            Annotationtype.SEQUENCING_CYCLES.setAnnotationValue(dc, flowCell, jsonFlowCell.get("SequencingCycles"));
    432432            Annotationtype.HISEQ_POSITION.setAnnotationValue(dc, flowCell, jsonFlowCell.get("HiSeqPosition"));
    433433           
Note: See TracChangeset for help on using the changeset viewer.