Changeset 5855


Ignore:
Timestamp:
Mar 9, 2020, 2:11:40 PM (21 months ago)
Author:
Nicklas Nordborg
Message:

References #1231: Add support for sequencing with NovaSeq?

Added NovaSeq as a valid value for the FlowCellType annotation.

Progress reporting during sequencing uses the novaseq_status.sh pipeliene script (to be added). This will extract more or less the same values as the nextseq_status.sh and hiseq_status.sh scripts. When it detects that sequencing is complete it will update annotations and trigger auto-confirmation (if enabled).

Note that auto-confirmation will not work correctly yet since it will not get the read string correct. The manual "Sequencing ended" wizard also doens't work as expected.

There is also no way to manually set a flow cell to NovaSeq type. To get into this track the Custom type must first be selected and then manually changed via the regular BASE edit functionality.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/FlowCell.java

    r4895 r5855  
    4444  */
    4545  public static final String FLOW_CELL_TYPE_NEXTSEQ = "NextSeq";
     46
     47  /**
     48    Annotation value for the {@link Annotationtype#FLOWCELL_TYPE} when
     49    the flow cell is a NovaSeq flow cell type.
     50    @since 4.26
     51  */
     52  public static final String FLOW_CELL_TYPE_NOVASEQ = "NovaSeq";
     53
    4654 
    4755  /**
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/extensions/ReggieSignalHandlerFactory.java

    r5475 r5855  
    99import net.sf.basedb.core.signal.SignalHandler;
    1010import net.sf.basedb.reggie.ReservedItems;
     11import net.sf.basedb.reggie.dao.FlowCell;
    1112import net.sf.basedb.util.extensions.ActionFactory;
    1213import net.sf.basedb.util.extensions.InvokationContext;
     
    4041    LoggerFactory.getLogger(ReggieSignalHandlerFactory.class);
    4142
     43 
     44  /**
     45    Generate a signal URI that is used to send signals for a given
     46    sequencing run with a known flow cell barcode and flow cell type.
     47   
     48    @param flowCellType The type of the flow cell
     49    @param flowCellId The barcode of the flow cell
     50    @since 4.26
     51  */
     52  public static String getSignalUri(String flowCellType, String flowCellId)
     53  {
     54    String signalURI = null;
     55    if (FlowCell.FLOW_CELL_TYPE_NEXTSEQ.equals(flowCellType))
     56    {
     57      signalURI = NextSeqSignalHandler.getSignalUri(flowCellId);
     58    }
     59    else if (FlowCell.FLOW_CELL_TYPE_NOVASEQ.equals(flowCellType))
     60    {
     61      signalURI = NovaSeqSignalHandler.getSignalUri(flowCellId);
     62    }
     63    else if (FlowCell.FLOW_CELL_TYPE_HISEQ.equals(flowCellType))
     64    {
     65      signalURI = HiSeqSignalHandler.getSignalUri(flowCellId);
     66    }
     67    return signalURI;
     68  }
     69
     70 
    4271  private final ReservedItems<String> recentlyUsed;
    4372 
     
    74103   
    75104    SignalHandler[] handlers = null;
    76     if ("NextSeq".equals(signalType))
     105    if (FlowCell.FLOW_CELL_TYPE_NEXTSEQ.equals(signalType))
    77106    {
    78107      handlers = new SignalHandler[] { new NextSeqSignalHandler(job) };
    79108    }
    80     else if ("HiSeq".equals(signalType))
     109    else if (FlowCell.FLOW_CELL_TYPE_NOVASEQ.equals(signalType))
     110    {
     111      handlers = new SignalHandler[] { new NovaSeqSignalHandler(job) };
     112    }
     113    else if (FlowCell.FLOW_CELL_TYPE_HISEQ.equals(signalType))
    81114    {
    82115      handlers = new SignalHandler[] { new HiSeqSignalHandler(job) };
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r5843 r5855  
    589589        jsonChecks.add(checkAnnotationType(dc, Annotationtype.FLOWCELL_ID, 1, null, createIfMissing, effectivePermissionsUse));
    590590        jsonChecks.add(checkAnnotationType(dc, Annotationtype.FLOWCELL_TYPE, 1,
    591             new ValueOptions(FlowCell.FLOW_CELL_TYPE_HISEQ, FlowCell.FLOW_CELL_TYPE_NEXTSEQ),
     591            new ValueOptions(FlowCell.FLOW_CELL_TYPE_HISEQ, FlowCell.FLOW_CELL_TYPE_NEXTSEQ, FlowCell.FLOW_CELL_TYPE_NOVASEQ),
    592592            createIfMissing, effectivePermissionsUse));
    593593        jsonChecks.add(checkAnnotationType(dc, Annotationtype.CLUSTER_START, 1, null, createIfMissing, effectivePermissionsUse));
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SequencingRunServlet.java

    r5612 r5855  
    6262import net.sf.basedb.reggie.dao.SequencingRun;
    6363import net.sf.basedb.reggie.dao.Subtype;
    64 import net.sf.basedb.reggie.extensions.HiSeqSignalHandler;
    65 import net.sf.basedb.reggie.extensions.NextSeqSignalHandler;
     64import net.sf.basedb.reggie.extensions.ReggieSignalHandlerFactory;
    6665import net.sf.basedb.reggie.grid.ScriptUtil;
    6766import net.sf.basedb.util.Values;
     
    463462            job.setExternalId(flowCellBarcode);
    464463           
    465             String signalURI = "HiSeq".equals(flowCellType) ?
    466               HiSeqSignalHandler.getSignalUri(flowCellBarcode) :
    467               NextSeqSignalHandler.getSignalUri(flowCellBarcode);
    468             job.setSignalTransporter(ExtensionSignalTransporter.class, signalURI);
     464            String signalURI = ReggieSignalHandlerFactory.getSignalUri(flowCellType, flowCellBarcode);
     465            if (signalURI != null)
     466            {
     467              job.setSignalTransporter(ExtensionSignalTransporter.class, signalURI);
     468            }
    469469           
    470470            dc.saveItem(job);
     
    883883        String flowCelltype = (String)Annotationtype.FLOWCELL_TYPE.getAnnotationValue(dc, flowCell);
    884884        String sequencingCycles = (String)Annotationtype.SEQUENCING_CYCLES.getAnnotationValue(dc, flowCell);
    885         int readGroups = sequencingCycles == null ? 3 : sequencingCycles.split("\\-").length; // 3 or 4 depending on if we have 1 or 2 index reads
     885        String flowCellBarcode = (String)Annotationtype.FLOWCELL_ID.getAnnotationValue(dc, flowCell);
    886886
    887887        Date startDate = null;
    888         String flowCellBarcode = null;
    889888        String hiSeqPosition = "A";
    890889        String dataFilesFolder = null;
    891890        int runNumber = 0;
    892         if ("HiSeq".equals(flowCelltype))
     891        if (FlowCell.FLOW_CELL_TYPE_HISEQ.equals(flowCelltype))
    893892        {
    894893          startDate = Reggie.CONVERTER_STRING_TO_DATE.convert("20"+runParameters.getConfig("Setup/RunStartDate"));
    895894          flowCellBarcode = runParameters.getConfig("Setup/Barcode");
    896           if (readGroups == 3)
    897           {
    898             sequencingCycles = runParameters.getConfig("Setup/Read1") +
    899                 "-" + runParameters.getConfig("Setup/IndexRead1") +
    900                 "-" + runParameters.getConfig("Setup/Read2");
    901           }
    902           else
    903           {
    904             sequencingCycles = runParameters.getConfig("Setup/Read1") +
    905                 "-" + runParameters.getConfig("Setup/IndexRead1") +
    906                 "-" + runParameters.getConfig("Setup/IndexRead2") +
    907                 "-" + runParameters.getConfig("Setup/Read2");
    908           }
     895          int r1 = Values.getInt(runParameters.getConfig("Setup/Read1"));
     896          int r2 = Values.getInt(runParameters.getConfig("Setup/Read2"));
     897          int i1 = Values.getInt(runParameters.getConfig("Setup/Index1Read"));
     898          int i2 = Values.getInt(runParameters.getConfig("Setup/Index2Read"));
     899          sequencingCycles = toCycles(r1, r2, i1, i2);
    909900          runNumber = Values.getInt(runParameters.getConfig("Setup/ScanNumber"));
    910901          dataFilesFolder = runParameters.getConfig("Setup/RunID");
    911902          hiSeqPosition = runParameters.getConfig("Setup/FCPosition");
    912903        }
    913         else
     904        else if (FlowCell.FLOW_CELL_TYPE_NOVASEQ.equals(flowCelltype))
     905        {
     906          startDate = Reggie.CONVERTER_STRING_TO_DATE.convert("20"+runParameters.getConfig("RunStartDate"));
     907          flowCellBarcode = runParameters.getConfig("RfidsInfo/FlowCellSerialBarcode");
     908          int r1 = Values.getInt(runParameters.getConfig("Read1NumberOfCycles"));
     909          int r2 = Values.getInt(runParameters.getConfig("Read2NumberOfCycles"));
     910          int i1 = Values.getInt(runParameters.getConfig("IndexRead1NumberOfCycles"));
     911          int i2 = Values.getInt(runParameters.getConfig("IndexRead2NumberOfCycles"));
     912          sequencingCycles = toCycles(r1, r2, i1, i2);
     913          runNumber = Values.getInt(runParameters.getConfig("RunNumber"));
     914          dataFilesFolder = runParameters.getConfig("RunId");
     915          hiSeqPosition = runParameters.getConfig("Side");
     916        }
     917        else if (FlowCell.FLOW_CELL_TYPE_NEXTSEQ.equals(flowCelltype))
    914918        {
    915919          startDate = Reggie.CONVERTER_STRING_TO_DATE.convert("20"+runParameters.getConfig("RunStartDate"));
    916920          flowCellBarcode = runParameters.getConfig("FlowCellSerial");
    917           if (readGroups == 3)
    918           {
    919             sequencingCycles = runParameters.getConfig("Setup/Read1") +
    920                 "-" + runParameters.getConfig("Setup/Index1Read") +
    921                 "-" + runParameters.getConfig("Setup/Read2");
    922           }
    923           else
    924           {
    925             sequencingCycles = runParameters.getConfig("Setup/Read1") +
    926                 "-" + runParameters.getConfig("Setup/Index1Read") +
    927                 "-" + runParameters.getConfig("Setup/Index2Read") +
    928                 "-" + runParameters.getConfig("Setup/Read2");
    929           }
     921
     922          int r1 = Values.getInt(runParameters.getConfig("Setup/Read1"));
     923          int r2 = Values.getInt(runParameters.getConfig("Setup/Read2"));
     924          int i1 = Values.getInt(runParameters.getConfig("Setup/Index1Read"));
     925          int i2 = Values.getInt(runParameters.getConfig("Setup/Index2Read"));
     926          sequencingCycles = toCycles(r1, r2, i1, i2);
    930927          runNumber = Values.getInt(runParameters.getConfig("RunNumber"));
    931928          dataFilesFolder = runParameters.getConfig("RunID");
     
    960957    }
    961958
     959    /**
     960      Convert reads to a single SequencingCycles string. R1, R2 and I1 are expected
     961      to always have value > 0. I2 may or may not.
     962    */
     963    private String toCycles(int r1, int r2, int i1, int i2)
     964    {
     965      return r1 + "-" + i1 + (i2 == 0 ? "" : "-" + i2) + "-" + r2;
     966    }
     967   
    962968  }
    963969}
Note: See TracChangeset for help on using the changeset viewer.