Changeset 2079


Ignore:
Timestamp:
Oct 17, 2013, 1:46:35 PM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #481: Register prepared flow cells

Allow registration of different cluster dates/operator on two flow cells. Added ClusterStart and ClusterOperator annotations to flow cells.

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

Legend:

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

    r2077 r2079  
    118118function step2IsValid()
    119119{
    120   if (dateIsValid['clusterDate'] != true) return false;
    121  
    122120  var frm = document.forms['reggie'];
    123121  var failed = frm.outcome[1].checked;
     
    132130      //Main.debug(fc.name + ':'+ fc.id + ':' + flowCellIsValid['fc.'+fc.id+'.id'] + ':' + flowCellIsValid['fc.'+fc.id+'.readString']);
    133131      if (flowCellIdIsValid['fc-'+index+'.externalId'] != true) return false;
     132      if (dateIsValid['fc-'+index+'.clusterDate'] != true) return false;
    134133      if (commentsIsValid['fc-'+index+'.comments'] != true) return false;
    135134      index++;
     
    252251    // Only one flow cell selected
    253252    Main.addClass(document.getElementById('step.2.section'), 'hide-fc-1');
    254    
    255   }
    256 
    257  
    258   frm.clusterDate.focus();
     253  }
     254
     255 
     256  frm['fc-0.externalId'].focus();
    259257}
    260258
     
    263261  var frm = document.forms['reggie'];
    264262  // Disable controls
    265   frm.clusterDate.disabled = true;
    266   frm.clusterOperator.disabled = true;
    267263  frm.clusterProtocol.disabled = true;
    268264  frm['fc-0.externalId'].disabled = true;
     265  frm['fc-0.clusterDate'].disabled = true;
     266  frm['fc-0.clusterOperator'].disabled = true;
    269267  frm['fc-0.comments'].disabled = true;
    270268  frm['fc-1.externalId'].disabled = true;
     269  frm['fc-1.clusterDate'].disabled = true;
     270  frm['fc-1.clusterOperator'].disabled = true;
    271271  frm['fc-1.comments'].disabled = true;
    272272
     
    544544 
    545545  // Cluster fields
    546   submitInfo.clusterDate = frm.clusterDate.value;
    547   submitInfo.clusterOperator = frm.clusterOperator.value;
    548546  submitInfo.clusterProtocol = parseInt(frm.clusterProtocol.value, 10);
    549547 
     
    567565      frm['fc-'+index+'.readString'].disabled = true;
    568566      fc.externalId = frm['fc-'+index+'.externalId'].value;
     567      fc.clusterDate = frm['fc-'+index+'.clusterDate'].value;
     568      fc.clusterOperator = frm['fc-'+index+'.clusterOperator'].value;
    569569      fc.comments = frm['fc-'+index+'.comments'].value;
    570570      if (!failed)
     
    734734  <tr>
    735735    <td class="stepfields">
    736       <table>
    737       <tr valign="top">
    738         <td class="prompt">Date</td>
    739         <td class="input">
    740           <input type="text" class="required" name="clusterDate" value="" size="12" maxlength="10"
    741             onblur="dateOnChange('clusterDate')" onkeypress="focusOnEnter(event, 'clusterOperator')">
    742             <base:icon
    743               onclick="Dates.selectDate('Cluster date', 'reggie', 'clusterDate', 'setDate', 'yyyyMMdd')"
    744               image="calendar.png"
    745               tooltip="Select a date from a calendar"
    746               tabindex="-1"
    747             />
    748         </td>
    749         <td class="status" id="clusterDate.status"></td>
    750         <td class="help">
    751           <span id="clusterDate.message" class="message" style="display: none;"></span>(YYYYMMDD or MMDD)
    752         </td>
    753       </tr>
    754       <tr valign="top">
    755         <td class="prompt">Operator</td>
    756         <td class="input">
    757           <input type="text" name="clusterOperator" value="<%=HTML.encodeTags(user.getName()) %>"
    758             style="width: 90%;" maxlength="255" onkeypress="focusOnEnter(event, 'clusterProtocol')">
    759         </td>
    760         <td class="status" id="clusterOperator.status"></td>
    761         <td class="help">
    762           <span id="clusterOperator.message" class="message" style="display: none;"></span>
    763         </td>
    764       </tr>
     736      <table style="border-collapse: collapse;">
    765737      <tr valign="top">
    766738        <td class="prompt">Protocol</td>
     
    773745      </tr>
    774746      <tbody class="fc-0">
    775       <tr valign="top">
     747      <tr valign="top" style="background-color: #E8E8E8;">
    776748        <td class="prompt" id="fc-0.name.c">Flow cell A</td>
    777749        <td class="input"></td>
     
    781753      <tr valign="top">
    782754        <td class="subprompt">ID</td>
    783         <td><input type="text" class="required" name="fc-0.externalId" onblur="flowCellIdOnBlur(this.name)" onkeypress="focusOnEnter(event, 'fc-0.comments')"></td>
     755        <td class="input"><input type="text" class="required" name="fc-0.externalId" onblur="flowCellIdOnBlur(this.name)" onkeypress="focusOnEnter(event, 'fc-0.clusterDate')"></td>
    784756        <td class="status" id="fc-0.externalId.status"></td>
    785757        <td class="help"><span id="fc-0.externalId.message" class="message"></span></td>
     758      </tr>
     759      <tr valign="top">
     760        <td class="subprompt">Start date</td>
     761        <td class="input">
     762          <input type="text" class="required" name="fc-0.clusterDate" value="" size="12" maxlength="10"
     763            onblur="dateOnChange(this.name)" onkeypress="focusOnEnter(event, 'fc-0.clusterOperator')">
     764            <base:icon
     765              onclick="Dates.selectDate('Cluster date', 'reggie', 'fc-0.clusterDate', 'setDate', 'yyyyMMdd')"
     766              image="calendar.png"
     767              tooltip="Select a date from a calendar"
     768              tabindex="-1"
     769            />
     770        </td>
     771        <td class="status" id="fc-0.clusterDate.status"></td>
     772        <td class="help">
     773          <span id="fc-0.clusterDate.message" class="message" style="display: none;"></span>Date the clustering was started (YYYYMMDD or MMDD)
     774        </td>
     775      </tr>
     776      <tr valign="top">
     777        <td class="subprompt">Operator</td>
     778        <td class="input">
     779          <input type="text" name="fc-0.clusterOperator" value="<%=HTML.encodeTags(user.getName()) %>"
     780            style="width: 90%;" maxlength="255" onkeypress="focusOnEnter(event, 'fc-0.comments')">
     781        </td>
     782        <td class="status" id="fc-0.clusterOperator.status"></td>
     783        <td class="help">
     784          <span id="fc-0.clusterOperator.message" class="message" style="display: none;"></span>
     785        </td>
    786786      </tr>
    787787      <tr valign="top">
     
    795795      </tbody>
    796796      <tbody class="fc-1">
    797       <tr valign="top">
     797      <tr valign="top" style="background-color: #E8E8E8;">
    798798        <td class="prompt" id="fc-1.name.c">Flow cell B</td>
    799799        <td class="input"></td>
     
    803803      <tr valign="top">
    804804        <td class="subprompt">ID</td>
    805         <td><input type="text" class="required" name="fc-1.externalId" onblur="flowCellIdOnBlur(this.name)" onkeypress="focusOnEnter(event, 'fc-1.comments')"></td>
     805        <td class="input"><input type="text" class="required" name="fc-1.externalId" onblur="flowCellIdOnBlur(this.name)" onkeypress="focusOnEnter(event, 'fc-1.clusterDate')"></td>
    806806        <td class="status" id="fc-1.externalId.status"></td>
    807807        <td class="help"><span id="fc-1.externalId.message" class="message"></span></td>
     808      </tr>
     809      <tr valign="top">
     810        <td class="subprompt">Start date</td>
     811        <td class="input">
     812          <input type="text" class="required" name="fc-1.clusterDate" value="" size="12" maxlength="10"
     813            onblur="dateOnChange(this.name)" onkeypress="focusOnEnter(event, 'fc-1.clusterOperator')">
     814            <base:icon
     815              onclick="Dates.selectDate('Cluster date', 'reggie', 'fc-1.clusterDate', 'setDate', 'yyyyMMdd')"
     816              image="calendar.png"
     817              tooltip="Select a date from a calendar"
     818              tabindex="-1"
     819            />
     820        </td>
     821        <td class="status" id="fc-1.clusterDate.status"></td>
     822        <td class="help">
     823          <span id="fc-1.clusterDate.message" class="message" style="display: none;"></span>Date the clustering was started (YYYYMMDD or MMDD)
     824        </td>
     825      </tr>
     826      <tr valign="top">
     827        <td class="subprompt">Operator</td>
     828        <td class="input">
     829          <input type="text" name="fc-1.clusterOperator" value="<%=HTML.encodeTags(user.getName()) %>"
     830            style="width: 90%;" maxlength="255" onkeypress="focusOnEnter(event, 'fc-1.comments')">
     831        </td>
     832        <td class="status" id="fc-1.clusterOperator.status"></td>
     833        <td class="help">
     834          <span id="fc-1.clusterOperator.message" class="message" style="display: none;"></span>
     835        </td>
    808836      </tr>
    809837      <tr valign="top">
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Annotationtype.java

    r2066 r2079  
    565565
    566566  /**
     567    The "ClusterStart" annotation, used for physical bioassays (FlowCell).
     568    The date the flow cell was clustered.
     569    @since 2.13
     570  */
     571  public static final Annotationtype CLUSTER_START =
     572    new Annotationtype("ClusterStart", Type.DATE, Item.PHYSICALBIOASSAY);
     573
     574  /**
     575    The "ClusterOperator" annotation, used for physical bioassays (FlowCell).
     576    The operator that is responsible for clustering.
     577    @since 2.13
     578  */
     579  public static final Annotationtype CLUSTER_OPERATOR =
     580    new Annotationtype("ClusterOperator", Type.STRING, Item.PHYSICALBIOASSAY);
     581
     582 
     583  /**
    567584    The "ReadString" annotation, used for physical bioassays (FlowCell).
    568585    @since 2.13
     
    578595  public static final Annotationtype HISEQ_POSITION =
    579596    new Annotationtype("HiSeqPosition", Type.STRING, Item.PHYSICALBIOASSAY);
    580    
     597
     598 
    581599  /**
    582600    The "SequencingStart" annotation, used for derived bioassays (SequencingRun).
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/FlowCellServlet.java

    r2077 r2079  
    378378       
    379379        // Clustering information
    380         Date clusterDate = Reggie.CONVERTER_STRING_TO_DATE.convert((String)jsonReq.get("clusterDate"));
    381         String clusterOperator = Values.getStringOrNull((String)jsonReq.get("clusterOperator"));
    382380        Number clusterProtocolId = (Number)jsonReq.get("clusterProtocol");     
    383381        Protocol clusterProtocol = clusterProtocolId == null ? null : Protocol.getById(dc, clusterProtocolId.intValue());
     
    387385          JSONObject jsonFlowCell = (JSONObject)jsonFlowCells.get(fcNo);
    388386          Number fcId = (Number)jsonFlowCell.get("id");
    389          
     387
     388          Date clusterDate = Reggie.CONVERTER_STRING_TO_DATE.convert((String)jsonFlowCell.get("clusterDate"));
     389          String clusterOperator = Values.getStringOrNull((String)jsonFlowCell.get("clusterOperator"));
     390
    390391          PhysicalBioAssay flowCell = PhysicalBioAssay.getById(dc, fcId.intValue());
    391392          BioMaterialEvent createEvent = flowCell.getCreationEvent();
     
    394395
    395396          flowCell.setDescription((String)jsonFlowCell.get("comments"));
    396           Annotationtype.OPERATOR.setAnnotationValue(dc, flowCell, clusterOperator);
     397          Annotationtype.CLUSTER_OPERATOR.setAnnotationValue(dc, flowCell, clusterOperator);
     398          Annotationtype.CLUSTER_START.setAnnotationValue(dc, flowCell, clusterDate);
    397399          Annotationtype.FLOWCELL_ID.setAnnotationValue(dc, flowCell, jsonFlowCell.get("externalId"));
    398400         
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r2077 r2079  
    287287
    288288        jsonChecks.add(checkAnnotationType(dc, Annotationtype.FLOWCELL_ID, 1, null, effectiveOptions, createIfMissing));
     289        jsonChecks.add(checkAnnotationType(dc, Annotationtype.CLUSTER_START, 1, null, effectiveOptions, createIfMissing));
     290        jsonChecks.add(checkAnnotationType(dc, Annotationtype.CLUSTER_OPERATOR, 1, null, effectiveOptions, createIfMissing));
    289291        jsonChecks.add(checkAnnotationType(dc, Annotationtype.READ_STRING, 1, null, effectiveOptions, createIfMissing));
    290292        jsonChecks.add(checkAnnotationType(dc, Annotationtype.HISEQ_POSITION, 1,
     
    371373
    372374        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.FLOW_CELL, createIfMissing,
    373             Annotationtype.FLOWCELL_ID, Annotationtype.READ_STRING, Annotationtype.HISEQ_POSITION,
    374             Annotationtype.OPERATOR, Annotationtype.PLATE_PROCESS_RESULT));
     375            Annotationtype.FLOWCELL_ID, Annotationtype.CLUSTER_START, Annotationtype.CLUSTER_OPERATOR,
     376            Annotationtype.READ_STRING, Annotationtype.HISEQ_POSITION,
     377            Annotationtype.PLATE_PROCESS_RESULT));
    375378       
    376379        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.SEQUENCING_RUN, createIfMissing,
Note: See TracChangeset for help on using the changeset viewer.