Changeset 2088
- Timestamp:
- Oct 18, 2013, 2:29:03 PM (9 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/META-INF/plugin-configurations.xml
r2075 r2088 129 129 <configname>SCAN-B</configname> 130 130 <description>Configuration for the default SCAN-B setup.</description> 131 <parameter> 132 <name>ReadString</name> 133 <label>Read string</label> 134 <description>Pattern describing how each sequencing cycle is used. 135 136 Y = the cycle should be used as part of an insert read 137 N = the cycle should be skipped 138 I = the cycle should be used as part of the index (barcode) 139 J = the cycle is part of the index but should not be used in demultiplexing 140 141 A number means repeat the preceeding letter this many times.</description> 142 <class>java.lang.String</class> 143 <value>Y54N1I6J1Y53N1</value> 144 </parameter> 131 145 <parameter> 132 146 <name>SequencingCenter</name> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/FlowCellSampleSheetExporter.java
r2076 r2088 66 66 The deault read string pattern. 67 67 */ 68 public static final String DEFAULT_READ_STRING = "Y 100N1I6J1Y100N1";68 public static final String DEFAULT_READ_STRING = "Y54N1I6J1Y53N1"; 69 69 70 70 public static final String DEFAULT_PROJECT_NAME = "scanb"; … … 165 165 return; 166 166 } 167 167 String readString = (String)request.getParameterValue("ReadString"); 168 if (!isValidReadString(readString)) 169 { 170 response.setError("Not a valid ReadString: '"+readString + "'", null); 171 return; 172 } 173 174 storeValue(configuration, request, ri.getParameter("ReadString")); 168 175 storeValue(configuration, request, ri.getParameter("Project")); 169 176 storeValue(configuration, request, ri.getParameter("SequencingCenter")); … … 181 188 response.setError(errors.size() + " invalid parameters were found in the request",errors); 182 189 return; 183 } 190 } 191 192 String readString = (String)request.getParameterValue("ReadString"); 193 if (!isValidReadString(readString)) 194 { 195 response.setError("Not a valid ReadString: '"+readString + "'", null); 196 return; 197 } 184 198 185 199 storeValue(job, request, ri.getParameter("flowCell")); 200 storeValue(job, request, ri.getParameter("ReadString")); 186 201 storeValue(job, request, ri.getParameter("Project")); 187 202 storeValue(job, request, ri.getParameter("SequencingCenter")); … … 277 292 { 278 293 dc = sc.newDbControl(); 294 parameters.add(getReadStringParameter(null)); 279 295 parameters.add(getProjectParameter(dc)); 280 296 parameters.add(getSequencingCenterParameter()); … … 304 320 305 321 PhysicalBioAssay currentBioAssay = null; 322 String currentSequencingCycles = null; 306 323 int currentBioAssayId = sc.getCurrentContext(Item.PHYSICALBIOASSAY).getId(); 307 324 if (currentBioAssayId != 0) 308 325 { 309 326 currentBioAssay = PhysicalBioAssay.getById(dc, currentBioAssayId); 327 currentSequencingCycles = (String)Annotationtype.SEQUENCING_CYCLES.getAnnotationValue(dc, currentBioAssay); 310 328 } 311 329 … … 330 348 parameters.add(new PluginParameter<String>(null, "Sample sheet options", 331 349 "The options for the entire sample sheet are defined in the plug-in configuration but can be modified here.", null)); 350 parameters.add(getReadStringParameter(currentSequencingCycles)); 332 351 parameters.add(getProjectParameter(dc)); 333 352 parameters.add(getSequencingCenterParameter()); … … 396 415 // Some info is global on the flow cell 397 416 info[0] = Annotationtype.FLOWCELL_ID.getAnnotationValue(dc, flowCell); // Flow cell ID 398 info[2] = Annotationtype.READ_STRING.getAnnotationValue(dc, flowCell); // Read string417 info[2] = getParameter(parameters, "ReadString", DEFAULT_READ_STRING); // Read string 399 418 info[3] = getParameter(parameters, "Project", projectName); // Project name 400 419 info[9] = getParameter(parameters, "Width", DEFAULT_LIBRARY_WIDTH); // Width … … 511 530 512 531 /** 532 Check that the value is a sequence of Y, N, I, J followed by a number 533 */ 534 private boolean isValidReadString(String value) 535 { 536 return value != null && value.matches("([YNIJ]\\d+)+"); 537 } 538 539 540 /** 513 541 Convert to lower case and remove all characters not in [a-z0-9_] 514 542 */ … … 518 546 } 519 547 548 private PluginParameter<String> getReadStringParameter(String sequencingCycles) 549 { 550 551 PluginParameter<String> parameter = new PluginParameter<String>("ReadString", "Read string", 552 (sequencingCycles != null ? "<b>SequencingCycles for this flow cell: <i>" + sequencingCycles + "</i></b>\n\n" : "") + 553 "Pattern describing how each sequencing cycle is used.\n\n"+ 554 "Y = the cycle should be used as part of an insert read\n"+ 555 "N = the cycle should be skipped\n"+ 556 "I = the cycle should be used as part of the index (barcode)\n"+ 557 "J = the cycle is part of the index but should not be used in demultiplexing\n\n"+ 558 "A number means repeat the preceeding letter this many times.", 559 new StringParameterType(255, DEFAULT_READ_STRING, true) 560 ); 561 return parameter; 562 } 563 564 520 565 private PluginParameter<String> getProjectParameter(DbControl dc) 521 566 {
Note: See TracChangeset
for help on using the changeset viewer.