Changeset 5871


Ignore:
Timestamp:
Mar 20, 2020, 11:17:50 AM (21 months ago)
Author:
Nicklas Nordborg
Message:

References #1231: Add support for sequencing with NovaSeq?

Fixes to make the relase exporter work with data via external sequencing. The library exporter need a date to generate a batch index. The code has been updated to use the registration date as a last resort to make sure that a date always exists.

The external sequencing wizard also set PlateProcessResult=Successful on library plate, otherwise no libraries on that plate will be included in the release.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/release/LibraryWriter.java

    r5549 r5871  
    3939  private final WellCoordinateFormatter colF;
    4040  private final BioPlateType neoPrepType;
     41  private final BioPlateType libType;
     42  private final BioPlateType externalLibType;
    4143 
    4244  public LibraryWriter(DbControl dc, ReleaseWriterOptions options)
     
    4648    this.colF = new WellCoordinateFormatter(false);
    4749    this.neoPrepType = BioplateType.NEOPREP.load(dc);
     50    this.libType = BioplateType.LIBRARY.load(dc);
     51    this.externalLibType = BioplateType.EXTERNAL_LIBRARY.load(dc);
    4852  }
    4953 
     
    8993      BioPlateType libPlateType = libPlate.getBioPlateType();
    9094     
    91       Annotationtype libDateType = neoPrepType.equals(libPlateType) ? Annotationtype.NEOPREP_DATE : Annotationtype.CLEANUP_DATE;
    92  
    93       String libBatch = Reggie.CONVERTER_DATE_TO_STRING.convert((Date)item.getAnnotationValue(libDateType, libPlate));
    94       if (libBatch != null) libBatch += libPlate.getName();
     95      Date libDate = null;
     96      if (neoPrepType.equals(libPlateType))
     97      {
     98        libDate = (Date)item.getAnnotationValue(Annotationtype.NEOPREP_DATE, libPlate);
     99      }
     100      else if (libType.equals(libPlateType))
     101      {
     102        libDate = (Date)item.getAnnotationValue(Annotationtype.CLEANUP_DATE, libPlate);
     103      }
     104      // The plate type can also be 'External library plate',
     105      // but in this case the date we pick the date from event or entry date
     106      if (libDate == null) libDate = libPlate.getEventDate();
     107      if (libDate == null) libDate = libPlate.getEntryDate();
     108      String libBatch = Reggie.CONVERTER_DATE_TO_STRING.convert(libDate) + libPlate.getName();
    95109     
    96110      jsonAnnotations.add(item.createBatchIndexAnnotationJSON("LibBatchNo", libBatch));
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SequencingRunServlet.java

    r5870 r5871  
    915915          }
    916916          Annotationtype.EXTERNAL_OPERATOR.setAnnotationValue(dc, plate, operator);
     917          Annotationtype.PLATE_PROCESS_RESULT.setAnnotationValue(dc, plate, ReactionPlate.PROCESS_SUCCESSFUL);
    917918          String linkSuffix = plateNo == 0 ? "" : "."+(plateNo+1);
    918919          AnyToAny libPlateLink = AnyToAny.getNew(dc, pool, plate, "LibPlate"+linkSuffix, true);
Note: See TracChangeset for help on using the changeset viewer.