Changeset 5855
- Timestamp:
- Mar 9, 2020, 2:11:40 PM (3 years ago)
- 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 44 44 */ 45 45 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 46 54 47 55 /** -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/extensions/ReggieSignalHandlerFactory.java
r5475 r5855 9 9 import net.sf.basedb.core.signal.SignalHandler; 10 10 import net.sf.basedb.reggie.ReservedItems; 11 import net.sf.basedb.reggie.dao.FlowCell; 11 12 import net.sf.basedb.util.extensions.ActionFactory; 12 13 import net.sf.basedb.util.extensions.InvokationContext; … … 40 41 LoggerFactory.getLogger(ReggieSignalHandlerFactory.class); 41 42 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 42 71 private final ReservedItems<String> recentlyUsed; 43 72 … … 74 103 75 104 SignalHandler[] handlers = null; 76 if ( "NextSeq".equals(signalType))105 if (FlowCell.FLOW_CELL_TYPE_NEXTSEQ.equals(signalType)) 77 106 { 78 107 handlers = new SignalHandler[] { new NextSeqSignalHandler(job) }; 79 108 } 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)) 81 114 { 82 115 handlers = new SignalHandler[] { new HiSeqSignalHandler(job) }; -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java
r5843 r5855 589 589 jsonChecks.add(checkAnnotationType(dc, Annotationtype.FLOWCELL_ID, 1, null, createIfMissing, effectivePermissionsUse)); 590 590 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), 592 592 createIfMissing, effectivePermissionsUse)); 593 593 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 62 62 import net.sf.basedb.reggie.dao.SequencingRun; 63 63 import net.sf.basedb.reggie.dao.Subtype; 64 import net.sf.basedb.reggie.extensions.HiSeqSignalHandler; 65 import net.sf.basedb.reggie.extensions.NextSeqSignalHandler; 64 import net.sf.basedb.reggie.extensions.ReggieSignalHandlerFactory; 66 65 import net.sf.basedb.reggie.grid.ScriptUtil; 67 66 import net.sf.basedb.util.Values; … … 463 462 job.setExternalId(flowCellBarcode); 464 463 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 } 469 469 470 470 dc.saveItem(job); … … 883 883 String flowCelltype = (String)Annotationtype.FLOWCELL_TYPE.getAnnotationValue(dc, flowCell); 884 884 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 reads885 String flowCellBarcode = (String)Annotationtype.FLOWCELL_ID.getAnnotationValue(dc, flowCell); 886 886 887 887 Date startDate = null; 888 String flowCellBarcode = null;889 888 String hiSeqPosition = "A"; 890 889 String dataFilesFolder = null; 891 890 int runNumber = 0; 892 if ( "HiSeq".equals(flowCelltype))891 if (FlowCell.FLOW_CELL_TYPE_HISEQ.equals(flowCelltype)) 893 892 { 894 893 startDate = Reggie.CONVERTER_STRING_TO_DATE.convert("20"+runParameters.getConfig("Setup/RunStartDate")); 895 894 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); 909 900 runNumber = Values.getInt(runParameters.getConfig("Setup/ScanNumber")); 910 901 dataFilesFolder = runParameters.getConfig("Setup/RunID"); 911 902 hiSeqPosition = runParameters.getConfig("Setup/FCPosition"); 912 903 } 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)) 914 918 { 915 919 startDate = Reggie.CONVERTER_STRING_TO_DATE.convert("20"+runParameters.getConfig("RunStartDate")); 916 920 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); 930 927 runNumber = Values.getInt(runParameters.getConfig("RunNumber")); 931 928 dataFilesFolder = runParameters.getConfig("RunID"); … … 960 957 } 961 958 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 962 968 } 963 969 }
Note: See TracChangeset
for help on using the changeset viewer.