Changeset 5870


Ignore:
Timestamp:
Mar 20, 2020, 8:39:43 AM (21 months ago)
Author:
Nicklas Nordborg
Message:

References #1231: Add support for sequencing with NovaSeq?

Added annotations for storing "External plate position" and "External operator". External plate position is stored on the library item, and the external operator is used for library, library plate and pooled library. The external operator is also stored on flow cell and sequencing run, but re-uses the existing annotations (ClusterOperator and SequencingOperator).

The comment field from the wizard is now saved as description on the library plate, flow cell and sequencing run.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/sequencing/sequencing_external.js

    r5867 r5870  
    164164    if (idx2 == -1) return;
    165165
     166    var plateIndex = seq.findColumn(headers, 'Sample_Plate', lineNo, true);
     167    var wellIndex = seq.findColumn(headers, 'Sample_Well', lineNo, true);
     168   
    166169    lineNo++;
    167170    var libs = [];
     
    176179            'barcode': columns[barcodeIndex],
    177180            'index1': columns[idx1],
    178             'index2': columns[idx2]
     181            'index2': columns[idx2],
     182            'plate': plateIndex >= 0 ? columns[plateIndex] : null,
     183            'well': wellIndex >= 0 ? columns[wellIndex] : null
    179184          };
    180185      }
     
    202207 
    203208  // Find a column with the given header
    204   seq.findColumn = function(columns, header, lineNo)
     209  seq.findColumn = function(columns, header, lineNo, optional)
    205210  {
    206211    var colIndex = columns.indexOf(header);
    207     if (colIndex == -1)
     212    if (colIndex == -1 && !optional)
    208213    {
    209214      Wizard.setInputStatus('sampleSheetFile', 'invalid', 'On line '+lineNo+'; Can\'t find "' + header + '" column.');
     
    320325   
    321326    submitInfo.libraries = checkedLibraries;
     327    submitInfo.operator = frm.operator.value;
    322328    submitInfo.flowCellId = frm.flowCellId.value;
    323329    submitInfo.startDate = frm.startDate.value;
    324330    submitInfo.flowCellType = frm.flowCellType.value;
    325331    submitInfo.numLanes = parseInt(frm.num_lanes.value);
    326    
    327332    submitInfo.comments = frm.comments.value;
    328333   
  • extensions/net.sf.basedb.reggie/trunk/resources/sequencing/sequencing_external.jsp

    r5867 r5870  
    5454      <table class="step-form">
    5555      <tr>
     56        <td class="prompt">Operator</td>
     57        <td class="input">
     58          <select name="operator" id="operator" class="required">
     59            <option value="CTG">CTG
     60          </option>
     61        </td>
     62        <td class="status" id="operator.status"></td>
     63        <td class="help">
     64          <span id="operator.message" class="message"></span>
     65          The external operator.
     66        </td>
     67      </tr>
     68      <tr>
    5669        <td class="prompt">Flow cell ID</td>
    5770        <td class="input">
    5871          <input type="text" name="flowCellId" id="flowCellId"
    59             class="required auto-init" data-auto-init="focus-on-enter" data-next-focus="startDate"
     72            class="required auto-init" data-auto-init="focus-on-enter" data-next-focus="sampleSheetFile"
    6073            style="width: 12em;">
    6174        </td>
     
    8194        <td class="input">
    8295          <input type="text" name="startDate" id="startDate"
    83             class="auto-init required" data-auto-init="focus-on-enter"
     96            class="auto-init required" data-auto-init="focus-on-enter" data-next-focus="comments"
    8497            style="width: 12em;" maxlength="10">
    8598        </td>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Annotationtype.java

    r5865 r5870  
    12001200  public static final Annotationtype LIBRARY_FRAC_ADPT =
    12011201    new Annotationtype("Library_Frac_Adpt", Type.INT, false, Item.EXTRACT);
     1202 
     1203  /**
     1204    Annotation for storing position of an item (eg. library) that
     1205    is processed externally.
     1206    @since 4.26
     1207  */
     1208  public static final Annotationtype EXTERNAL_PLATE_POS =
     1209    new Annotationtype("ExternalPlatePos", Type.STRING, false, Item.EXTRACT);
     1210
     1211  /**
     1212    Annotation for storing the external operator.
     1213    @since 4.26
     1214  */
     1215  public static final Annotationtype EXTERNAL_OPERATOR =
     1216    new Annotationtype("ExternalOperator", Type.STRING, false, Item.EXTRACT, Item.BIOPLATE);
     1217
    12021218 
    12031219  /**
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r5867 r5870  
    560560        jsonChecks.add(checkAnnotationType(dc, Annotationtype.LIBRARY_CONC_EST, 1, null, createIfMissing, effectivePermissionsUse));
    561561        jsonChecks.add(checkAnnotationType(dc, Annotationtype.LIBRARY_FRAC_ADPT, 1, null, createIfMissing, effectivePermissionsUse));
     562        jsonChecks.add(checkAnnotationType(dc, Annotationtype.EXTERNAL_PLATE_POS, 1, null, createIfMissing, effectivePermissionsUse));
     563        jsonChecks.add(checkAnnotationType(dc, Annotationtype.EXTERNAL_OPERATOR, 1, null, createIfMissing, effectivePermissionsUse));
    562564        jsonChecks.add(checkAnnotationType(dc, Annotationtype.POOL_CONC, 1, null, createIfMissing, effectivePermissionsUse));
    563565        jsonChecks.add(checkAnnotationType(dc, Annotationtype.POOL_MOLARITY, 1, null, createIfMissing, effectivePermissionsUse));
     
    917919            Annotationtype.POOL_DATE, Annotationtype.POOL_OPERATOR,
    918920            Annotationtype.DO_NOT_USE, Annotationtype.DO_NOT_USE_COMMENT,
    919             Annotationtype.PIPELINE,
     921            Annotationtype.PIPELINE, Annotationtype.EXTERNAL_PLATE_POS,
     922            Annotationtype.EXTERNAL_OPERATOR,
    920923            Annotationtype.PLATE_PROCESS_RESULT));
    921924
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SequencingRunServlet.java

    r5869 r5870  
    733733              libsInSampleSheet.add(lib.getId());
    734734             
    735               if (lib.getCreationEvent().getEventDate() != null)
     735              Date libCreatedDate = lib.getCreationEvent().getEventDate();
     736              if (libCreatedDate != null)
    736737              {
    737                 jsonErrors.add("[Error] Line " + lineNo + ": Library '" + libName + "' is already registered for sequencing");
     738                jsonErrors.add("[Error] Line " + lineNo + ": Library '" + libName + "' is already registered for sequencing (Created date: " + Reggie.CONVERTER_DATE_TO_STRING_WITH_SEPARATOR.convert(libCreatedDate) + ")");
    738739              }
    739740             
     
    852853        Date startDate = Reggie.CONVERTER_STRING_TO_DATE.convert((String)jsonReq.get("startDate"));
    853854        Number numLanes = (Number)jsonReq.get("numLanes");
     855        String operator = (String)jsonReq.get("operator");
     856        String comments = Values.getStringOrNull((String)jsonReq.get("comments"));
    854857       
    855858        Extract pool = Extract.getNew(dc);
     
    857860        Pipeline.RNA_SEQ.setAnnotation(dc, pool);
    858861        pool.setName(PooledLibrary.getNextNames(dc, 1).get(0));
     862        Annotationtype.POOL_DATE.setAnnotationValue(dc, pool, startDate);
     863        Annotationtype.POOL_OPERATOR.setAnnotationValue(dc, pool, operator);
    859864        dc.saveItem(pool);
    860865        jsonMessages.add("Created " + pool.getName() + " with " + jsonLibs.size() + " libraries");
     
    872877          Number barcodeId = (Number)jsonLib.get("barcodeId");
    873878         
     879          String externalPlate = (String)jsonLib.get("plate");
     880          String externalWell = (String)jsonLib.get("well");
     881         
    874882          Extract lib = Extract.getById(dc, libId.intValue());
    875883          Tag barcode = Tag.getById(dc, barcodeId.intValue());
     
    884892          lib.setTag(barcode);
    885893          lib.getCreationEvent().setEventDate(startDate);
     894          Annotationtype.EXTERNAL_OPERATOR.setAnnotationValue(dc, lib, operator);
     895          if (externalPlate != null && externalWell != null)
     896          {
     897            Annotationtype.EXTERNAL_PLATE_POS.setAnnotationValue(dc, lib, externalPlate + " " + externalWell);
     898          }
    886899         
    887900          // Link with pool
     
    893906        for (BioPlate plate : libPlates)
    894907        {
     908          plate.setEventDate(startDate);
     909          if (comments != null)
     910          {
     911            // Merge comments with existing on library plate
     912            String currentComment = plate.getDescription();
     913            currentComment = currentComment == null ? comments : currentComment + "\n\n" + comments;
     914            plate.setDescription(comments);
     915          }
     916          Annotationtype.EXTERNAL_OPERATOR.setAnnotationValue(dc, plate, operator);
    895917          String linkSuffix = plateNo == 0 ? "" : "."+(plateNo+1);
    896918          AnyToAny libPlateLink = AnyToAny.getNew(dc, pool, plate, "LibPlate"+linkSuffix, true);
     
    904926        Pipeline.RNA_SEQ.setAnnotation(dc, flowCell);
    905927        flowCell.setName(FlowCell.getNextNames(dc, 1).get(0));
     928        flowCell.setDescription(comments);
    906929        flowCell.setSize(numLanes.intValue());
    907930        Annotationtype.FLOWCELL_ID.setAnnotationValue(dc, flowCell, flowCellId);
    908931        Annotationtype.FLOWCELL_TYPE.setAnnotationValue(dc, flowCell, flowCellType);
     932        Annotationtype.CLUSTER_OPERATOR.setAnnotationValue(dc, flowCell, operator);
    909933        Annotationtype.PLATE_PROCESS_RESULT.setAnnotationValue(dc, flowCell, ReactionPlate.PROCESS_SUCCESSFUL);
    910934        dc.saveItem(flowCell);
     
    973997        Pipeline.RNA_SEQ.setAnnotation(dc, seqRun);
    974998        seqRun.setName(seqRunName);
     999        seqRun.setDescription(comments);
    9751000        Annotationtype.SEQUENCING_START.setAnnotationValue(dc, seqRun, startDate);
     1001        Annotationtype.SEQUENCING_OPERATOR.setAnnotationValue(dc, seqRun, operator);
    9761002        seqRun.setHardware(null); // To prevent a 'project default'
    9771003        seqRun.setProtocol(null);
Note: See TracChangeset for help on using the changeset viewer.