Changeset 2992
- Timestamp:
- Dec 1, 2006, 3:00:14 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 53 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/config/dist/mysql-migration-queries.sql
r2959 r2992 1 1 /* 2 $Id: mysql-migration-queries.sql 2 693 2006-10-03 11:44:54Z nicklas $2 $Id: mysql-migration-queries.sql 2973 2006-11-29 09:24:26Z nicklas $ 3 3 4 4 Copyright (C) Authors contributing to this file. … … 971 971 `flags` 972 972 FROM `RawBioAssayData` 973 WHERE `rawBioAssay` = ? 974 ORDER BY `position` 975 LIMIT ?,?; 973 WHERE `rawBioAssay` = ?; 976 974 977 975 … … 979 977 SELECT `element`, `reporter`, `block`, `numCol`, `numRow`, `x`, `y` 980 978 FROM `RawBioAssayData` 981 WHERE `rawBioAssay` = ? 982 ORDER BY `position` 983 LIMIT ?,?; 979 WHERE `rawBioAssay` = ?; 984 980 985 981 … … 1037 1033 LIMIT ?, ?; 1038 1034 1035 /* getCh1SampleForRawBioAssay */ 1036 SELECT s.`id` FROM `Sample` s 1037 INNER JOIN `Extract` e ON e.`sample` = s.`id` 1038 INNER JOIN `LabeledExtract` le ON le.`extract` = e.`id` 1039 INNER JOIN `HybridizedLabeled` hl ON hl.`labeled` = le.`id` AND hl.`channel` = 1 1040 INNER JOIN `ImageAcquisition` ia ON ia.`hybridization` = hl.`hybridization` 1041 INNER JOIN `RawBioAssay` rba ON rba.`imageAcquisition` = ia.`id` 1042 WHERE rba.`id` = ?; 1039 1043 1040 1044 /* selectRawBioAssaysWithSpotData */ -
trunk/data/plugin_configfile.xml
r2975 r2992 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE configfile SYSTEM "plugin-configuration-file.dtd"><configfile> 2 <!DOCTYPE configfile SYSTEM "plugin-configuration-file.dtd"> 3 <!-- 4 $Id: 5 Copyright (C) Authors contributing to this file. 6 7 This file is part of BASE - BioArray Software Environment. 8 Available at http://base.thep.lu.se/ 9 10 BASE is free software; you can redistribute it and/or 11 modify it under the terms of the GNU General Public License 12 as published by the Free Software Foundation; either version 2 13 of the License, or (at your option) any later version. 14 15 BASE is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 59 Temple Place - Suite 330, 23 Boston, MA 02111-1307, USA. 24 --> 25 <configfile> 3 26 <configuration pluginClassName="net.sf.basedb.plugins.PlateFlatFileImporter"> 4 27 <configname>384_wells plate import</configname> 5 28 <description>This configuration is for the Plate importer plugin when to import 384-well plates.</description> 6 29 <parameter> 7 <name>maxDataColumns</name> 8 <label>Max data columns</label> 9 <description>The maximum number of columns for a line to be counted as a data line, or 0 to allow any number of columns.</description> 10 <class /> 11 <value /> 30 <name>nameColumnMapping</name> 31 <label>nameColumnMapping</label> 32 <class>java.lang.String</class> 33 <value>\384_number\</value> 12 34 </parameter> 13 35 <parameter> 14 36 <name>reporterColumnMapping</name> 15 <label>Reporter ID</label> 16 <description>Mapping that picks the well's reporter id from the data columns. For example: \ID\</description> 37 <label>reporterColumnMapping</label> 17 38 <class>java.lang.String</class> 18 39 <value>\oligo_id\</value> … … 20 41 <parameter> 21 42 <name>dataHeaderRegexp</name> 22 <label>Data header</label> 23 <description>A regular expression that matches the header line just before the data begins. For example: Block\tRow\tColumn.*</description> 43 <label>dataHeaderRegexp</label> 24 44 <class>java.lang.String</class> 25 45 <value>384_number\t384_column\t384_row\t384_position\toligo_id.*</value> 26 46 </parameter> 27 47 <parameter> 28 <name>barcodeColumnMapping</name>29 <label>Plate barcode</label>30 <description>Mapping that picks the plate barcode from the data columns. For example: \Barcode\</description>31 <class />32 <value />33 </parameter>34 <parameter>35 <name>trimQuotes</name>36 <label>Remove quotes</label>37 <description>If true quotes (" or ') around data value will be removed.</description>38 <class>java.lang.Boolean</class>39 <value>true</value>40 </parameter>41 <parameter>42 48 <name>dataSplitterRegexp</name> 43 <label>Data splitter</label> 44 <description>A regular expression that splits each data line into individual columns. For example, split on tabs: \t</description> 49 <label>dataSplitterRegexp</label> 45 50 <class>java.lang.String</class> 46 51 <value>\t</value> 47 52 </parameter> 48 53 <parameter> 49 <name>charset</name>50 <label>Character set</label>51 <description>The character set used in the file, if not specified the default character set is used (ISO-8859-1).</description>52 <class>java.lang.String</class>53 <value>ISO-8859-1</value>54 </parameter>55 <parameter>56 54 <name>columnColumnMapping</name> 57 <label>Column</label> 58 <description>Mapping that picks the well's column in the plate from the data columns. For example: \Column\</description> 55 <label>columnColumnMapping</label> 59 56 <class>java.lang.String</class> 60 57 <value>\384_column\</value> 61 58 </parameter> 62 59 <parameter> 63 <name>nameColumnMapping</name>64 <label>Plate number/name</label>65 <description>Mapping that picks the plate name from the data columns. For example: \Plate\</description>66 <class>java.lang.String</class>67 <value>\384_number\</value>68 </parameter>69 <parameter>70 <name>minDataColumns</name>71 <label>Min data columns</label>72 <description>The minimum number of columns for a line to be counted as a data line.</description>73 <class />74 <value />75 </parameter>76 <parameter>77 <name>ignoreRegexp</name>78 <label>Ignore</label>79 <description>A regular expression that matches any line that should be ignored. For example, ignore lines starting with #: ^#.*</description>80 <class />81 <value />82 </parameter>83 <parameter>84 <name>dataFooterRegexp</name>85 <label>Data footer</label>86 <description>A regular expression that matches the first line of non-data after the data lines. For example: __END_OF_DATA__</description>87 <class />88 <value />89 </parameter>90 <parameter>91 <name>headerRegexp</name>92 <label>Header</label>93 <description>A regular expression that matches a header line and extracts the name and a value parts. For example, split on equal symbol: (.+)=(.*)</description>94 <class />95 <value />96 </parameter>97 <parameter>98 60 <name>rowColumnMapping</name> 99 <label>Row</label> 100 <description>Mapping that picks the well's row in the plate from the data columns. For example: \Row\</description> 61 <label>rowColumnMapping</label> 101 62 <class>java.lang.String</class> 102 63 <value>\384_row\</value> … … 107 68 <description>This configuration is for importing reporters from the same text file as 384well plates are imported from.</description> 108 69 <parameter> 109 <name>maxDataColumns</name>110 <label>Max data columns</label>111 <description>The maximum number of columns for a line to be counted as a data line, or 0 to allow any number of columns.</description>112 <class />113 <value />114 </parameter>115 <parameter>116 <name>extendedColumnMapping.locusLink</name>117 <label>LocusLink</label>118 <description />119 <class />120 <value />121 </parameter>122 <parameter>123 <name>trimQuotes</name>124 <label>Remove quotes</label>125 <description>If true quotes (" or ') around data value will be removed.</description>126 <class>java.lang.Boolean</class>127 <value>true</value>128 </parameter>129 <parameter>130 <name>charset</name>131 <label>Character set</label>132 <description>The character set used in the file, if not specified the default character set is used (ISO-8859-1).</description>133 <class>java.lang.String</class>134 <value>ISO-8859-1</value>135 </parameter>136 <parameter>137 <name>scoreColumnMapping</name>138 <label>Score</label>139 <description>Mapping that picks the reporter's score in some context. This mapping is only used when importing to a reporter list.</description>140 <class />141 <value />142 </parameter>143 <parameter>144 70 <name>nameColumnMapping</name> 145 <label>Name</label> 146 <description>Mapping that picks the reporter's name from the data columns. For example: \Name\</description> 71 <label>nameColumnMapping</label> 147 72 <class>java.lang.String</class> 148 73 <value>\oligo_id\</value> 149 74 </parameter> 150 75 <parameter> 151 <name>extendedColumnMapping.markers</name> 152 <label>Markers</label> 153 <description /> 154 <class /> 155 <value /> 156 </parameter> 157 <parameter> 158 <name>extendedColumnMapping.vector</name> 159 <label>Vector</label> 160 <description>The vector from which the reporter is derived</description> 161 <class /> 162 <value /> 163 </parameter> 164 <parameter> 165 <name>extendedColumnMapping.nid</name> 166 <label>NID</label> 167 <description /> 168 <class /> 169 <value /> 76 <name>dataHeaderRegexp</name> 77 <label>dataHeaderRegexp</label> 78 <class>java.lang.String</class> 79 <value>384_number\t384_column\t384_row\t384_position\toligo_id.*</value> 80 </parameter> 81 <parameter> 82 <name>dataSplitterRegexp</name> 83 <label>dataSplitterRegexp</label> 84 <class>java.lang.String</class> 85 <value>\t</value> 170 86 </parameter> 171 87 <parameter> 172 88 <name>descriptionColumnMapping</name> 173 <label>Description</label> 174 <description>Mapping that picks the reporter's description from the data columns. For example: \Description\</description> 89 <label>descriptionColumnMapping</label> 175 90 <class>java.lang.String</class> 176 91 <value>\description_Ensembl*\</value> 177 92 </parameter> 178 93 <parameter> 179 <name>headerRegexp</name> 180 <label>Header</label> 181 <description>A regular expression that matches a header line and extracts the name and a value parts. For example, split on equal symbol: (.+)=(.*)</description> 182 <class /> 183 <value /> 94 <name>symbolColumnMapping</name> 95 <label>symbolColumnMapping</label> 96 <class>java.lang.String</class> 97 <value>\gene_symbol_Ensembl*\</value> 184 98 </parameter> 185 99 <parameter> 186 100 <name>reporterIdColumnMapping</name> 187 <label>Reporter ID</label> 188 <description>Mapping that picks the reporter's ID from the data columns. For example: \ID\</description> 101 <label>reporterIdColumnMapping</label> 189 102 <class>java.lang.String</class> 190 103 <value>\oligo_id\</value> 191 104 </parameter> 192 105 <parameter> 193 <name>symbolColumnMapping</name>194 <label>Gene symbol</label>195 <description>Mapping that picks the reporter's gene symbol from the data columns. For example: \Gene symbol\</description>196 <class>java.lang.String</class>197 <value>\gene_symbol_Ensembl*\</value>198 </parameter>199 <parameter>200 <name>extendedColumnMapping.antibiotics</name>201 <label>Antibiotics</label>202 <description />203 <class />204 <value />205 </parameter>206 <parameter>207 <name>extendedColumnMapping.omim</name>208 <label>OMIM</label>209 <description />210 <class />211 <value />212 </parameter>213 <parameter>214 <name>extendedColumnMapping.chromosome</name>215 <label>Chromosome</label>216 <description>The chromosome from which the reporter is derived</description>217 <class />218 <value />219 </parameter>220 <parameter>221 <name>reporterType</name>222 <label>Reporter type</label>223 <description>The reporter type assigned to the imported reporters</description>224 <class />225 <value />226 </parameter>227 <parameter>228 <name>dataHeaderRegexp</name>229 <label>Data header</label>230 <description>A regular expression that matches the header line just before the data begins. For example: Block\tRow\tColumn.*</description>231 <class>java.lang.String</class>232 <value>384_number\t384_column\t384_row\t384_position\toligo_id.*</value>233 </parameter>234 <parameter>235 <name>dataSplitterRegexp</name>236 <label>Data splitter</label>237 <description>A regular expression that splits each data line into individual columns. For example, split on tabs: \t</description>238 <class>java.lang.String</class>239 <value>\t</value>240 </parameter>241 <parameter>242 <name>extendedColumnMapping.length</name>243 <label>Length</label>244 <description>The length of the sequence</description>245 <class />246 <value />247 </parameter>248 <parameter>249 <name>extendedColumnMapping.tissue</name>250 <label>Tissue</label>251 <description>The tissue from which the reporter is derived</description>252 <class />253 <value />254 </parameter>255 <parameter>256 <name>extendedColumnMapping.accession</name>257 <label>Accession</label>258 <description />259 <class />260 <value />261 </parameter>262 <parameter>263 <name>minDataColumns</name>264 <label>Min data columns</label>265 <description>The minimum number of columns for a line to be counted as a data line.</description>266 <class />267 <value />268 </parameter>269 <parameter>270 <name>ignoreRegexp</name>271 <label>Ignore</label>272 <description>A regular expression that matches any line that should be ignored. For example, ignore lines starting with #: ^#.*</description>273 <class />274 <value />275 </parameter>276 <parameter>277 <name>reporterTypeColumnMapping</name>278 <label>Reporter type</label>279 <description>Mapping that pick the reporter's type from the data columns. This will overide the reporter type parameter. For example: \Reporter type\</description>280 <class />281 <value />282 </parameter>283 <parameter>284 <name>extendedColumnMapping.library</name>285 <label>Library</label>286 <description>The library from which the reporter is derived</description>287 <class />288 <value />289 </parameter>290 <parameter>291 <name>extendedColumnMapping.clusterId</name>292 <label>Cluster ID</label>293 <description>A unique identifier for a Unigene entry</description>294 <class />295 <value />296 </parameter>297 <parameter>298 <name>dataFooterRegexp</name>299 <label>Data footer</label>300 <description>A regular expression that matches the first line of non-data after the data lines. For example: __END_OF_DATA__</description>301 <class />302 <value />303 </parameter>304 <parameter>305 <name>extendedColumnMapping.cytoband</name>306 <label>Cytoband</label>307 <description>The cytoband from which the reporter is derived</description>308 <class />309 <value />310 </parameter>311 <parameter>312 106 <name>extendedColumnMapping.sequence</name> 313 <label>Sequence</label> 314 <description>The nucleotide sequence of the reporter</description> 107 <label>extendedColumnMapping.sequence</label> 315 108 <class>java.lang.String</class> 316 109 <value>\oligo_sequence\</value> 317 </parameter>318 <parameter>319 <name>extendedColumnMapping.species</name>320 <label>Species</label>321 <description>The organism from which the reporter is derived</description>322 <class />323 <value />324 110 </parameter> 325 111 </configuration> … … 330 116 <name>maxDataColumns</name> 331 117 <label>Max data columns</label> 332 <description>The maximum number of columns for a line to be counted as a data line, or 0 to allow any number of columns.</description>333 118 <class /> 334 119 <value /> … … 337 122 <name>extendedColumnMapping.locusLink</name> 338 123 <label>LocusLink</label> 339 <description />340 124 <class /> 341 125 <value /> … … 344 128 <name>trimQuotes</name> 345 129 <label>Remove quotes</label> 346 <description>If true quotes (" or ') around data value will be removed.</description>347 130 <class>java.lang.Boolean</class> 348 131 <value>true</value> 349 132 </parameter> 350 133 <parameter> 351 <name>charset</name>352 <label>Character set</label>353 <description>The character set used in the file, if not specified the default character set is used (ISO-8859-1).</description>354 <class>java.lang.String</class>355 <value>ISO-8859-1</value>356 </parameter>357 <parameter>358 134 <name>scoreColumnMapping</name> 359 135 <label>Score</label> 360 <description>Mapping that picks the reporter's score in some context. This mapping is only used when importing to a reporter list.</description>361 136 <class /> 362 137 <value /> … … 365 140 <name>nameColumnMapping</name> 366 141 <label>Name</label> 367 <description>Mapping that picks the reporter's name from the data columns. For example: \Name\</description>368 142 <class>java.lang.String</class> 369 143 <value>\Name\</value> … … 372 146 <name>extendedColumnMapping.markers</name> 373 147 <label>Markers</label> 374 <description />375 148 <class /> 376 149 <value /> … … 379 152 <name>extendedColumnMapping.vector</name> 380 153 <label>Vector</label> 381 <description>The vector from which the reporter is derived</description>382 154 <class /> 383 155 <value /> … … 386 158 <name>extendedColumnMapping.nid</name> 387 159 <label>NID</label> 388 <description />389 160 <class /> 390 161 <value /> … … 393 164 <name>descriptionColumnMapping</name> 394 165 <label>Description</label> 395 <description>Mapping that picks the reporter's description from the data columns. For example: \Description\</description>396 166 <class /> 397 167 <value /> … … 400 170 <name>headerRegexp</name> 401 171 <label>Header</label> 402 <description>A regular expression that matches a header line and extracts the name and a value parts. For example, split on equal symbol: (.+)=(.*)</description>403 172 <class /> 404 173 <value /> … … 407 176 <name>reporterIdColumnMapping</name> 408 177 <label>Reporter ID</label> 409 <description>Mapping that picks the reporter's ID from the data columns. For example: \ID\</description>410 178 <class>java.lang.String</class> 411 179 <value>\ID\</value> … … 414 182 <name>symbolColumnMapping</name> 415 183 <label>Gene symbol</label> 416 <description>Mapping that picks the reporter's gene symbol from the data columns. For example: \Gene symbol\</description>417 184 <class /> 418 185 <value /> … … 421 188 <name>extendedColumnMapping.antibiotics</name> 422 189 <label>Antibiotics</label> 423 <description /> 190 <class /> 191 <value /> 192 </parameter> 193 <parameter> 194 <name>extendedColumnMapping.chromosome</name> 195 <label>Chromosome</label> 196 <class /> 197 <value /> 198 </parameter> 199 <parameter> 200 <name>reporterType</name> 201 <label>Reporter type</label> 424 202 <class /> 425 203 <value /> … … 428 206 <name>extendedColumnMapping.omim</name> 429 207 <label>OMIM</label> 430 <description />431 <class />432 <value />433 </parameter>434 <parameter>435 <name>extendedColumnMapping.chromosome</name>436 <label>Chromosome</label>437 <description>The chromosome from which the reporter is derived</description>438 <class />439 <value />440 </parameter>441 <parameter>442 <name>reporterType</name>443 <label>Reporter type</label>444 <description>The reporter type assigned to the imported reporters</description>445 208 <class /> 446 209 <value /> … … 449 212 <name>dataHeaderRegexp</name> 450 213 <label>Data header</label> 451 <description>A regular expression that matches the header line just before the data begins. For example: Block\tRow\tColumn.*</description>452 214 <class>java.lang.String</class> 453 215 <value>"Block"\t"Column"\t"Row"\t"Name"\t"ID".*</value> … … 456 218 <name>dataSplitterRegexp</name> 457 219 <label>Data splitter</label> 458 <description>A regular expression that splits each data line into individual columns. For example, split on tabs: \t</description>459 220 <class>java.lang.String</class> 460 221 <value>\t</value> … … 463 224 <name>extendedColumnMapping.length</name> 464 225 <label>Length</label> 465 <description>The length of the sequence</description>466 226 <class /> 467 227 <value /> … … 470 230 <name>extendedColumnMapping.tissue</name> 471 231 <label>Tissue</label> 472 <description>The tissue from which the reporter is derived</description>473 232 <class /> 474 233 <value /> … … 477 236 <name>extendedColumnMapping.accession</name> 478 237 <label>Accession</label> 479 <description />480 238 <class /> 481 239 <value /> … … 484 242 <name>minDataColumns</name> 485 243 <label>Min data columns</label> 486 <description>The minimum number of columns for a line to be counted as a data line.</description>487 244 <class /> 488 245 <value /> … … 491 248 <name>ignoreRegexp</name> 492 249 <label>Ignore</label> 493 <description>A regular expression that matches any line that should be ignored. For example, ignore lines starting with #: ^#.*</description>494 <class />495 <value />496 </parameter>497 <parameter>498 <name>reporterTypeColumnMapping</name>499 <label>Reporter type</label>500 <description>Mapping that pick the reporter's type from the data columns. This will overide the reporter type parameter. For example: \Reporter type\</description>501 250 <class /> 502 251 <value /> … … 505 254 <name>extendedColumnMapping.library</name> 506 255 <label>Library</label> 507 <description>The library from which the reporter is derived</description>508 256 <class /> 509 257 <value /> … … 512 260 <name>extendedColumnMapping.clusterId</name> 513 261 <label>Cluster ID</label> 514 <description>A unique identifier for a Unigene entry</description>515 262 <class /> 516 263 <value /> … … 519 266 <name>dataFooterRegexp</name> 520 267 <label>Data footer</label> 521 <description>A regular expression that matches the first line of non-data after the data lines. For example: __END_OF_DATA__</description> 268 <class /> 269 <value /> 270 </parameter> 271 <parameter> 272 <name>extendedColumnMapping.sequence</name> 273 <label>Sequence</label> 274 <class /> 275 <value /> 276 </parameter> 277 <parameter> 278 <name>extendedColumnMapping.species</name> 279 <label>Species</label> 522 280 <class /> 523 281 <value /> … … 526 284 <name>extendedColumnMapping.cytoband</name> 527 285 <label>Cytoband</label> 528 <description>The cytoband from which the reporter is derived</description>529 <class />530 <value />531 </parameter>532 <parameter>533 <name>extendedColumnMapping.sequence</name>534 <label>Sequence</label>535 <description>The nucleotide sequence of the reporter</description>536 <class />537 <value />538 </parameter>539 <parameter>540 <name>extendedColumnMapping.species</name>541 <label>Species</label>542 <description>The organism from which the reporter is derived</description>543 286 <class /> 544 287 <value /> … … 550 293 Block mapping is used in this configuration.</description> 551 294 <parameter> 552 <name>maxDataColumns</name>553 <label>Max data columns</label>554 <description>The maximum number of columns for a line to be counted as a data line, or 0 to allow any number of columns.</description>555 <class />556 <value />557 </parameter>558 <parameter>559 295 <name>dataHeaderRegexp</name> 560 <label>Data header</label> 561 <description>A regular expression that matches the header line just before the data begins. For example: Block\tRow\tColumn.*</description> 296 <label>dataHeaderRegexp</label> 562 297 <class>java.lang.String</class> 563 298 <value>"Block"\t"Column"\t"Row"\t"Name"\t"ID".*</value> 564 299 </parameter> 565 300 <parameter> 566 <name>trimQuotes</name>567 <label>Remove quotes</label>568 <description>If true quotes (" or ') around data value will be removed.</description>569 <class>java.lang.Boolean</class>570 <value>true</value>571 </parameter>572 <parameter>573 301 <name>dataSplitterRegexp</name> 574 <label>Data splitter</label> 575 <description>A regular expression that splits each data line into individual columns. For example, split on tabs: \t</description> 302 <label>dataSplitterRegexp</label> 576 303 <class>java.lang.String</class> 577 304 <value>\t</value> 578 305 </parameter> 579 306 <parameter> 580 <name>charset</name>581 <label>Character set</label>582 <description>The character set used in the file, if not specified the default character set is used (ISO-8859-1).</description>583 <class>java.lang.String</class>584 <value>ISO-8859-1</value>585 </parameter>586 <parameter>587 307 <name>columnColumnMapping</name> 588 <label>Column</label> 589 <description>Mapping that picks the feature's column position in a block from the data columns. For example: \Column\</description> 308 <label>columnColumnMapping</label> 590 309 <class>java.lang.String</class> 591 310 <value>\Column\</value> 592 311 </parameter> 593 312 <parameter> 594 <name>metaGridXColumnMapping</name>595 <label>Meta grid X</label>596 <description>Mapping that picks the feature's meta grid X coordinate from the data columns. Required if you don't specify a block mapping. Example: \Meta grid X\</description>597 <class />598 <value />599 </parameter>600 <parameter>601 <name>metaGridYColumnMapping</name>602 <label>Meta grid Y</label>603 <description>Mapping that picks the feature's meta grid Y coordinate from the data columns. Required if you don't specify a block mapping. Example: \Meta grid Y\</description>604 <class />605 <value />606 </parameter>607 <parameter>608 <name>minDataColumns</name>609 <label>Min data columns</label>610 <description>The minimum number of columns for a line to be counted as a data line.</description>611 <class />612 <value />613 </parameter>614 <parameter>615 <name>ignoreRegexp</name>616 <label>Ignore</label>617 <description>A regular expression that matches any line that should be ignored. For example, ignore lines starting with #: ^#.*</description>618 <class />619 <value />620 </parameter>621 <parameter>622 <name>dataFooterRegexp</name>623 <label>Data footer</label>624 <description>A regular expression that matches the first line of non-data after the data lines. For example: __END_OF_DATA__</description>625 <class />626 <value />627 </parameter>628 <parameter>629 313 <name>reporterIdColumnMapping</name> 630 <label>Reporter ID</label> 631 <description>Mapping that picks the reporter's ID from the data columns. For example: \ID\</description> 314 <label>reporterIdColumnMapping</label> 632 315 <class>java.lang.String</class> 633 316 <value>\ID\</value> 634 317 </parameter> 635 318 <parameter> 636 <name>headerRegexp</name>637 <label>Header</label>638 <description>A regular expression that matches a header line and extracts the name and a value parts. For example, split on equal symbol: (.+)=(.*)</description>639 <class />640 <value />641 </parameter>642 <parameter>643 319 <name>blockColumnMapping</name> 644 <label>Block</label> 645 <description>Mapping that picks the feature's block number from the data columns. You must specify either this mapping or mappings for the meta coordinates. Example: \Block\</description> 320 <label>blockColumnMapping</label> 646 321 <class>java.lang.String</class> 647 322 <value>\Block\</value> … … 649 324 <parameter> 650 325 <name>rowColumnMapping</name> 651 <label>Row</label> 652 <description>Mapping that picks the feature's row position in a block from the data columns. For example: \Row\</description> 326 <label>rowColumnMapping</label> 653 327 <class>java.lang.String</class> 654 328 <value>\Row\</value> … … 662 336 <name>yColumnMapping</name> 663 337 <label>Y</label> 664 <description>Mapping that picks the spot's physical Y coordinate from the data columns. For example: \Y\</description>665 338 <class>java.lang.String</class> 666 339 <value>\Y\</value> 667 340 </parameter> 668 341 <parameter> 669 <name>maxDataColumns</name> 670 <label>Max data columns</label> 671 <description>The maximum number of columns for a line to be counted as a data line, or 0 to allow any number of columns.</description> 672 <class /> 673 <value /> 342 <name>propertyMapping.ch2BgMean</name> 343 <label>Channel 2 background mean</label> 344 <class>java.lang.String</class> 345 <value>\B532 Mean\</value> 674 346 </parameter> 675 347 <parameter> 676 348 <name>propertyMapping.flags</name> 677 349 <label>Flags</label> 678 <description>Flags</description>679 350 <class>java.lang.String</class> 680 351 <value>\Flags\</value> 681 </parameter>682 <parameter>683 <name>propertyMapping.ch2BgMean</name>684 <label>Channel 2 background mean</label>685 <description>The mean of the background intensity in channel 2</description>686 <class>java.lang.String</class>687 <value>\B532 Mean\</value>688 352 </parameter> 689 353 <parameter> 690 354 <name>propertyMapping.mValue</name> 691 355 <label>M value</label> 692 <description>M value</description> 693 <class>java.lang.String</class> 694 <value>\Log Ratio (635/532)\</value> 356 <class>java.lang.String</class> 357 <value>\Log Ratio (532/635)\</value> 695 358 </parameter> 696 359 <parameter> 697 360 <name>trimQuotes</name> 698 361 <label>Remove quotes</label> 699 <description>If true quotes (" or ') around data value will be removed.</description>700 362 <class>java.lang.Boolean</class> 701 363 <value>true</value> 702 364 </parameter> 703 365 <parameter> 704 <name>charset</name>705 <label>Character set</label>706 <description>The character set used in the file, if not specified the default character set is used (ISO-8859-1).</description>707 <class>java.lang.String</class>708 <value>ISO-8859-1</value>709 </parameter>710 <parameter>711 366 <name>propertyMapping.diameter</name> 712 367 <label>Spot diameter</label> 713 <description>The diameter of the spot in pixels</description>714 368 <class>java.lang.String</class> 715 369 <value>\Dia.\</value> … … 718 372 <name>propertyMapping.ch2PercSat</name> 719 373 <label>Percent saturated pixels</label> 720 <description>Percentage of saturated pixels in channel 2</description>721 374 <class>java.lang.String</class> 722 375 <value>\F532 % Sat.\</value> … … 725 378 <name>propertyMapping.ch1FgSd</name> 726 379 <label>Channel 1 foreground standard deviation</label> 727 <description>The standard deviation of the foreground intensity in channel 1</description>728 380 <class>java.lang.String</class> 729 381 <value>\F635 SD\</value> … … 732 384 <name>propertyMapping.ch2PercSd1</name> 733 385 <label>Percent pixels within 1 standard deviation</label> 734 <description>Percentage of pixels within 1 standard deviation in channel 2</description>735 386 <class>java.lang.String</class> 736 387 <value>\% > B532+1SD\</value> … … 739 390 <name>propertyMapping.fgPixels</name> 740 391 <label>Foreground pixels</label> 741 <description>Number of foreground pixels</description>742 392 <class>java.lang.String</class> 743 393 <value>\F Pixels\</value> … … 746 396 <name>propertyMapping.ch2FgSd</name> 747 397 <label>Channel 2 foreground standard deviation</label> 748 <description>The standard deviation of the foreground intensity in channel 2</description>749 398 <class>java.lang.String</class> 750 399 <value>\F532 SD\</value> … … 753 402 <name>propertyMapping.ch2BgSd</name> 754 403 <label>Channel 2 background standard deviation</label> 755 <description>The standard deviation of the background intensity in channel 2</description>756 404 <class>java.lang.String</class> 757 405 <value>\B532 SD\</value> 406 </parameter> 407 <parameter> 408 <name>headerRegexp</name> 409 <label>Header</label> 410 <class>java.lang.String</class> 411 <value>"(.+)=(.*)"</value> 758 412 </parameter> 759 413 <parameter> 760 414 <name>reporterIdColumnMapping</name> 761 415 <label>Reporter ID</label> 762 <description>Mapping that picks the spot's reporter from the data columns. For example: \ID\</description>763 416 <class>java.lang.String</class> 764 417 <value>\ID\</value> 765 </parameter>766 <parameter>767 <name>headerRegexp</name>768 <label>Header</label>769 <description>A regular expression that matches a header line and extracts the name and a value parts. For example, split on equal symbol: (.+)=(.*)</description>770 <class>java.lang.String</class>771 <value>"(.+)=(.*)"</value>772 418 </parameter> 773 419 <parameter> 774 420 <name>propertyMapping.ch1FgMedian</name> 775 421 <label>Channel 1 foreground median</label> 776 <description>The median of the foreground intensity in channel 1</description>777 422 <class>java.lang.String</class> 778 423 <value>\F635 Median\</value> … … 781 426 <name>propertyMapping.ch1BgMean</name> 782 427 <label>Channel 1 background mean</label> 783 <description>The mean of the background intensity in channel 1</description>784 428 <class>java.lang.String</class> 785 429 <value>\B635 Mean\</value> 430 </parameter> 431 <parameter> 432 <name>propertyMapping.ch2BgMedian</name> 433 <label>Channel 2 background median</label> 434 <class>java.lang.String</class> 435 <value>\B532 Median\</value> 786 436 </parameter> 787 437 <parameter> 788 438 <name>rowColumnMapping</name> 789 439 <label>Row</label> 790 <description>Mapping that picks the spot's row in the block from the data columns. For example: \Row\</description>791 440 <class>java.lang.String</class> 792 441 <value>\Row\</value> 793 </parameter>794 <parameter>795 <name>propertyMapping.ch2BgMedian</name>796 <label>Channel 2 background median</label>797 <description>The median of the background intensity in channel 2</description>798 <class>java.lang.String</class>799 <value>\B532 Median\</value>800 442 </parameter> 801 443 <parameter> 802 444 <name>propertyMapping.ch1BgMedian</name> 803 445 <label>Channel 1 background median</label> 804 <description>The median of the background intensity in channel 1</description>805 446 <class>java.lang.String</class> 806 447 <value>\B635 Median\</value> … … 809 450 <name>propertyMapping.ch2FgMean</name> 810 451 <label>Channel 2 foreground mean</label> 811 <description>The mean of the foreground intensity in channel 2</description>812 452 <class>java.lang.String</class> 813 453 <value>\F532 Mean\</value> … … 816 456 <name>propertyMapping.rgnR2</name> 817 457 <label>Rgn R2</label> 818 <description>Rgn R2</description>819 458 <class>java.lang.String</class> 820 459 <value>\Rgn R² (635/532)\</value> … … 823 462 <name>dataHeaderRegexp</name> 824 463 <label>Data header</label> 825 <description>A regular expression that matches the header line just before the data begins. For example: Block\tRow\tColumn.*</description> 826 <class>java.lang.String</class> 827 <value>"Block"\t"Column"\t"Row"\t"Name"\t"ID".*"Ratio of Medians \(635\/532\)".*</value> 464 <class>java.lang.String</class> 465 <value>"Block"\t"Column"\t"Row"\t"Name"\t"ID".*"Ratio of Medians \(532\/635\)".*</value> 466 </parameter> 467 <parameter> 468 <name>propertyMapping.ratiosSd</name> 469 <label>Standard deviation of ratios</label> 470 <class>java.lang.String</class> 471 <value>\Ratios SD (532/635)\</value> 828 472 </parameter> 829 473 <parameter> 830 474 <name>propertyMapping.ch2FgMedian</name> 831 475 <label>Channel 2 foreground median</label> 832 <description>The median of the foreground intensity in channel 2</description>833 476 <class>java.lang.String</class> 834 477 <value>\F532 Median\</value> 835 </parameter>836 <parameter>837 <name>propertyMapping.ratiosSd</name>838 <label>Standard deviation of ratios</label>839 <description>Standard deviation of the intensity ratios for all pixels</description>840 <class>java.lang.String</class>841 <value>\Ratios SD (635/532)\</value>842 478 </parameter> 843 479 <parameter> 844 480 <name>propertyMapping.ch1PercSat</name> 845 481 <label>Percent saturated pixels</label> 846 <description>Percentage of saturated pixels in channel 1</description>847 482 <class>java.lang.String</class> 848 483 <value>\F635 % Sat.\</value> … … 851 486 <name>dataSplitterRegexp</name> 852 487 <label>Data splitter</label> 853 <description>A regular expression that splits each data line into individual columns. For example, split on tabs: \t</description>854 488 <class>java.lang.String</class> 855 489 <value>\t</value> … … 858 492 <name>columnColumnMapping</name> 859 493 <label>Column</label> 860 <description>Mapping that picks the spot's column in the block from the data columns. For example: \Column\</description>861 494 <class>java.lang.String</class> 862 495 <value>\Column\</value> … … 865 498 <name>propertyMapping.bgPixels</name> 866 499 <label>Background pixels</label> 867 <description>Number of background pixels</description>868 500 <class>java.lang.String</class> 869 501 <value>\B Pixels\</value> … … 872 504 <name>propertyMapping.ch1PercSd2</name> 873 505 <label>Percent pixels within 2 standard deviations</label> 874 <description>Percentage of pixels within 2 standard deviations in channel 1</description>875 506 <class>java.lang.String</class> 876 507 <value>\% > B635+2SD\</value> 877 </parameter>878 <parameter>879 <name>metaGridXColumnMapping</name>880 <label>MetaGridX</label>881 <description>Mapping that picks the spot's meta-Grid X-axis from the data columns. For example: \Meta grid X\</description>882 <class />883 <value />884 508 </parameter> 885 509 <parameter> 886 510 <name>propertyMapping.ch1FgMean</name> 887 511 <label>Channel 1 foreground mean</label> 888 <description>The mean of the foreground intensity in channel 1</description>889 512 <class>java.lang.String</class> 890 513 <value>\F635 Mean\</value> … … 893 516 <name>xColumnMapping</name> 894 517 <label>X</label> 895 <description>Mapping that picks the spot's physical X coordinate from the data columns. For example: \X\</description>896 518 <class>java.lang.String</class> 897 519 <value>\X\</value> 898 </parameter>899 <parameter>900 <name>metaGridYColumnMapping</name>901 <label>MetaGridY</label>902 <description>Mapping that picks the spot's meta-Grid Y-axis from the data columns. For example: \Meta grid Y\</description>903 <class />904 <value />905 520 </parameter> 906 521 <parameter> 907 522 <name>propertyMapping.ch1BgSd</name> 908 523 <label>Channel 1 background standard deviation</label> 909 <description>The standard deviation of the background intensity in channel 1</description>910 524 <class>java.lang.String</class> 911 525 <value>\B635 SD\</value> 912 </parameter>913 <parameter>914 <name>minDataColumns</name>915 <label>Min data columns</label>916 <description>The minimum number of columns for a line to be counted as a data line.</description>917 <class />918 <value />919 526 </parameter> 920 527 <parameter> 921 528 <name>propertyMapping.rgnRatio</name> 922 529 <label>Rgn ratio</label> 923 <description>Rgn ratio</description>924 530 <class>java.lang.String</class> 925 531 <value>\Rgn Ratio (635/532)\</value> 926 </parameter>927 <parameter>928 <name>ignoreRegexp</name>929 <label>Ignore</label>930 <description>A regular expression that matches any line that should be ignored. For example, ignore lines starting with #: ^#.*</description>931 <class />932 <value />933 </parameter>934 <parameter>935 <name>propertyMapping.CV</name>936 <label>CV</label>937 <description>CV</description>938 <class />939 <value />940 532 </parameter> 941 533 <parameter> 942 534 <name>propertyMapping.ch1PercSd1</name> 943 535 <label>Percent pixels within 1 standard deviation</label> 944 <description>Percentage of pixels within 1 standard deviation in channel 1</description>945 536 <class>java.lang.String</class> 946 537 <value>\% > B635+1SD\</value> … … 949 540 <name>rawDataType</name> 950 541 <label>Raw data type</label> 951 <description>The type of raw data that this importer will import.</description>952 542 <class>java.lang.String</class> 953 543 <value>genepix</value> 954 </parameter>955 <parameter>956 <name>dataFooterRegexp</name>957 <label>Data footer</label>958 <description>A regular expression that matches the first line of non-data after the data lines. For example: __END_OF_DATA__</description>959 <class />960 <value />961 544 </parameter> 962 545 <parameter> 963 546 <name>propertyMapping.ch2PercSd2</name> 964 547 <label>Percent pixels within 2 standard deviations</label> 965 <description>Percentage of pixels within 2 standard deviations in channel 2</description>966 548 <class>java.lang.String</class> 967 549 <value>\% > B532+2SD\</value> … … 970 552 <name>blockColumnMapping</name> 971 553 <label>Block</label> 972 <description>Mapping that picks the spot's block from the data columns. For example: \Block\</description>973 554 <class>java.lang.String</class> 974 555 <value>\Block\</value> … … 982 563 <name>yColumnMapping</name> 983 564 <label>Y</label> 984 <description>Mapping that picks the spot's physical Y coordinate from the data columns. For example: \Y\</description>985 565 <class>java.lang.String</class> 986 566 <value>\Y\</value> 987 </parameter>988 <parameter>989 <name>maxDataColumns</name>990 <label>Max data columns</label>991 <description>The maximum number of columns for a line to be counted as a data line, or 0 to allow any number of columns.</description>992 <class />993 <value />994 567 </parameter> 995 568 <parameter> 996 569 <name>propertyMapping.ch2BgMean</name> 997 570 <label>Channel 2 background mean</label> 998 <description>The mean of the background intensity in channel 2</description>999 571 <class>java.lang.String</class> 1000 572 <value>\B635 Mean\</value> … … 1003 575 <name>propertyMapping.flags</name> 1004 576 <label>Flags</label> 1005 <description>Flags</description>1006 577 <class>java.lang.String</class> 1007 578 <value>\Flags\</value> … … 1010 581 <name>propertyMapping.mValue</name> 1011 582 <label>M value</label> 1012 <description>M value</description>1013 583 <class>java.lang.String</class> 1014 584 <value>\Log Ratio (532/635)\</value> … … 1017 587 <name>trimQuotes</name> 1018 588 <label>Remove quotes</label> 1019 <description>If true quotes (" or ') around data value will be removed.</description>1020 589 <class>java.lang.Boolean</class> 1021 590 <value>true</value> 1022 591 </parameter> 1023 592 <parameter> 1024 <name>charset</name>1025 <label>Character set</label>1026 <description>The character set used in the file, if not specified the default character set is used (ISO-8859-1).</description>1027 <class>java.lang.String</class>1028 <value>ISO-8859-1</value>1029 </parameter>1030 <parameter>1031 593 <name>propertyMapping.diameter</name> 1032 594 <label>Spot diameter</label> 1033 <description>The diameter of the spot in pixels</description>1034 595 <class>java.lang.String</class> 1035 596 <value>\Dia.\</value> … … 1038 599 <name>propertyMapping.ch2PercSat</name> 1039 600 <label>Percent saturated pixels</label> 1040 <description>Percentage of saturated pixels in channel 2</description>1041 601 <class>java.lang.String</class> 1042 602 <value>\F635 % Sat.\</value> … … 1045 605 <name>propertyMapping.ch1FgSd</name> 1046 606 <label>Channel 1 foreground standard deviation</label> 1047 <description>The standard deviation of the foreground intensity in channel 1</description>1048 607 <class>java.lang.String</class> 1049 608 <value>\F532 SD\</value> … … 1052 611 <name>propertyMapping.ch2PercSd1</name> 1053 612 <label>Percent pixels within 1 standard deviation</label> 1054 <description>Percentage of pixels within 1 standard deviation in channel 2</description>1055 613 <class>java.lang.String</class> 1056 614 <value>\% > B635+1SD\</value> … … 1059 617 <name>propertyMapping.fgPixels</name> 1060 618 <label>Foreground pixels</label> 1061 <description>Number of foreground pixels</description>1062 619 <class>java.lang.String</class> 1063 620 <value>\F Pixels\</value> … … 1066 623 <name>propertyMapping.ch2FgSd</name> 1067 624 <label>Channel 2 foreground standard deviation</label> 1068 <description>The standard deviation of the foreground intensity in channel 2</description>1069 625 <class>java.lang.String</class> 1070 626 <value>\F635 SD\</value> … … 1073 629 <name>propertyMapping.ch2BgSd</name> 1074 630 <label>Channel 2 background standard deviation</label> 1075 <description>The standard deviation of the background intensity in channel 2</description>1076 631 <class>java.lang.String</class> 1077 632 <value>\B635 SD\</value> 633 </parameter> 634 <parameter> 635 <name>headerRegexp</name> 636 <label>Header</label> 637 <class>java.lang.String</class> 638 <value>"(.+)=(.*)"</value> 1078 639 </parameter> 1079 640 <parameter> 1080 641 <name>reporterIdColumnMapping</name> 1081 642 <label>Reporter ID</label> 1082 <description>Mapping that picks the spot's reporter from the data columns. For example: \ID\</description>1083 643 <class>java.lang.String</class> 1084 644 <value>\ID\</value> 1085 </parameter>1086 <parameter>1087 <name>headerRegexp</name>1088 <label>Header</label>1089 <description>A regular expression that matches a header line and extracts the name and a value parts. For example, split on equal symbol: (.+)=(.*)</description>1090 <class>java.lang.String</class>1091 <value>"(.+)=(.*)"</value>1092 645 </parameter> 1093 646 <parameter> 1094 647 <name>propertyMapping.ch1FgMedian</name> 1095 648 <label>Channel 1 foreground median</label> 1096 <description>The median of the foreground intensity in channel 1</description>1097 649 <class>java.lang.String</class> 1098 650 <value>\F532 Median\</value> … … 1101 653 <name>propertyMapping.ch1BgMean</name> 1102 654 <label>Channel 1 background mean</label> 1103 <description>The mean of the background intensity in channel 1</description>1104 655 <class>java.lang.String</class> 1105 656 <value>\B532 Mean\</value> … … 1108 659 <name>propertyMapping.ch2BgMedian</name> 1109 660 <label>Channel 2 background median</label> 1110 <description>The median of the background intensity in channel 2</description>1111 661 <class>java.lang.String</class> 1112 662 <value>\B635 Median\</value> … … 1115 665 <name>rowColumnMapping</name> 1116 666 <label>Row</label> 1117 <description>Mapping that picks the spot's row in the block from the data columns. For example: \Row\</description>1118 667 <class>java.lang.String</class> 1119 668 <value>\Row\</value> … … 1122 671 <name>propertyMapping.ch1BgMedian</name> 1123 672 <label>Channel 1 background median</label> 1124 <description>The median of the background intensity in channel 1</description>1125 673 <class>java.lang.String</class> 1126 674 <value>\B532 Median\</value> … … 1129 677 <name>propertyMapping.ch2FgMean</name> 1130 678 <label>Channel 2 foreground mean</label> 1131 <description>The mean of the foreground intensity in channel 2</description>1132 679 <class>java.lang.String</class> 1133 680 <value>\F635 Mean\</value> … … 1136 683 <name>propertyMapping.rgnR2</name> 1137 684 <label>Rgn R2</label> 1138 <description>Rgn R2</description>1139 685 <class>java.lang.String</class> 1140 686 <value>\Rgn R² (532/635)\</value> 687 </parameter> 688 <parameter> 689 <name>dataHeaderRegexp</name> 690 <label>Data header</label> 691 <class>java.lang.String</class> 692 <value>"Block"\t"Column"\t"Row"\t"Name"\t"ID".*"Ratio of Medians \(635\/532\)".*</value> 693 </parameter> 694 <parameter> 695 <name>propertyMapping.ratiosSd</name> 696 <label>Standard deviation of ratios</label> 697 <class>java.lang.String</class> 698 <value>\Ratios SD (532/635)\</value> 1141 699 </parameter> 1142 700 <parameter> 1143 701 <name>propertyMapping.ch2FgMedian</name> 1144 702 <label>Channel 2 foreground median</label> 1145 <description>The median of the foreground intensity in channel 2</description>1146 703 <class>java.lang.String</class> 1147 704 <value>\F635 Median\</value> 1148 </parameter>1149 <parameter>1150 <name>dataHeaderRegexp</name>1151 <label>Data header</label>1152 <description>A regular expression that matches the header line just before the data begins. For example: Block\tRow\tColumn.*</description>1153 <class>java.lang.String</class>1154 <value>"Block"\t"Column"\t"Row"\t"Name"\t"ID".*"Ratio of Medians \(532\/635\)".*</value>1155 </parameter>1156 <parameter>1157 <name>propertyMapping.ratiosSd</name>1158 <label>Standard deviation of ratios</label>1159 <description>Standard deviation of the intensity ratios for all pixels</description>1160 <class>java.lang.String</class>1161 <value>\Ratios SD (532/635)\</value>1162 705 </parameter> 1163 706 <parameter> 1164 707 <name>propertyMapping.ch1PercSat</name> 1165 708 <label>Percent saturated pixels</label> 1166 <description>Percentage of saturated pixels in channel 1</description>1167 709 <class>java.lang.String</class> 1168 710 <value>\F532 % Sat.\</value> … … 1171 713 <name>dataSplitterRegexp</name> 1172 714 <label>Data splitter</label> 1173 <description>A regular expression that splits each data line into individual columns. For example, split on tabs: \t</description>1174 715 <class>java.lang.String</class> 1175 716 <value>\t</value> … … 1178 719 <name>columnColumnMapping</name> 1179 720 <label>Column</label> 1180 <description>Mapping that picks the spot's column in the block from the data columns. For example: \Column\</description>1181 721 <class>java.lang.String</class> 1182 722 <value>\Column\</value> … … 1185 725 <name>propertyMapping.bgPixels</name> 1186 726 <label>Background pixels</label> 1187 <description>Number of background pixels</description>1188 727 <class>java.lang.String</class> 1189 728 <value>\B Pixels\</value> … … 1192 731 <name>propertyMapping.ch1PercSd2</name> 1193 732 <label>Percent pixels within 2 standard deviations</label> 1194 <description>Percentage of pixels within 2 standard deviations in channel 1</description>1195 733 <class>java.lang.String</class> 1196 734 <value>\% > B532+2SD\</value> 1197 </parameter>1198 <parameter>1199 <name>metaGridXColumnMapping</name>1200 <label>MetaGridX</label>1201 <description>Mapping that picks the spot's meta-Grid X-axis from the data columns. For example: \Meta grid X\</description>1202 <class />1203 <value />1204 735 </parameter> 1205 736 <parameter> 1206 737 <name>propertyMapping.ch1FgMean</name> 1207 738 <label>Channel 1 foreground mean</label> 1208 <description>The mean of the foreground intensity in channel 1</description>1209 739 <class>java.lang.String</class> 1210 740 <value>\F532 Mean\</value> … … 1213 743 <name>xColumnMapping</name> 1214 744 <label>X</label> 1215 <description>Mapping that picks the spot's physical X coordinate from the data columns. For example: \X\</description>1216 745 <class>java.lang.String</class> 1217 746 <value>\X\</value> 1218 </parameter>1219 <parameter>1220 <name>metaGridYColumnMapping</name>1221 <label>MetaGridY</label>1222 <description>Mapping that picks the spot's meta-Grid Y-axis from the data columns. For example: \Meta grid Y\</description>1223 <class />1224 <value />1225 747 </parameter> 1226 748 <parameter> 1227 749 <name>propertyMapping.ch1BgSd</name> 1228 750 <label>Channel 1 background standard deviation</label> 1229 <description>The standard deviation of the background intensity in channel 1</description>1230 751 <class>java.lang.String</class> 1231 752 <value>\B532 SD\</value> 1232 </parameter>1233 <parameter>1234 <name>minDataColumns</name>1235 <label>Min data columns</label>1236 <description>The minimum number of columns for a line to be counted as a data line.</description>1237 <class />1238 <value />1239 753 </parameter> 1240 754 <parameter> 1241 755 <name>propertyMapping.rgnRatio</name> 1242 756 <label>Rgn ratio</label> 1243 <description>Rgn ratio</description>1244 757 <class>java.lang.String</class> 1245 758 <value>\Rgn Ratio (532/635)\</value> 1246 </parameter>1247 <parameter>1248 <name>ignoreRegexp</name>1249 <label>Ignore</label>1250 <description>A regular expression that matches any line that should be ignored. For example, ignore lines starting with #: ^#.*</description>1251 <class />1252 <value />1253 759 </parameter> 1254 760 <parameter> 1255 761 <name>propertyMapping.ch1PercSd1</name> 1256 762 <label>Percent pixels within 1 standard deviation</label> 1257 <description>Percentage of pixels within 1 standard deviation in channel 1</description>1258 763 <class>java.lang.String</class> 1259 764 <value>\% > B532+1SD\</value> 1260 </parameter>1261 <parameter>1262 <name>propertyMapping.CV</name>1263 <label>CV</label>1264 <description>CV</description>1265 <class />1266 <value />1267 765 </parameter> 1268 766 <parameter> 1269 767 <name>rawDataType</name> 1270 768 <label>Raw data type</label> 1271 <description>The type of raw data that this importer will import.</description>1272 769 <class>java.lang.String</class> 1273 770 <value>genepix</value> 1274 </parameter>1275 <parameter>1276 <name>dataFooterRegexp</name>1277 <label>Data footer</label>1278 <description>A regular expression that matches the first line of non-data after the data lines. For example: __END_OF_DATA__</description>1279 <class />1280 <value />1281 771 </parameter> 1282 772 <parameter> 1283 773 <name>propertyMapping.ch2PercSd2</name> 1284 774 <label>Percent pixels within 2 standard deviations</label> 1285 <description>Percentage of pixels within 2 standard deviations in channel 2</description>1286 775 <class>java.lang.String</class> 1287 776 <value>\% > B635+2SD\</value> … … 1290 779 <name>blockColumnMapping</name> 1291 780 <label>Block</label> 1292 <description>Mapping that picks the spot's block from the data columns. For example: \Block\</description>1293 781 <class>java.lang.String</class> 1294 782 <value>\Block\</value> … … 1299 787 <description>This configuration is for the Plate importer plugin when to import 96-well plates.</description> 1300 788 <parameter> 1301 <name>maxDataColumns</name> 1302 <label>Max data columns</label> 1303 <description>The maximum number of columns for a line to be counted as a data line, or 0 to allow any number of columns.</description> 1304 <class /> 1305 <value /> 789 <name>nameColumnMapping</name> 790 <label>Plate number/name</label> 791 <class>java.lang.String</class> 792 <value>\96_number\</value> 1306 793 </parameter> 1307 794 <parameter> 1308 795 <name>reporterColumnMapping</name> 1309 796 <label>Reporter ID</label> 1310 <description>Mapping that picks the well's reporter id from the data columns. For example: \ID\</description>1311 797 <class>java.lang.String</class> 1312 798 <value>\oligo_id\</value> … … 1315 801 <name>dataHeaderRegexp</name> 1316 802 <label>Data header</label> 1317 <description>A regular expression that matches the header line just before the data begins. For example: Block\tRow\tColumn.*</description>1318 803 <class>java.lang.String</class> 1319 804 <value>96_number\t96_column\t96_row\t96_position\toligo_id.*</value> 1320 </parameter>1321 <parameter>1322 <name>barcodeColumnMapping</name>1323 <label>Plate barcode</label>1324 <description>Mapping that picks the plate barcode from the data columns. For example: \Barcode\</description>1325 <class />1326 <value />1327 805 </parameter> 1328 806 <parameter> 1329 807 <name>trimQuotes</name> 1330 808 <label>Remove quotes</label> 1331 <description>If true quotes (" or ') around data value will be removed.</description>1332 809 <class>java.lang.Boolean</class> 1333 810 <value>true</value> … … 1336 813 <name>dataSplitterRegexp</name> 1337 814 <label>Data splitter</label> 1338 <description>A regular expression that splits each data line into individual columns. For example, split on tabs: \t</description>1339 815 <class>java.lang.String</class> 1340 816 <value>\t</value> 1341 </parameter>1342 <parameter>1343 <name>charset</name>1344 <label>Character set</label>1345 <description>The character set used in the file, if not specified the default character set is used (ISO-8859-1).</description>1346 <class>java.lang.String</class>1347 <value>ISO-8859-1</value>1348 817 </parameter> 1349 818 <parameter> 1350 819 <name>columnColumnMapping</name> 1351 820 <label>Column</label> 1352 <description>Mapping that picks the well's column in the plate from the data columns. For example: \Column\</description>1353 821 <class>java.lang.String</class> 1354 822 <value>\96_column\</value> 1355 </parameter>1356 <parameter>1357 <name>nameColumnMapping</name>1358 <label>Plate number/name</label>1359 <description>Mapping that picks the plate name from the data columns. For example: \Plate\</description>1360 <class>java.lang.String</class>1361 <value>\96_number\</value>1362 </parameter>1363 <parameter>1364 <name>minDataColumns</name>1365 <label>Min data columns</label>1366 <description>The minimum number of columns for a line to be counted as a data line.</description>1367 <class />1368 <value />1369 </parameter>1370 <parameter>1371 <name>ignoreRegexp</name>1372 <label>Ignore</label>1373 <description>A regular expression that matches any line that should be ignored. For example, ignore lines starting with #: ^#.*</description>1374 <class />1375 <value />1376 </parameter>1377 <parameter>1378 <name>dataFooterRegexp</name>1379 <label>Data footer</label>1380 <description>A regular expression that matches the first line of non-data after the data lines. For example: __END_OF_DATA__</description>1381 <class />1382 <value />1383 </parameter>1384 <parameter>1385 <name>headerRegexp</name>1386 <label>Header</label>1387 <description>A regular expression that matches a header line and extracts the name and a value parts. For example, split on equal symbol: (.+)=(.*)</description>1388 <class />1389 <value />1390 823 </parameter> 1391 824 <parameter> 1392 825 <name>rowColumnMapping</name> 1393 826 <label>Row</label> 1394 <description>Mapping that picks the well's row in the plate from the data columns. For example: \Row\</description>1395 827 <class>java.lang.String</class> 1396 828 <value>\96_row\</value> … … 1401 833 <description>This configuration is for importing reporters from the same text file as 96well plates are imported from.</description> 1402 834 <parameter> 1403 <name>maxDataColumns</name> 1404 <label>Max data columns</label> 1405 <description>The maximum number of columns for a line to be counted as a data line, or 0 to allow any number of columns.</description> 1406 <class /> 1407 <value /> 1408 </parameter> 1409 <parameter> 1410 <name>extendedColumnMapping.locusLink</name> 1411 <label>LocusLink</label> 1412 <description /> 1413 <class /> 1414 <value /> 835 <name>nameColumnMapping</name> 836 <label>Name</label> 837 <class>java.lang.String</class> 838 <value>\oligo_id\</value> 839 </parameter> 840 <parameter> 841 <name>dataHeaderRegexp</name> 842 <label>Data header</label> 843 <class>java.lang.String</class> 844 <value>96_number\t96_column\t96_row\t96_position\toligo_id.*</value> 1415 845 </parameter> 1416 846 <parameter> 1417 847 <name>trimQuotes</name> 1418 848 <label>Remove quotes</label> 1419 <description>If true quotes (" or ') around data value will be removed.</description>1420 849 <class>java.lang.Boolean</class> 1421 850 <value>true</value> 1422 851 </parameter> 1423 852 <parameter> 1424 <name>charset</name> 1425 <label>Character set</label> 1426 <description>The character set used in the file, if not specified the default character set is used (ISO-8859-1).</description> 1427 <class>java.lang.String</class> 1428 <value>ISO-8859-1</value> 1429 </parameter> 1430 <parameter> 1431 <name>scoreColumnMapping</name> 1432 <label>Score</label> 1433 <description>Mapping that picks the reporter's score in some context. This mapping is only used when importing to a reporter list.</description> 1434 <class /> 1435 <value /> 1436 </parameter> 1437 <parameter> 1438 <name>nameColumnMapping</name> 1439 <label>Name</label> 1440 <description>Mapping that picks the reporter's name from the data columns. For example: \Name\</description> 1441 <class>java.lang.String</class> 1442 <value>\oligo_id\</value> 1443 </parameter> 1444 <parameter> 1445 <name>extendedColumnMapping.markers</name> 1446 <label>Markers</label> 1447 <description /> 1448 <class /> 1449 <value /> 1450 </parameter> 1451 <parameter> 1452 <name>extendedColumnMapping.vector</name> 1453 <label>Vector</label> 1454 <description>The vector from which the reporter is derived</description> 1455 <class /> 1456 <value /> 1457 </parameter> 1458 <parameter> 1459 <name>extendedColumnMapping.nid</name> 1460 <label>NID</label> 1461 <description /> 1462 <class /> 1463 <value /> 853 <name>dataSplitterRegexp</name> 854 <label>Data splitter</label> 855 <class>java.lang.String</class> 856 <value>\t</value> 1464 857 </parameter> 1465 858 <parameter> 1466 859 <name>descriptionColumnMapping</name> 1467 860 <label>Description</label> 1468 <description>Mapping that picks the reporter's description from the data columns. For example: \Description\</description>1469 861 <class>java.lang.String</class> 1470 862 <value>\description_Ensembl*\</value> 1471 863 </parameter> 1472 864 <parameter> 1473 <name>headerRegexp</name> 1474 <label>Header</label> 1475 <description>A regular expression that matches a header line and extracts the name and a value parts. For example, split on equal symbol: (.+)=(.*)</description> 1476 <class /> 1477 <value /> 865 <name>symbolColumnMapping</name> 866 <label>Gene symbol</label> 867 <class>java.lang.String</class> 868 <value>\gene_symbol_Ensembl*\</value> 1478 869 </parameter> 1479 870 <parameter> 1480 871 <name>reporterIdColumnMapping</name> 1481 872 <label>Reporter ID</label> 1482 <description>Mapping that picks the reporter's ID from the data columns. For example: \ID\</description>1483 873 <class>java.lang.String</class> 1484 874 <value>\oligo_id\</value> 1485 </parameter>1486 <parameter>1487 <name>symbolColumnMapping</name>1488 <label>Gene symbol</label>1489 <description>Mapping that picks the reporter's gene symbol from the data columns. For example: \Gene symbol\</description>1490 <class>java.lang.String</class>1491 <value>\gene_symbol_Ensembl*\</value>1492 </parameter>1493 <parameter>1494 <name>extendedColumnMapping.antibiotics</name>1495 <label>Antibiotics</label>1496 <description />1497 <class />1498 <value />1499 </parameter>1500 <parameter>1501 <name>extendedColumnMapping.omim</name>1502 <label>OMIM</label>1503 <description />1504 <class />1505 <value />1506 </parameter>1507 <parameter>1508 <name>extendedColumnMapping.chromosome</name>1509 <label>Chromosome</label>1510 <description>The chromosome from which the reporter is derived</description>1511 <class />1512 <value />1513 </parameter>1514 <parameter>1515 <name>reporterType</name>1516 <label>Reporter type</label>1517 <description>The reporter type assigned to the imported reporters</description>1518 <class />1519 <value />1520 </parameter>1521 <parameter>1522 <name>dataHeaderRegexp</name>1523 <label>Data header</label>1524 <description>A regular expression that matches the header line just before the data begins. For example: Block\tRow\tColumn.*</description>1525 <class>java.lang.String</class>1526 <value>96_number\t96_column\t96_row\t96_position\toligo_id.*</value>1527 </parameter>1528 <parameter>1529 <name>dataSplitterRegexp</name>1530 <label>Data splitter</label>1531 <description>A regular expression that splits each data line into individual columns. For example, split on tabs: \t</description>1532 <class>java.lang.String</class>1533 <value>\t</value>1534 </parameter>1535 <parameter>1536 <name>extendedColumnMapping.length</name>1537 <label>Length</label>1538 <description>The length of the sequence</description>1539 <class />1540 <value />1541 </parameter>1542 <parameter>1543 <name>extendedColumnMapping.tissue</name>1544 <label>Tissue</label>1545 <description>The tissue from which the reporter is derived</description>1546 <class />1547 <value />1548 </parameter>1549 <parameter>1550 <name>extendedColumnMapping.accession</name>1551 <label>Accession</label>1552 <description />1553 <class />1554 <value />1555 </parameter>1556 <parameter>1557 <name>minDataColumns</name>1558 <label>Min data columns</label>1559 <description>The minimum number of columns for a line to be counted as a data line.</description>1560 <class />1561 <value />1562 </parameter>1563 <parameter>1564 <name>ignoreRegexp</name>1565 <label>Ignore</label>1566 <description>A regular expression that matches any line that should be ignored. For example, ignore lines starting with #: ^#.*</description>1567 <class />1568 <value />1569 </parameter>1570 <parameter>1571 <name>reporterTypeColumnMapping</name>1572 <label>Reporter type</label>1573 <description>Mapping that pick the reporter's type from the data columns. This will overide the reporter type parameter. For example: \Reporter type\</description>1574 <class />1575 <value />1576 </parameter>1577 <parameter>1578 <name>extendedColumnMapping.library</name>1579 <label>Library</label>1580 <description>The library from which the reporter is derived</description>1581 <class />1582 <value />1583 </parameter>1584 <parameter>1585 <name>extendedColumnMapping.clusterId</name>1586 <label>Cluster ID</label>1587 <description>A unique identifier for a Unigene entry</description>1588 <class />1589 <value />1590 </parameter>1591 <parameter>1592 <name>dataFooterRegexp</name>1593 <label>Data footer</label>1594 <description>A regular expression that matches the first line of non-data after the data lines. For example: __END_OF_DATA__</description>1595 <class />1596 <value />1597 </parameter>1598 <parameter>1599 <name>extendedColumnMapping.cytoband</name>1600 <label>Cytoband</label>1601 <description>The cytoband from which the reporter is derived</description>1602 <class />1603 <value />1604 875 </parameter> 1605 876 <parameter> 1606 877 <name>extendedColumnMapping.sequence</name> 1607 878 <label>Sequence</label> 1608 <description>The nucleotide sequence of the reporter</description>1609 879 <class>java.lang.String</class> 1610 880 <value>\oligo_sequence\</value> 1611 </parameter>1612 <parameter>1613 <name>extendedColumnMapping.species</name>1614 <label>Species</label>1615 <description>The organism from which the reporter is derived</description>1616 <class />1617 <value />1618 881 </parameter> 1619 882 </configuration> -
trunk/doc/installation.html
r2970 r2992 28 28 29 29 <head> 30 <title>BASE 2 .0installation instructions</title>30 <title>BASE 2 installation instructions</title> 31 31 <link rel=stylesheet type="text/css" href="styles.css"> 32 32 </head> … … 401 401 </ol> 402 402 403 <h2><a name=upgrade>Upgrade of running BASE 2 .0installation</a></h2>403 <h2><a name=upgrade>Upgrade of running BASE 2 installation</a></h2> 404 404 405 405 <p> -
trunk/src/clients/migrate/net/sf/basedb/clients/migrate/AnnotationTypeTransfer.java
r2614 r2992 89 89 { 90 90 case 'i': 91 { 91 92 annotationType = AnnotationType.getNew(b2c, Type.INT); 92 annotationType.setWidth(rs.getInt(10)); 93 int width = rs.getInt(10); 94 if (width > 0) annotationType.setWidth(width); 93 95 break; 96 } 94 97 case 'f': 98 { 95 99 annotationType = AnnotationType.getNew(b2c, Type.FLOAT); 96 annotationType.setWidth(rs.getInt(10)); 100 int width = rs.getInt(10); 101 if (width > 0) annotationType.setWidth(width); 97 102 break; 103 } 98 104 case 't': 105 { 99 106 annotationType = AnnotationType.getNew(b2c, Type.TEXT); 100 annotationType.setWidth(rs.getInt(10)); 107 int width = rs.getInt(10); 108 if (width > 0) annotationType.setWidth(width); 101 109 break; 110 } 102 111 case 'e': 112 { 103 113 annotationType = AnnotationType.getNew(b2c, Type.STRING); 104 114 annotationType.setEnumeration(true); … … 107 117 annotationType.setDisplayAsList(true); 108 118 break; 119 } 109 120 default: 110 121 stop("start", "Unknown AnnotationType"); 111 122 } 112 123 setCommonItemData(b2c, (CommonItem) annotationType, rs); 113 annotationType.setDefaultValue(rs.getString(11)); 124 String defaultValue = rs.getString(11); 125 if (defaultValue != null && defaultValue.length() > AnnotationType.MAX_DEFAULT_VALUE_LENGTH) 126 { 127 defaultValue = defaultValue.substring(0, AnnotationType.MAX_DEFAULT_VALUE_LENGTH); 128 } 129 annotationType.setDefaultValue(defaultValue); 114 130 annotationType.enableForItem(Item.SAMPLE); 115 131 return annotationType; -
trunk/src/clients/migrate/net/sf/basedb/clients/migrate/ArrayBlockTransfer.java
r2981 r2992 83 83 { 84 84 startProgress(getInt("countFeatures")); 85 DbControl dc = n ewDbControl();85 DbControl dc = null; 86 86 for (Map.Entry<Integer, Integer> entry : arrayTypeT.getIdMap().entrySet()) 87 87 { 88 88 cleanUpMemory(); 89 dc = newDbControl(); 89 90 Integer base2Id = entry.getValue(); 90 91 Integer base1Id = entry.getKey(); … … 118 119 log("start", "arrayDesignId is " + base2Id); 119 120 } 120 }121 commit(dc);121 commit(dc); 122 } 122 123 done(); 123 124 } -
trunk/src/clients/migrate/net/sf/basedb/clients/migrate/Migrater.java
r2870 r2992 169 169 startTransfer(imageFT, "Image"); 170 170 RawBioAssayTransfer rawBioAssayT = new RawBioAssayTransfer(userT, 171 groupT, scanT, arrayTypeT, uploadFT, softwareT );171 groupT, scanT, arrayTypeT, uploadFT, softwareT, sampleT); 172 172 startTransfer(rawBioAssayT, "RawBioAssay"); 173 173 RawBioAssayDataTransfer rawBioAssayDataT = new RawBioAssayDataTransfer( … … 238 238 String user = getProperty("db1.user"); 239 239 String password = getProperty("db1.password"); 240 String url = getProperty("db1.url") ;240 String url = getProperty("db1.url") + "&autoReconnect=true"; 241 241 String driver = getProperty("db1.driver"); 242 242 try -
trunk/src/clients/migrate/net/sf/basedb/clients/migrate/RawBioAssayDataTransfer.java
r2863 r2992 138 138 */ 139 139 cleanUpMemory(); 140 PreparedStatement ps = QUICK_TRANSFER ? prepareStatementFromFile("selectMinimumRawBioAssayData") 141 : prepareStatementFromFile("selectRawBioAssayData"); 142 try 143 { 144 ps.setInt(1, rawBioAssayId); 140 145 141 RawDataBatcher batcher = rawBioAssay.getRawDataBatcher(); 146 142 batcher.setBatchSize(getBatchSize()); 147 runRawBioAssay( ps, 0, getBatchSize(), batcher, hasArrayDesign);143 runRawBioAssay(rawBioAssay, batcher, hasArrayDesign, rawBioAssayId); 148 144 batcher.flush(); 149 145 batcher.close(); 150 }151 catch (SQLException e)152 {153 stop("transferRawBioAssayData", e);154 }155 146 } 156 147 … … 159 150 values from and size. 160 151 161 @param ps <code>PreparedStatement</code> which includes a "LIMIT ?,?" 162 at the end. 163 @param from <code>int</code> indicating start position of the 164 ResultSet. 165 @param size <code>int</code> indicating number of rows to include. 152 @param ps <code>PreparedStatement</code> 166 153 @param batcher RawDataBatcher used in this transfer. 167 154 @param hasArrayDesign (Currently not used) 168 155 @see Transfer#prepareStatementFromFile(String) 169 156 */ 170 protected void runRawBioAssay( PreparedStatement ps, int from, int size,171 RawDataBatcher batcher, boolean hasArrayDesign )157 protected void runRawBioAssay(RawBioAssay rawBioAssay, 158 RawDataBatcher batcher, boolean hasArrayDesign, int base1RawBioAssayId) 172 159 { 173 160 try 174 161 { 175 162 int rowCount = 0; 176 ps.setInt(2, from); 177 ps.setInt(3, size); 178 ResultSet rs = ps.executeQuery(); 163 ResultSet rs = null; 164 Throwable t = null; 165 int numTries = 0; 166 // Fix for unstable BASE 1 server that is randomly losing the connection 167 // For this to work the connection must be created with autoReconnect=true 168 while (rs == null && numTries < 2) 169 { 170 numTries++; 171 try 172 { 173 PreparedStatement ps = QUICK_TRANSFER ? prepareStatementFromFile("selectMinimumRawBioAssayData") 174 : prepareStatementFromFile("selectRawBioAssayData"); 175 ps.setInt(1, base1RawBioAssayId); 176 rs = ps.executeQuery(); 177 t = null; 178 } 179 catch (Throwable t2) 180 { 181 t = t2; 182 log("Exception when loading BASE 1 data for raw bioassay: " + rawBioAssay, t2); 183 try 184 { 185 Thread.sleep(2000); 186 } 187 catch (InterruptedException ex) 188 {} 189 } 190 } 191 if (rs == null || t != null) throw new BaseException(t); 179 192 DbControl dc = batcher.getDbControl(); 180 193 while (rs.next()) … … 183 196 RawData rd = batcher.newRawData(); 184 197 rd.setReporter(reporterT.getReporterById(dc, rs.getInt(2))); 185 // This is not verified, do block, row and col numbers start at186 // 0 or 1?187 198 rd.setBlock(rs.getInt(3)); 188 199 rd.setColumn(rs.getInt(4)); 189 200 rd.setRow(rs.getInt(5)); 201 rd.setX(rs.getFloat(6)); 202 rd.setY(rs.getFloat(7)); 190 203 if (!QUICK_TRANSFER) 191 204 { … … 213 226 progress.increase(); 214 227 } 215 if (rowCount == size)216 {217 // Fetch next batch218 runRawBioAssay(ps, from + size, size, batcher, hasArrayDesign);219 }220 228 } 221 229 catch (SQLException e) -
trunk/src/clients/migrate/net/sf/basedb/clients/migrate/RawBioAssayTransfer.java
r2690 r2992 29 29 import net.sf.basedb.core.RawBioAssay; 30 30 import net.sf.basedb.core.RawDataTypes; 31 import net.sf.basedb.core.Sample; 31 32 import net.sf.basedb.core.Scan; 33 34 import java.sql.PreparedStatement; 32 35 import java.sql.ResultSet; 33 36 import java.sql.SQLException; … … 47 50 private UploadFileTransfer uploadFT = null; 48 51 private SoftwareTransfer softwareT = null; 52 private SampleTransfer sampleT = null; 49 53 50 54 /** … … 56 60 RawBioAssayTransfer(UserTransfer userT, GroupTransfer groupT, 57 61 ScanTransfer scanT, ArrayTypeTransfer arrayTypeT, 58 UploadFileTransfer uploadFT, SoftwareTransfer softwareT )62 UploadFileTransfer uploadFT, SoftwareTransfer softwareT, SampleTransfer sampleT) 59 63 { 60 64 super(userT, groupT); … … 66 70 this.arrayTypeT = arrayTypeT; 67 71 this.softwareT = softwareT; 72 this.sampleT = sampleT; 68 73 } 69 74 else … … 120 125 parseFileHeader(rawBioAssay, fileHeader); 121 126 } 127 128 // Inherit annotations from sample 129 if (sampleT.isDone()) 130 { 131 PreparedStatement ps = prepareStatementFromFile("getCh1SampleForRawBioAssay"); 132 ps.setInt(1, rs.getInt(1)); 133 ResultSet ss = ps.executeQuery(); 134 if (ss.next()) 135 { 136 int base1SampleId = ss.getInt(1); 137 if (base1SampleId != 0) 138 { 139 Sample s = sampleT.getSampleById(dc, base1SampleId); 140 if (s.isAnnotated()) 141 { 142 rawBioAssay.getAnnotationSet().inheritAnnotationSet(s.getAnnotationSet()); 143 } 144 } 145 } 146 ss.close(); 147 } 148 122 149 return rawBioAssay; 123 150 } -
trunk/src/clients/migrate/net/sf/basedb/clients/migrate/UploadFileTransfer.java
r2693 r2992 99 99 imageFileMap = new HashMap<Integer, Integer>(); 100 100 rawBioAssayFileMap = new HashMap<Integer, Integer>(); 101 if (!new java.io.File(path).exists()) 102 { 103 String message = "Path for BASE 1 user files not found: " + path; 104 if (!QUICK_TRANSFER) 105 { 106 log(message); 107 } 108 else 109 { 110 stop("UploadFileTransefer", message); 111 } 112 } 101 113 } 102 114 -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Page.java
r2304 r2992 24 24 package net.sf.basedb.clients.web.taglib; 25 25 26 import net.sf.basedb.core.Application; 26 27 import net.sf.basedb.core.SessionControl; 27 28 import net.sf.basedb.clients.web.Base; … … 146 147 */ 147 148 private static String SERVER_NAME = null; 148 149 149 150 /** 150 151 The path to the root directory of this webserver. … … 155 156 The version of BASE. 156 157 */ 157 private static final String BASE_VERSION = "BASE 2.0";158 158 private static String BASE_VERSION = null; 159 159 160 /** 160 161 The SessionControl object in use for this request. … … 217 218 public String getServerName() 218 219 { 220 if (SERVER_NAME == null) SERVER_NAME = Application.getHostName(); 219 221 return SERVER_NAME; 220 222 } 221 223 public String getBaseVersion() 222 224 { 225 if (BASE_VERSION == null) 226 { 227 BASE_VERSION = "BASE " + Application.getMajorVersion() + "." + 228 Application.getMinorVersion() + "." + 229 Application.getMaintenanceVersion(); 230 } 223 231 return BASE_VERSION; 224 232 } … … 232 240 { 233 241 super.setPageContext(pageContext); 234 if (SERVER_NAME == null) SERVER_NAME = pageContext.getRequest().getServerName();235 242 if (ROOT == null) ROOT = ((HttpServletRequest)pageContext.getRequest()).getContextPath()+"/"; 236 243 try -
trunk/src/core/net/sf/basedb/core/Annotation.java
r2942 r2992 161 161 super.initPermissions(granted, denied); 162 162 } 163 PluginPermission getPluginPermissions() 164 { 165 return PluginPermission.NO_PLUGIN; 166 } 163 167 // ------------------------------------------- 164 168 -
trunk/src/core/net/sf/basedb/core/AnnotationSet.java
r2967 r2992 200 200 } 201 201 super.initPermissions(granted, denied); 202 } 203 PluginPermission getPluginPermissions() 204 { 205 return PluginPermission.NO_PLUGIN; 202 206 } 203 207 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/core/Application.java
r2960 r2992 164 164 return Version.getMinor(); 165 165 } 166 /** 167 Get the maintentance version. 166 167 168 /** 169 Get the BASE version string. It is created by combining 170 the major, minor, maintenance, build and schema versions. 168 171 */ 169 172 public static String getMaintenanceVersion() -
trunk/src/core/net/sf/basedb/core/BooleanParameterType.java
r2304 r2992 25 25 26 26 import net.sf.basedb.core.data.BooleanParameterValueData; 27 import net.sf.basedb.util.Enumeration; 27 28 28 29 /** … … 51 52 { 52 53 super(Boolean.class, defaultValue, notNull); 54 } 55 56 public BooleanParameterType(Boolean defaultValue, boolean notNull, int multiplicity, Enumeration<Boolean, String> items) 57 { 58 super(Boolean.class, defaultValue, notNull, multiplicity, 0, 0, items); 53 59 } 54 60 -
trunk/src/core/net/sf/basedb/core/Config.java
r2782 r2992 169 169 ) ? false : true; 170 170 } 171 172 /** 173 Get the default character set to use when no other has been 174 specified. It reads the setting from the <code>defaultCharset</code> 175 setting and uses <code>ISO-8859-1</code> if not specified. 176 @return The name of the default charset to use 177 @since 2.1.1 178 */ 179 public static String getCharset() 180 { 181 return config.getProperty("defaultCharset", "ISO-8859-1"); 182 } 183 171 184 172 185 } -
trunk/src/core/net/sf/basedb/core/PluginParameter.java
r2673 r2992 61 61 62 62 /** 63 A defaul evalue that overrides the default set by63 A default value that overrides the default set by 64 64 the parameter type. 65 65 */ -
trunk/src/core/net/sf/basedb/core/dbengine/TableInfo.java
r2209 r2992 95 95 while (sqlColumns.next()) 96 96 { 97 String name = sqlColumns.getString("COLUMN_NAME");97 String name = makeSafe(sqlColumns.getString("COLUMN_NAME")); 98 98 String type = sqlColumns.getString("TYPE_NAME"); 99 99 int size = sqlColumns.getInt("COLUMN_SIZE"); … … 108 108 while (sqlPK.next()) 109 109 { 110 if (pkName == null) pkName = sqlPK.getString("PK_NAME");111 pkColumns.add( sqlPK.getString("COLUMN_NAME"));110 if (pkName == null) pkName = makeSafe(sqlPK.getString("PK_NAME")); 111 pkColumns.add(makeSafe(sqlPK.getString("COLUMN_NAME"))); 112 112 } 113 113 pkInfo = new PrimaryKeyInfo(pkName, pkColumns); … … 118 118 while (sqlFK.next()) 119 119 { 120 String fkName = sqlFK.getString("FK_NAME");121 String fkColumn = sqlFK.getString("FKCOLUMN_NAME");122 String ref = sqlFK.getString("PKTABLE_NAME");123 String refColumn = sqlFK.getString("PKCOLUMN_NAME");120 String fkName = makeSafe(sqlFK.getString("FK_NAME")); 121 String fkColumn = makeSafe(sqlFK.getString("FKCOLUMN_NAME")); 122 String ref = makeSafe(sqlFK.getString("PKTABLE_NAME")); 123 String refColumn = makeSafe(sqlFK.getString("PKCOLUMN_NAME")); 124 124 125 125 ForeignKeyInfo fk = fkInfo.get(fkName); … … 139 139 while (sqlIndexes.next()) 140 140 { 141 String indexName = sqlIndexes.getString("INDEX_NAME");142 String column = sqlIndexes.getString("COLUMN_NAME");141 String indexName = makeSafe(sqlIndexes.getString("INDEX_NAME")); 142 String column = makeSafe(sqlIndexes.getString("COLUMN_NAME")); 143 143 boolean isUnique = !sqlIndexes.getBoolean("NON_UNIQUE"); 144 144 … … 256 256 } 257 257 258 } 259 260 /** 261 Sometime the database put quotes around names. This method strips all 262 extra characters. 263 @param name The name to make safe, or null 264 @return The safe name or null 265 @since 2.1.1 266 */ 267 private String makeSafe(String name) 268 { 269 if (name == null) return null; 270 return name.replaceAll("\\W", ""); 258 271 } 259 272 -
trunk/src/core/net/sf/basedb/core/dtd/plugin-configuration-file.dtd
r2828 r2992 32 32 <!ELEMENT configname (#PCDATA)> 33 33 <!ELEMENT description (#PCDATA)> 34 <!ELEMENT parameter (name, label, class, value*)>34 <!ELEMENT parameter (name, label, description?, class, value*)> 35 35 36 36 <!ELEMENT name (#PCDATA)> -
trunk/src/core/net/sf/basedb/util/BioAssaySetUtil.java
r2981 r2992 43 43 import net.sf.basedb.util.jep.Jep; 44 44 import net.sf.basedb.util.jep.NotInReporterListFunction; 45 import net.sf.basedb.util.jep.PositionFunction; 45 46 import net.sf.basedb.util.jep.RawFunction; 46 47 import net.sf.basedb.util.jep.ReporterFunction; … … 168 169 <li>raw(property): The value of the specified raw data property 169 170 <li>rep(property): The value of the specified reporter property 171 <li>pos: The position of a spot. Note that this is not the same as raw(position) 170 172 <li>ch(n): The intensity in channel n 171 173 <li>score(list): The score of the {@link net.sf.basedb.core.data.ReporterData} in the … … 183 185 RawFunction raw = new RawFunction(); 184 186 ChannelFunction ch = new ChannelFunction(); 187 PositionFunction pos = new PositionFunction(); 185 188 ReporterFunction reporter = new ReporterFunction(); 186 189 ScoreFunction score = new ScoreFunction(dc); 187 190 ExtraValueFunction xtra = new ExtraValueFunction(dc, bioAssaySet); 188 return Jep.formulaToExpression(formula, raw, ch, reporter, score, xtra);191 return Jep.formulaToExpression(formula, raw, ch, pos, reporter, score, xtra); 189 192 } 190 193 -
trunk/src/core/net/sf/basedb/util/Enumeration.java
r2304 r2992 24 24 package net.sf.basedb.util; 25 25 26 import java.util.Collections; 27 import java.util.Comparator; 26 28 import java.util.List; 27 29 import java.util.LinkedList; … … 89 91 } 90 92 93 /** 94 * This method will sort the enumration on the keys using 95 * {@link Collections#sort(List, Comparator<Entry<K, V>>)}. 96 * The comparator will try to use the keys 'compareTo' method 97 * if it implements the Comparable interface 98 * otherwilse it will treat the key as a String. 99 */ 100 public void sortKeys() 101 { 102 Collections.sort(entries, new Comparator<Entry<K, V>>() 103 { 104 @SuppressWarnings("unchecked") 105 public int compare(Entry<K, V> o1, Entry<K, V> o2) 106 { 107 K key1 = o1.getKey(); 108 K key2 = o2.getKey(); 109 if (key1 instanceof Comparable) 110 { 111 return ((Comparable<K>) key1).compareTo(key2); 112 } 113 else 114 { 115 return key1.toString().compareTo(key2.toString()); 116 } 117 } 118 }); 119 } 120 121 /** 122 * This method will sort the enumration on the values using 123 * {@link Collections#sort(List, Comparator<Entry<K, V>>)}. 124 * The comparator will try to use the values 'compareTo' method 125 * if it implements the Comparable interface 126 * otherwilse it will treat the value as a String. 127 */ 128 public void sortValues() 129 { 130 Collections.sort(entries, new Comparator<Entry<K, V>>() 131 { 132 @SuppressWarnings("unchecked") 133 public int compare(Entry<K, V> o1, Entry<K, V> o2) 134 { 135 V value1 = o1.getValue(); 136 V value2 = o2.getValue(); 137 if (value1 instanceof Comparable) 138 { 139 return ((Comparable<V>) value1).compareTo(value2); 140 } 141 else 142 { 143 return value1.toString().compareTo(value2.toString()); 144 } 145 } 146 }); 147 } 91 148 public static class Entry<K, V> 92 149 { -
trunk/src/core/net/sf/basedb/util/parser/FlatFileParser.java
r2655 r2992 28 28 import java.io.BufferedReader; 29 29 import java.io.IOException; 30 import java.nio.charset.Charset; 30 31 31 32 import java.util.regex.Pattern; … … 41 42 42 43 import net.sf.basedb.core.BaseException; 44 import net.sf.basedb.core.Config; 43 45 44 46 /** … … 87 89 used to match the data/headers. 88 90 <p> 89 Use the {@link #setInputStream(InputStream )}91 Use the {@link #setInputStream(InputStream, String)} 90 92 method to specify a file to parse, and {@link #parseHeaders()} to start the 91 93 parsing. Note! Even if you know that … … 108 110 ffp.setMinDataColumns(5); 109 111 ffp.setMaxDataColumns(5); 110 ffp.setInputStream(FileUtil.getInputStream(path_to_file) );112 ffp.setInputStream(FileUtil.getInputStream(path_to_file), Config.getCharset()); 111 113 ffp.parseHeaders(); 112 114 for (int i = 0; i < ffp.getLineCount(); i++) … … 482 484 483 485 /** 486 @deprecated Use {@link #setInputStream(InputStream, String)} instead 487 */ 488 public void setInputStream(InputStream in) 489 { 490 setInputStream(in, Config.getCharset()); 491 } 492 493 /** 484 494 Set the input stream that will be parsed. 485 495 @param in The <code>InputStream</code> 486 */ 487 public void setInputStream(InputStream in) 488 { 489 this.reader = new BufferedReader(new InputStreamReader(in)); 496 @param charsetName The name of the character set to use when parsing 497 the file, or null to use the default charset specified by 498 {@link Config#getCharset()} 499 @since 2.1.1 500 */ 501 public void setInputStream(InputStream in, String charsetName) 502 { 503 Charset cs = Charset.forName(charsetName == null ? Config.getCharset() : charsetName); 504 this.reader = new BufferedReader(new InputStreamReader(in, cs)); 490 505 } 491 506 -
trunk/src/plugins/core/net/sf/basedb/plugins/AbstractFlatFileImporter.java
r2981 r2992 25 25 26 26 import net.sf.basedb.core.BooleanParameterType; 27 import net.sf.basedb.core.Config; 27 28 import net.sf.basedb.core.InvalidUseOfNullException; 28 29 import net.sf.basedb.core.Location; … … 57 58 import net.sf.basedb.util.parser.Mapper; 58 59 60 import java.util.ArrayList; 59 61 import java.util.Arrays; 60 62 import java.util.regex.Pattern; 61 63 import java.io.IOException; 62 64 import java.io.InputStream; 65 import java.nio.charset.Charset; 63 66 64 67 … … 262 265 ); 263 266 267 /** 268 Enumerates all available character sets. 269 @see #getCharsetParameter(String, String, String) 270 */ 271 protected static final StringParameterType charsetType = 272 new StringParameterType(255, Config.getCharset(), false, 1, 0, 0, 273 new ArrayList<String>(Charset.availableCharsets().keySet())); 274 264 275 /** 265 276 Parameter definition that asks for the file that should be imported. … … 452 463 { 453 464 FlatFileParser ffp = getInitializedFlatFileParser(); 454 ffp.setInputStream(in );465 ffp.setInputStream(in, getCharset()); 455 466 try 456 467 { … … 470 481 FlatFileParser ffp = getInitializedFlatFileParser(); 471 482 FlatFileParser.Data dataline = null; 472 ffp.setInputStream(in );483 ffp.setInputStream(in, getCharset()); 473 484 boolean isSuccess = false; // false until we have finished parsing 474 485 try … … 508 519 FlatFileParser.LineType result = ffp.parseHeaders(); 509 520 if (result == FlatFileParser.LineType.UNKNOWN) return; 510 511 521 FlatFileParser.Line line = null; 512 522 try … … 685 695 } 686 696 697 /** 698 Get the character set the file uses. This method first checks the job 699 parameters for a value, then the configuration parameters. If not 700 found the {@link Config#getCharset()} is returned. 701 @return The name of the charset to use 702 */ 703 protected String getCharset() 704 { 705 String charset = null; 706 if (job != null) charset = (String)job.getValue(CHARSET); 707 if (charset == null && configuration != null) 708 { 709 charset = (String)configuration.getValue(CHARSET); 710 } 711 if (charset == null) charset = Config.getCharset(); 712 return charset; 713 } 714 715 /** 716 The name of the parameter that asks for the character set. 717 @see #getCharsetParameter(String, String, String) 718 */ 719 protected static final String CHARSET = "charset"; 720 721 /** 722 Parameter definition that asks for the character encoding used in the 723 file that is imported. This can be both a job parameter and a configuration 724 parameter. The implementation first checks in the job parameter and 725 if not found in the configuration parameter. If still not found the 726 default charset is used as specified by {@link Config#getCharset()}. 727 @param label The label to use for the parameter or null to use the default label 728 (Character set) 729 @param description The description to use for the parameter or null to use the 730 default description 731 @param defaultValue The default value for the character set or null to use 732 the system default 733 */ 734 protected PluginParameter<String> getCharsetParameter(String label, String description, String defaultValue) 735 { 736 if (label == null) label = "Character set"; 737 if (description == null) description = "The character set used in the file, if not specified the default character set is used " + 738 "(" + Config.getCharset() + ")."; 739 if (defaultValue == null) defaultValue = Config.getCharset(); 740 return new PluginParameter<String>( 741 CHARSET, label, description, defaultValue, charsetType 742 ); 743 } 744 687 745 private Pattern getPattern(String name) 688 746 throws BaseException … … 756 814 { 757 815 ErrorHandler defaultErrorHandler = new SimpleErrorHandler("skip".equals(job.getValue("defaultError"))); 758 errorHandler = new ClassMapErrorHandler( errorHandler);816 errorHandler = new ClassMapErrorHandler(defaultErrorHandler); 759 817 addErrorHandler(StringTooLongException.class, 760 818 getErrorHandler((String)job.getValue("stringTooLongError"), defaultErrorHandler)); -
trunk/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java
r2942 r2992 31 31 import net.sf.basedb.core.BioAssaySet; 32 32 import net.sf.basedb.core.BooleanParameterType; 33 import net.sf.basedb.core.Config; 33 34 import net.sf.basedb.core.DbControl; 34 35 import net.sf.basedb.core.Directory; … … 433 434 ffp.setDataSplitterRegexp(Pattern.compile("\\t")); 434 435 435 ffp.setInputStream(stream );436 ffp.setInputStream(stream, Config.getCharset()); 436 437 return ffp; 437 438 } … … 1433 1434 File newFile = File.getNew(dc, d); 1434 1435 newFile.setName(f.getName()); 1436 newFile.setMimeTypeAuto(null, null); 1435 1437 dc.saveItem(newFile); 1436 1438 try -
trunk/src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java
r2872 r2992 25 25 package net.sf.basedb.plugins; 26 26 27 import net.sf.basedb.core.AnnotationType; 27 28 import net.sf.basedb.core.BaseException; 28 29 import net.sf.basedb.core.BioAssay; … … 32 33 import net.sf.basedb.core.DynamicResultIterator; 33 34 import net.sf.basedb.core.DynamicSpotQuery; 35 import net.sf.basedb.core.ExtendedProperties; 36 import net.sf.basedb.core.ExtendedProperty; 37 import net.sf.basedb.core.ExtraValue; 38 import net.sf.basedb.core.ExtraValueType; 34 39 import net.sf.basedb.core.File; 40 import net.sf.basedb.core.Formula; 41 import net.sf.basedb.core.Include; 35 42 import net.sf.basedb.core.Item; 36 import net.sf.basedb.core.ItemAlreadyExistsException;37 43 import net.sf.basedb.core.ItemParameterType; 44 import net.sf.basedb.core.ItemQuery; 38 45 import net.sf.basedb.core.Job; 39 46 import net.sf.basedb.core.Path; … … 42 49 import net.sf.basedb.core.PluginParameter; 43 50 import net.sf.basedb.core.ProgressReporter; 51 import net.sf.basedb.core.RawDataProperty; 44 52 import net.sf.basedb.core.RequestInformation; 53 import net.sf.basedb.core.StringParameterType; 45 54 import net.sf.basedb.core.User; 46 55 import net.sf.basedb.core.VirtualColumn; 56 import net.sf.basedb.core.data.ReporterData; 47 57 import net.sf.basedb.core.plugin.About; 48 58 import net.sf.basedb.core.plugin.AboutImpl; … … 55 65 import net.sf.basedb.core.plugin.Response; 56 66 import net.sf.basedb.core.query.Dynamic; 67 import net.sf.basedb.core.query.Hql; 57 68 import net.sf.basedb.core.query.JoinType; 58 69 import net.sf.basedb.core.query.Orders; 70 import net.sf.basedb.core.query.Selects; 59 71 import net.sf.basedb.core.query.SqlResult; 72 import net.sf.basedb.util.BioAssaySetUtil; 73 import net.sf.basedb.util.Enumeration; 60 74 61 75 import java.io.IOException; 62 import java.io.OutputStreamWriter; 63 import java.io.Writer; 76 import java.io.PrintWriter; 64 77 import java.sql.SQLException; 65 78 import java.util.ArrayList; … … 67 80 import java.util.Collection; 68 81 import java.util.Collections; 82 import java.util.Comparator; 69 83 import java.util.EnumSet; 84 import java.util.HashMap; 70 85 import java.util.HashSet; 71 86 import java.util.List; 87 import java.util.Map; 72 88 import java.util.Set; 73 89 … … 81 97 use in MeV (available from http://www.tm4.org). 82 98 83 @author jari 84 @version 2. 099 @author jari, enell 100 @version 2.1 85 101 @base.modified $Date$ 86 102 */ … … 111 127 return; 112 128 } 129 130 // checking that we are allowed to overwrite a possibly 131 // existing file 132 DbControl dc = sc.newDbControl(); 133 String p = (String)request.getParameterValue(saveAsParameter.getName()); 134 if (p.startsWith("~/")) 135 { 136 User user = User.getById(dc, sc.getLoggedInUserId()); 137 p = "~" + user.getLogin() + p.substring(1); 138 } 139 Path path = new Path(p, Path.Type.FILE); 140 File file = File.getByPath(dc, path, true); 141 if (!(Boolean)request.getParameterValue(overwriteParameter.getName()) && 142 file.isInDatabase() && !file.isRemoved()) 143 { 144 response.setError("File exists: " + p, null); 145 dc.close(); 146 return; 147 } 148 dc.close(); 149 113 150 storeValue(job, request, bioAssaySetParameter); 114 151 storeValue(job, request, saveAsParameter); 115 152 storeValue(job, request, overwriteParameter); 153 storeValue(job, request, formatParameter); 154 155 if (request.getParameterValue(formatParameter.getName()).equals(FORMAT_BASEFILE)) 156 { 157 response.setContinue(COMMAND_CONFIGURE_BASEFILE); 158 } 159 else 160 { 161 response.setDone("Job configuration complete", Job.ExecutionTime.SHORT); 162 } 163 } 164 else if (command.equals(COMMAND_CONFIGURE_BASEFILE)) 165 { 166 List<Throwable> errors = validateRequestParameters 167 (getConfigureBasefileParameters(context).getParameters(), request); 168 if (errors != null) 169 { 170 response.setError(errors.size()+" invalid parameter(s) were found " + 171 "in the request", errors); 172 return; 173 } 174 175 storeValue(job, request, geneAveragesParameter); 176 storeValue(job, request, serialFormatParameter); 177 storeValues(job, request, usedFieldsParameter); 178 storeValues(job, request, usedColumnsParameter); 179 116 180 response.setDone("Job configuration complete", Job.ExecutionTime.SHORT); 117 181 } … … 123 187 } 124 188 125 126 private void exportMeV(BioAssaySet bioassayset, File file) 189 190 private void exportBASE(BioAssaySet bas, File file, Map<String, String> parameters, 191 List<String> reporterFields, List<String> spotFields, Boolean serialFormat, Boolean mergeReporters) 127 192 throws IOException, SQLException 128 193 { 194 DbControl dc = bas.getDbControl(); 195 PrintWriter out = new PrintWriter(file.getUploadStream(false)); 196 197 // header and parameter section 198 out.println("BASEfile"); 199 if (!parameters.isEmpty()) 200 { 201 for (String key : parameters.keySet()) 202 { 203 out.println(key+"\t"+parameters.get(key)); 204 } 205 out.println("%"); 206 out.println(); 207 } 208 209 // assay section 210 out.println("section\tassays"); 211 out.println("count\t" + bas.getBioAssays().count(dc)); 212 String annotationString = ""; 213 for (AnnotationType at : getExperimentalFactors(dc, bas)) 214 { 215 annotationString += "\t" + at.getName(); 216 } 217 out.println("columns\tid\tname" + annotationString); 218 out.println("annotationColumns" + annotationString); 219 out.println("%"); 220 for (BioAssay ba : bas.getBioAssays().list(dc)) 221 { 222 out.print(ba.getId() + "\t" + ba.getName()); 223 for (AnnotationType at : getExperimentalFactors(dc, bas)) 224 { 225 out.print("\t"); 226 Set<?> values = BioAssaySetUtil.getAnnotationValues(dc, ba, at); 227 if (!values.isEmpty()) out.print(values.iterator().next()); 228 } 229 out.println(); 230 } 231 out.println(); 232 233 // spot section(s) 234 String fieldString = spotFields.toString().substring(1, spotFields.toString().length() - 1).replace(", ", "\t"); 235 String columnString = reporterFields.toString().substring(1, reporterFields.toString().length() - 1).replace(", ", "\t") + "\tassayData"; 236 237 if (serialFormat) 238 { 239 for (BioAssay ba : bas.getBioAssays().list(dc)) 240 { 241 out.println("section\tspots"); 242 out.println("channels\t" + bas.getRawDataType().getChannels()); 243 out.println("assayFields\t" + fieldString); 244 out.println("columns\t" + columnString); 245 out.println("assays\t" + ba.getId()); 246 out.println("count\t" + ba.getNumSpots()); 247 out.println("%"); 248 249 Integer aliasIndex = 0; 250 Map<String, String> aliases = new HashMap<String, String>(); 251 DynamicSpotQuery query = ba.getSpotData(); 252 for (String field : reporterFields) 253 { 254 ++aliasIndex; 255 query.select(Selects.expression(BioAssaySetUtil.createJepExpression(dc, bas, field), aliasIndex.toString())); 256 aliases.put(field, aliasIndex.toString()); 257 } 258 for (String field : spotFields) 259 { 260 ++aliasIndex; 261 query.select(Selects.expression(BioAssaySetUtil.createJepExpression(dc, bas, field), 262 aliasIndex.toString())); 263 aliases.put(field, aliasIndex.toString()); 264 } 265 if (mergeReporters) 266 { 267 // not implemented 268 } 269 DynamicResultIterator result = query.iterate(dc); 270 271 List<Integer> reporterIndex = new ArrayList<Integer>(reporterFields.size()); 272 List<Integer> spotIndex = new ArrayList<Integer>(spotFields.size()); 273 for (String column : reporterFields) 274 { 275 reporterIndex.add(result.getIndex(aliases.get(column))); 276 } 277 for (String field : spotFields) 278 { 279 spotIndex.add(result.getIndex(aliases.get(field))); 280 } 281 282 while (result.hasNext()) 283 { 284 SqlResult r = result.next(); 285 boolean del = false; 286 for (Integer column : reporterIndex) 287 { 288 if (del) 289 { 290 out.print("\t"); 291 } 292 out.print(r.getString(column) != null ? r.getString(column) : ""); 293 del = true; 294 } 295 for (Integer field : spotIndex) 296 { 297 out.print("\t"); 298 out.print(r.getString(field) != null ? r.getString(field) : ""); 299 } 300 out.println(); 301 } 302 out.println(); 303 } 304 } 305 else 306 { 307 // matrix format 308 } 309 310 } 311 312 313 private void exportMeV(BioAssaySet bioassayset, File file, 314 ProgressReporter progress) 315 throws IOException, SQLException 316 { 129 317 DbControl dc=bioassayset.getDbControl(); 130 Writer out = new OutputStreamWriter(file.getUploadStream(false));318 PrintWriter out = new PrintWriter(file.getUploadStream(false)); 131 319 132 320 // comment header … … 139 327 */ 140 328 141 // data header 142 out.write("UID\tID"); 329 List<ExtendedProperty> reporterProperties = 330 ExtendedProperties.getProperties("ReporterData"); 331 332 // Data header 333 // Reporter headers 334 out.write("reporterInternalId\treporterID\tlastUpdate\tgeneSymbol"); 335 for (ExtendedProperty ep : reporterProperties) 336 out.write("\t"+ep.getName()); 337 // Number 3 in below statement comes from using three reporter 338 // entries from ReporterData. Below there is dependencies on this 339 // '3' such as the selectReporter("") in below query.select() 340 // statements (and more). 341 int nof_reporter_columns=3+reporterProperties.size(); 342 // Bioassay headers 343 out.write("\texperimentalFactor"); 143 344 short nof_bioassays=0; 144 345 for (BioAssay bioassay : bioassayset.getBioAssays().list(dc)) … … 148 349 } 149 350 150 // data 351 // Experimental factors 352 for (AnnotationType at : getExperimentalFactors(dc, bioassayset)) 353 { 354 out.write("\n"); 355 for (int i=0; i<nof_reporter_columns; ++i) out.write("\t"); 356 out.write("\t"+at.getName()); 357 for (BioAssay bioassay : bioassayset.getBioAssays().list(dc)) 358 { 359 Set<?> values=BioAssaySetUtil.getAnnotationValues(dc,bioassay,at); 360 out.print("\t"); 361 out.print( !values.isEmpty() ? values.iterator().next() : "N/A" ); 362 } 363 } 364 365 progress.display(0, "Exporting ... performing database query"); 366 // Reporter annotations and expression levels 151 367 int nofchannels=bioassayset.getRawDataType().getChannels(); 152 368 DynamicSpotQuery query=bioassayset.getSpotData(); … … 155 371 query.select(Dynamic.select(VirtualColumn.COLUMN)); 156 372 query.select(Dynamic.selectReporter("externalId")); 373 query.select(Dynamic.selectReporter("lastUpdate")); 374 query.select(Dynamic.selectReporter("symbol")); 375 for (ExtendedProperty ep : reporterProperties) 376 { 377 query.select(Dynamic.selectReporter(ep.getName())); 378 } 157 379 for (int i=1; i<=nofchannels; ++i) 158 380 { … … 164 386 int column_position=spotData.getIndex(VirtualColumn.POSITION.getName()); 165 387 int column_column=spotData.getIndex(VirtualColumn.COLUMN.getName()); 166 int column_reporter=spotData.getIndex("externalId"); 388 int[] column_reporter= new int[nof_reporter_columns]; 389 column_reporter[0]=spotData.getIndex("externalId"); 390 column_reporter[1]=spotData.getIndex("lastUpdate"); 391 column_reporter[2]=spotData.getIndex("symbol"); 392 int idx=3; 393 for (ExtendedProperty ep : reporterProperties) 394 { 395 column_reporter[idx++]=spotData.getIndex(ep.getName()); 396 } 167 397 int[] column_channel = new int[nofchannels]; 168 398 for (int i=1; i<=nofchannels; ++i) … … 173 403 short column=nof_bioassays; 174 404 double log2=Math.log(2.0); 405 int nof_reporters=bioassayset.getNumReporters(); 406 int progress_report_interval=nof_reporters/10; 407 int nof_processed_reporters=0; 175 408 while (spotData.hasNext()) 176 409 { 410 if (nof_processed_reporters%progress_report_interval == 0) 411 { 412 progress.display(100 * nof_processed_reporters / nof_reporters, 413 "Exporting ... " + nof_processed_reporters + " of " + 414 nof_reporters + " done."); 415 } 416 177 417 SqlResult item = spotData.next(); 178 418 int thisposition=item.getInt(column_position); … … 181 421 if (position!=thisposition) // new reporter 182 422 { 423 ++nof_processed_reporters; 183 424 // fill missing values before next spot 184 425 while (nof_bioassays>column++) out.write("\t"); 185 426 column=0; 186 427 position=thisposition; 187 out.write("\npos:" + position + "\t" + item.getString(column_reporter)); 428 out.write("\n" + position); 429 for (int i=0; i<nof_reporter_columns; ++i) 430 { 431 String str=item.getString(column_reporter[i]); 432 out.write("\t" + (str!=null ? str : "")); 433 } 434 out.write("\t"); // experimentalFactor is always empty for reporters 188 435 } 189 436 // fill missing values up to next available column (bioassay) … … 245 492 "to be imported to MeV.", 246 493 new PathParameterType(Path.Type.FILE, null, true) ); 494 Enumeration<String, String> formats = new Enumeration<String, String>(); 495 formats.add(FORMAT_MEV, "MultiExperiment Viewer (MeV)"); 496 formats.add(FORMAT_BASEFILE, "BASEfile"); 497 formatParameter = new PluginParameter<String> 498 ( "fileformat", 499 "Fileformat", 500 "Please specify what format to export.", 501 new StringParameterType(255, null, true, 1, 0, 0, formats) ); 502 247 503 parameters.add(bioAssaySetParameter); 248 504 parameters.add(overwriteParameter); 249 505 parameters.add(saveAsParameter); 506 parameters.add(formatParameter); 250 507 251 508 configureJob = new RequestInformation … … 258 515 return configureJob; 259 516 } 517 518 519 private RequestInformation getConfigureBasefileParameters(GuiContext context) 520 { 521 if (configureJobBasefile == null) 522 { 523 DbControl dc = null; 524 try 525 { 526 dc = sc.newDbControl(); 527 List<PluginParameter<?>> parameters = new ArrayList<PluginParameter<?>>(); 528 geneAveragesParameter = new PluginParameter<Boolean> 529 ( "geneAverages", 530 "Average on reporters", 531 "Average on reporters within each assay.", 532 new BooleanParameterType(false, true)); 533 534 Enumeration<Boolean, String> serialFormat = new Enumeration<Boolean, String>(); 535 serialFormat.add(false, "Normal BASEfile (one big matrix)"); 536 serialFormat.add(true, "Serial BASEfile (one section per assay)"); 537 serialFormatParameter = new PluginParameter<Boolean> 538 ( "serialFormat", 539 "Export as matrix or serial basefile.", 540 "The data can be exported as a matrix with all data in the same section or in a " + 541 "serial format where the data is separated for each assay.", 542 new BooleanParameterType(false, true, 1, serialFormat)); 543 544 Enumeration<String, String> fields = new Enumeration<String, String>(); 545 List<String[]> enumList = new ArrayList<String[]>(); 546 BioAssaySet bas = (BioAssaySet) job.getValue(bioAssaySetParameter.getName()); 547 //Spotfields 548 fields.add("pos()", "Position"); 549 int channels = bas.getRawDataType().getChannels(); 550 for (int channel = 1; channel <= channels; ++channel) 551 { 552 fields.add("ch("+channel+")", "Ch"+channel); 553 } 554 //Formulas 555 ItemQuery<Formula> queryFormula = Formula.getQuery(Formula.Type.COLUMN_EXPRESSION, bas.getRawDataType()); 556 queryFormula.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS); 557 queryFormula.order(Orders.asc(Hql.property("name"))); 558 for (Formula f : queryFormula.list(dc)) 559 { 560 fields.add(f.getFormula(0), "[Formula] "+f.getName()); 561 } 562 563 //Extrefields 564 ItemQuery<ExtraValue> query = bas.getExtraValues(); 565 query.order(Orders.asc(Hql.property("extraValueType.name"))); 566 for (ExtraValue ev : query.list(dc)) 567 { 568 ExtraValueType evt = ev.getExtraValueType(); 569 fields.add("xtra('" + evt.getExternalId() + "')", "[Extra] "+evt.getName()); 570 } 571 572 //Rawdata fields 573 enumList.clear(); 574 enumList.add(new String[] {"raw('position')", "[Raw] Position"}); 575 enumList.add(new String[] {"raw('block')", "[Raw] Block"}); 576 enumList.add(new String[] {"raw('metaGridX')", "[Raw] Meta grid X"}); 577 enumList.add(new String[] {"raw('metaGridY')", "[Raw] Meta grid Y"}); 578 enumList.add(new String[] {"raw('row')", "[Raw] Row"}); 579 enumList.add(new String[] {"raw('column')", "[Raw] Column"}); 580 enumList.add(new String[] {"raw('x')", "[Raw] X"}); 581 enumList.add(new String[] {"raw('y')", "[Raw] Y"}); 582 List<RawDataProperty> rdpList = new ArrayList<RawDataProperty>(bas.getRawDataType().getProperties()); 583 for (RawDataProperty rdp : rdpList) 584 { 585 enumList.add(new String[] {"raw('"+rdp.getName()+"')", "[Raw] "+rdp.getTitle()}); 586 } 587 Collections.sort(enumList, new Comparator<String[]>() 588 { 589 public int compare(String[] e1, String[] e2) 590 { 591 return e1[1].compareTo(e2[1]); 592 } 593 }); 594 for (String[] e : enumList) 595 { 596 fields.add(e[0], e[1]); 597 } 598 599 fields.sortValues(); 600 //Limsfields??? 601 602 usedFieldsParameter = new PluginParameter<String>( 603 "usedFields", 604 "Fields", 605 "The spot information that is exporter. The position is allways exported when avarage on reporter is false.", 606 new StringParameterType(null, null, true, 0, 0, 0, fields)); 607 608 List<ExtendedProperty> eps = ExtendedProperties.getProperties(ReporterData.class.toString()); 609 Collections.sort(eps, new Comparator<ExtendedProperty>() 610 { 611 public int compare(ExtendedProperty e1, ExtendedProperty e2) 612 { 613 return e1.getTitle().compareTo(e2.getTitle()); 614 } 615 }); 616 Enumeration<String, String> columns = new Enumeration<String, String>(); 617 columns.add("rep('name')", "Reporter name"); 618 columns.add("rep('externalId')", "Reporter ID"); 619 columns.add("rep('symbol')", "Gene symbol"); 620 columns.add("rep('description')", "Description"); 621 columns.add("rep('lastUpdate')", "Last updated"); 622 for (ExtendedProperty ep : eps) 623 { 624 columns.add("rep('"+ep.getName()+"')", ep.getTitle()); 625 } 626 columns.sortValues(); 627 usedColumnsParameter = new PluginParameter<String>( 628 "usedColumns", 629 "Reporter", 630 "The reporter information that is exported. An internal reporter id is allways exported.", 631 new StringParameterType(null, null, false, 0, 0, 0, columns)); 632 633 parameters.add(geneAveragesParameter); 634 parameters.add(serialFormatParameter); 635 parameters.add(usedFieldsParameter); 636 parameters.add(usedColumnsParameter); 637 638 configureJobBasefile = new RequestInformation 639 ( COMMAND_CONFIGURE_BASEFILE, 640 "Configure BASEfile export.", 641 "Here you configure the parameter for the BASEfile format.", 642 parameters ); 643 } 644 finally 645 { 646 if (dc != null) 647 { 648 dc.close(); 649 } 650 } 651 } 652 return configureJobBasefile; 653 } 260 654 261 655 … … 265 659 } 266 660 661 662 public List<AnnotationType> getExperimentalFactors(DbControl dc, BioAssaySet bas) 663 { 664 ItemQuery<AnnotationType> query = bas.getExperiment().getExperimentalFactors(); 665 query.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS); 666 query.order(Orders.asc(Hql.property("name"))); 667 return query.list(dc); 668 } 669 267 670 268 671 public Set<GuiContext> getGuiContexts() … … 282 685 Experiment:s and User:s. 283 686 */ 687 @Override 284 688 public Collection<Permissions> getPermissions() 285 689 { 286 690 if (permissions.size() == 0) 287 691 { 692 permissions.add(new Permissions(Item.ANNOTATIONTYPE, null, EnumSet.of(Permission.READ))); 693 permissions.add(new Permissions(Item.DIRECTORY, null, EnumSet.of(Permission.CREATE, Permission.WRITE))); 694 permissions.add(new Permissions(Item.EXPERIMENT, null, EnumSet.of(Permission.READ))); 288 695 permissions.add(new Permissions(Item.FILE, null, EnumSet.of(Permission.CREATE, Permission.WRITE))); 289 permissions.add(new Permissions(Item. DIRECTORY, null, EnumSet.of(Permission.CREATE, Permission.WRITE)));696 permissions.add(new Permissions(Item.RAWBIOASSAY, null, EnumSet.of(Permission.READ))); 290 697 permissions.add(new Permissions(Item.USER, null, EnumSet.of(Permission.READ))); 291 permissions.add(new Permissions(Item.EXPERIMENT, null, EnumSet.of(Permission.READ)));292 698 } 293 699 return permissions; … … 303 709 requestInformation = getConfigureJobParameters(context); 304 710 } 711 else if (command.equals(COMMAND_CONFIGURE_BASEFILE)) 712 { 713 requestInformation = getConfigureBasefileParameters(context); 714 } 305 715 return requestInformation; 306 716 } … … 322 732 323 733 734 @Override 324 735 public boolean requiresConfiguration() 325 736 { … … 328 739 329 740 741 @SuppressWarnings("unchecked") 330 742 public void run(Request request, Response response, ProgressReporter progress) 331 743 { … … 333 745 try 334 746 { 747 // Checks for file existence and file replacement is done in 748 // configure(). Here we either replace an existing file or 749 // create a new file. 335 750 String p = (String)job.getValue("path"); 336 if (p.startsWith("~/"))337 {338 User user = User.getById(dc, sc.getLoggedInUserId());339 p = "~" + user.getLogin() + p.substring(1);340 }341 751 Path path = new Path(p, Path.Type.FILE); 342 343 boolean overwrite = false;344 if ((Boolean)job.getValue("overwrite") != null)345 {346 overwrite = (Boolean)job.getValue("overwrite");347 }348 349 // Get file and set an error if the file already exist but350 // shouldn't be replaced351 752 File file = File.getByPath(dc, path, true); 352 753 file.setMimeType("text/plain"); 353 if (file.isInDatabase() && !overwrite && !file.isRemoved()) 354 { 355 throw new ItemAlreadyExistsException("File[path="+path+"]"); 356 } 357 else if(!file.isInDatabase()) 358 { 359 dc.saveItem(file); 360 } 754 if(!file.isInDatabase()) dc.saveItem(file); 361 755 362 756 BioAssaySet bioassayset=(BioAssaySet)job.getValue("bioAssaySet"); 363 757 bioassayset = BioAssaySet.getById(dc, bioassayset.getId()); 364 758 365 progress.display( 1, "Exporting ...");759 progress.display(0, "Exporting ..."); 366 760 367 761 // Add other export formats here 368 exportMeV(bioassayset,file); 369 762 String format = (String) job.getValue("fileformat"); 763 if (format.equals(FORMAT_MEV)) exportMeV(bioassayset,file,progress); 764 else if (format.equals(FORMAT_BASEFILE)) 765 { 766 List<String> reporterFields = new ArrayList<String>((List<String>) job.getValues("usedColumns")); 767 List<String> spotFields = new ArrayList<String>((List<String>) job.getValues("usedFields")); 768 769 boolean serialFormat = (Boolean) job.getValue("serialFormat"); 770 boolean geneAverage = (Boolean) job.getValue("geneAverages"); 771 772 exportBASE(bioassayset, file, Collections.EMPTY_MAP, reporterFields, spotFields, serialFormat, geneAverage); 773 } 774 else 775 { 776 throw new BaseException("Unknown format. "+format); 777 } 778 370 779 dc.commit(); 371 780 response.setDone("Bioassay set '" + bioassayset.getName() + … … 383 792 384 793 794 @Override 385 795 public boolean supportsConfigurations() 386 796 { … … 403 813 ); 404 814 private RequestInformation configureJob; 815 private RequestInformation configureJobBasefile; 405 816 private static final Set<GuiContext> guiContexts = 406 817 Collections.singleton(new GuiContext(Item.BIOASSAYSET, … … 408 819 private static final Set<Permissions> permissions = 409 820 new HashSet<Permissions>(); 821 822 //General parameters 410 823 private PluginParameter<BioAssaySet> bioAssaySetParameter; 411 824 private PluginParameter<Boolean> overwriteParameter; 412 private PluginParameter<String> saveAsParameter; 825 private PluginParameter<String> saveAsParameter; 826 private PluginParameter<String> formatParameter; 827 828 //BaseFile parameters 829 private PluginParameter<Boolean> serialFormatParameter; 830 private PluginParameter<Boolean> geneAveragesParameter; 831 private PluginParameter<String> usedFieldsParameter; 832 private PluginParameter<String> usedColumnsParameter; 833 834 // Constants 835 private static final String COMMAND_CONFIGURE_BASEFILE = "configure_basefile"; 836 private static final String FORMAT_BASEFILE = "BASEfile"; 837 private static final String FORMAT_MEV = "MeV"; 413 838 } -
trunk/src/plugins/core/net/sf/basedb/plugins/PlateFlatFileImporter.java
r2920 r2992 298 298 if (command.equals(Request.COMMAND_CONFIGURE_PLUGIN)) 299 299 { 300 List<Throwable> errors = validateRequestParameters(301 getConfigurePluginParameters(context).getParameters(), request);300 RequestInformation ri = getConfigurePluginParameters(context); 301 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 302 302 if (errors != null) 303 303 { … … 315 315 storeValue(configuration, request, minDataColumnsParameter); 316 316 storeValue(configuration, request, maxDataColumnsParameter); 317 storeValue(configuration, request, ri.getParameter(CHARSET)); 317 318 318 319 // Column mappings … … 325 326 else if (command.equals(Request.COMMAND_CONFIGURE_JOB)) 326 327 { 327 List<Throwable> errors = validateRequestParameters(328 getConfigureJobParameters(context).getParameters(), request);328 RequestInformation ri = getConfigureJobParameters(context); 329 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 329 330 if (errors != null) 330 331 { … … 338 339 storeValue(job, request, plateTypeParameter); 339 340 storeValue(job, request, fileParameter); 341 storeValue(job, request, ri.getParameter(CHARSET)); 340 342 341 343 // Error handling parameters … … 516 518 parameters.add(minDataColumnsParameter); 517 519 parameters.add(maxDataColumnsParameter); 520 parameters.add(getCharsetParameter(null, null, null)); 518 521 519 522 // Column mappings … … 557 560 parameters.add(plateTypeParameter); 558 561 parameters.add(fileParameter); 562 parameters.add(getCharsetParameter(null, null, (String)configuration.getValue(CHARSET))); 559 563 parameters.add(plateNamePrefixParameter); 560 564 parameters.add(reporterPrefixParameter); -
trunk/src/plugins/core/net/sf/basedb/plugins/PluginConfigurationExporter.java
r2942 r2992 304 304 labelElement.setText(parameterInfo.getLabel()); 305 305 newParameterElement.addContent(labelElement); 306 Element parameterDescription = new Element("description"); 307 parameterDescription.setText(parameterInfo.getDescription()); 308 newParameterElement.addContent(parameterDescription); 306 309 List<?> values = parameterInfo.getValues(); 307 310 Element classElement = new Element("class"); … … 322 325 valueElement.setText(o.toString()); 323 326 newParameterElement.addContent(valueElement); 327 324 328 } 325 329 } -
trunk/src/plugins/core/net/sf/basedb/plugins/PluginConfigurationImporter.java
r2866 r2992 88 88 extends AbstractPlugin 89 89 implements InteractivePlugin, AutoDetectingImporter 90 { 91 90 { 92 91 private static final About about = new AboutImpl 93 92 ( … … 116 115 117 116 private RequestInformation configureJob; 118 119 // Counting variables for the job120 private int numImportedConfigurations;121 private int numNotImportedConfigurations;122 117 123 118 // Variables to store the job parameters in. … … 232 227 is.close(); 233 228 234 response.setDone( getSuccessMessage());229 response.setDone("The configurations were imported successfully!"); 235 230 236 231 } … … 300 295 throws BaseException 301 296 { 302 DbControl dc = null; 303 numNotImportedConfigurations = 0;297 DbControl dc = null; 298 304 299 try 305 300 { … … 319 314 String pluginClassName = configuration.getAttributeValue("pluginClassName"); 320 315 321 try 322 { 323 PluginDefinition pluginDefinition = PluginDefinition.getByClassName(dc, pluginClassName); 324 325 PluginConfiguration pluginConfig = PluginConfiguration.getNew(dc, pluginDefinition); 326 dc.saveItem(pluginConfig); 327 pluginConfig.setName(name); 328 pluginConfig.setDescription(description); 329 330 List parameters = configuration.getChildren("parameter"); 331 setPluginConf(parameters, pluginConfig); 332 numImportedConfigurations++; 333 } 334 catch(Throwable ex) 335 { 336 numNotImportedConfigurations++; 337 } 316 317 PluginDefinition pluginDefinition = PluginDefinition.getByClassName(dc, pluginClassName); 318 319 PluginConfiguration pluginConfig = PluginConfiguration.getNew(dc, pluginDefinition); 320 dc.saveItem(pluginConfig); 321 pluginConfig.setName(name); 322 pluginConfig.setDescription(description); 323 324 List parameters = configuration.getChildren("parameter"); 325 setPluginConf(parameters, pluginConfig); 338 326 } 339 327 dc.commit(); … … 355 343 ----------------------------------------------------- 356 344 */ 357 /**358 Gets the message of how many parameters that were handled/imported of the parameters in the xml-file359 */360 private String getSuccessMessage()361 {362 StringBuilder message = new StringBuilder();363 message.append(numImportedConfigurations + " configurations were imported.\n");364 if (numNotImportedConfigurations > 0)365 {366 message.append(numNotImportedConfigurations + " configurations were not imported.\n");367 }368 return message.toString();369 }370 345 371 346 private RequestInformation getConfiguredJobParameters() … … 413 388 Returns null if this importer doesn't support the class. 414 389 */ 415 private ParameterType getParameterType(Class parameterClass )390 private ParameterType getParameterType(Class parameterClass, List<?> values) 416 391 { 417 392 if (parameterClass.equals(Boolean.class)) return new BooleanParameterType(); … … 421 396 else if (parameterClass.equals(Integer.class)) return new IntegerParameterType(); 422 397 else if (parameterClass.equals(Long.class)) return new LongParameterType(); 423 else if (parameterClass.equals(String.class)) return new StringParameterType(); 398 else if (parameterClass.equals(String.class)) 399 { 400 StringParameterType stp = null; 401 if (values != null && !values.isEmpty()) 402 { 403 int maxLength = 0; 404 for (Object obj : values) 405 { 406 if (obj instanceof String) 407 { 408 String str = obj.toString(); 409 maxLength = maxLength < str.length() ? str.length() : maxLength; 410 } 411 } 412 stp = new StringParameterType(maxLength, null, false); 413 } 414 else 415 { 416 stp = new StringParameterType(); 417 } 418 return stp; 419 420 } 424 421 else return null; 425 422 } … … 440 437 String name = parameter.getChildText("name"); 441 438 String cl = parameter.getChildText("class"); 442 String label = parameter.getChildText("label").length() > 0 ? parameter.getChildText("label") : name; 439 String label = parameter.getChildText("label"); 440 if (label == null || label.length() == 0) label = name; 441 String description = parameter.getChildText("description"); 443 442 Class clazz = null; 444 443 List<?> values = null; … … 448 447 clazz = Class.forName(cl); 449 448 values = getValueList(parameter, clazz); 450 plc.setParameterValues(name,label, "", getParameterType(clazz), values); 449 ParameterType pType = getParameterType(clazz, values); 450 plc.setParameterValues(name,label, description, pType, values); 451 451 } 452 452 } -
trunk/src/plugins/core/net/sf/basedb/plugins/PrintMapFlatFileImporter.java
r2872 r2992 236 236 if (command.equals(Request.COMMAND_CONFIGURE_JOB)) 237 237 { 238 List<Throwable> errors =239 validateRequestParameters(getConfigureJobParameters(context).getParameters(), request);238 RequestInformation ri = getConfigureJobParameters(context); 239 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 240 240 if (errors != null) 241 241 { … … 244 244 } 245 245 storeValue(job, request, fileParameter); 246 storeValue(job, request, ri.getParameter(CHARSET)); 246 247 storeValue(job, request, arrayDesignParameter); 247 248 … … 480 481 // Parameters for CONFIGURE_JOB 481 482 List<PluginParameter<?>> parameters = new ArrayList<PluginParameter<?>>(); 483 parameters.add(arrayDesignParameter); 482 484 parameters.add(fileParameter); 483 parameters.add( arrayDesignParameter);485 parameters.add(getCharsetParameter(null, null, null)); 484 486 485 487 // Error handling parameters -
trunk/src/plugins/core/net/sf/basedb/plugins/RawDataFlatFileImporter.java
r2751 r2992 356 356 { 357 357 RawDataType rdt = RawDataTypes.getRawDataType((String)configuration.getValue("rawDataType")); 358 List<Throwable> errors = validateRequestParameters(getConfigureParserParameters(rdt).getParameters(), request); 358 RequestInformation ri = getConfigureParserParameters(rdt); 359 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 359 360 if (errors != null) 360 361 { … … 372 373 storeValue(configuration, request, minDataColumnsParameter); 373 374 storeValue(configuration, request, maxDataColumnsParameter); 375 storeValue(configuration, request, ri.getParameter(CHARSET)); 374 376 375 377 // Column mappings … … 383 385 else if (command.equals(Request.COMMAND_CONFIGURE_JOB)) 384 386 { 385 List<Throwable> errors = validateRequestParameters(getConfigureJobParameters(context).getParameters(), request); 387 RequestInformation ri = getConfigureJobParameters(context); 388 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 386 389 if (errors != null) 387 390 { … … 390 393 } 391 394 395 storeValue(job, request, rawBioAssayParameter); 392 396 storeValue(job, request, fileParameter); 393 storeValue(job, request, r awBioAssayParameter);397 storeValue(job, request, ri.getParameter(CHARSET)); 394 398 395 399 // Error handling parameters … … 608 612 parameters.add(rawBioAssayParameter); 609 613 parameters.add(fileParameter); 614 parameters.add(getCharsetParameter(null, null, (String)configuration.getValue(CHARSET))); 610 615 611 616 // Error handling parameters … … 706 711 parameters.add(minDataColumnsParameter); 707 712 parameters.add(maxDataColumnsParameter); 713 parameters.add(getCharsetParameter(null, null, null)); 708 714 709 715 // Column mappings -
trunk/src/plugins/core/net/sf/basedb/plugins/ReporterFlatFileImporter.java
r2843 r2992 287 287 if (command.equals(Request.COMMAND_CONFIGURE_PLUGIN)) 288 288 { 289 List<Throwable> errors = validateRequestParameters(getConfigurePluginParameters(context).getParameters(), request); 289 RequestInformation ri = getConfigurePluginParameters(context); 290 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 290 291 if (errors != null) 291 292 { … … 303 304 storeValue(configuration, request, minDataColumnsParameter); 304 305 storeValue(configuration, request, maxDataColumnsParameter); 306 storeValue(configuration, request, ri.getParameter(CHARSET)); 305 307 306 308 // Column mappings … … 316 318 else if (command.equals(Request.COMMAND_CONFIGURE_JOB)) 317 319 { 318 List<Throwable> errors = validateRequestParameters(getConfigureJobParameters(context).getParameters(), request); 320 RequestInformation ri = getConfigureJobParameters(context); 321 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 319 322 if (errors != null) 320 323 { … … 328 331 } 329 332 storeValue(job, request, fileParameter); 333 storeValue(job, request, ri.getParameter(CHARSET)); 330 334 storeValue(job, request, updateExistingParameter); 331 335 … … 616 620 } 617 621 parameters.add(fileParameter); 622 parameters.add(getCharsetParameter(null, null, (String)configuration.getValue(CHARSET))); 618 623 parameters.add(updateExistingParameter); 619 624 … … 671 676 parameters.add(minDataColumnsParameter); 672 677 parameters.add(maxDataColumnsParameter); 678 parameters.add(getCharsetParameter(null, null, null)); 673 679 674 680 // Column mappings -
trunk/src/plugins/core/net/sf/basedb/plugins/ReporterMapFlatFileImporter.java
r2751 r2992 304 304 if (command.equals(Request.COMMAND_CONFIGURE_PLUGIN)) 305 305 { 306 307 List<Throwable> errors = 308 validateRequestParameters(getConfigurePluginParameters(context).getParameters(), request); 306 RequestInformation ri = getConfigurePluginParameters(context); 307 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 309 308 if (errors != null) 310 309 { … … 332 331 storeValue(configuration, request, minDataColumnsParameter); 333 332 storeValue(configuration, request, maxDataColumnsParameter); 333 storeValue(configuration, request, ri.getParameter(CHARSET)); 334 334 335 335 // Column mappings … … 343 343 else if (command.equals(Request.COMMAND_CONFIGURE_JOB)) 344 344 { 345 List<Throwable> errors =346 validateRequestParameters(getConfigureJobParameters(context).getParameters(), request);345 RequestInformation ri = getConfigureJobParameters(context); 346 List<Throwable> errors = validateRequestParameters(ri.getParameters(), request); 347 347 if (errors != null) 348 348 { … … 350 350 return; 351 351 } 352 storeValue(job, request, arrayDesignParameter); 352 353 storeValue(job, request, fileParameter); 353 storeValue(job, request, arrayDesignParameter);354 354 storeValue(job, request, ri.getParameter(CHARSET)); 355 355 356 // Error handling parameters 356 357 storeValue(job, request, defaultErrorParameter); … … 530 531 parameters.add(arrayDesignParameter); 531 532 parameters.add(fileParameter); 533 parameters.add(getCharsetParameter(null, null, (String)configuration.getValue(CHARSET))); 532 534 533 535 // Error handling parameters … … 566 568 parameters.add(minDataColumnsParameter); 567 569 parameters.add(maxDataColumnsParameter); 570 parameters.add(getCharsetParameter(null, null, null)); 568 571 569 572 // Column mappings -
trunk/src/test/TestAnalyzePluginUtil.java
r2751 r2992 64 64 parser.setDataHeaderRegexp(Pattern.compile("\"Block\"\\t\"Column\"\\t\"Row\"\\t\"Name\"\\t\"ID\".*")); 65 65 parser.setDataSplitterRegexp(Pattern.compile("\\t")); 66 parser.setInputStream(FileUtil.getInputStream(new java.io.File("test.rawdata.import.txt")) );66 parser.setInputStream(FileUtil.getInputStream(new java.io.File("test.rawdata.import.txt")), "ISO-8859-1"); 67 67 parser.parseHeaders(); 68 68 -
trunk/src/test/TestArrayDesign.java
r2959 r2992 532 532 parser.setDataHeaderRegexp(Pattern.compile(headerRegexp)); 533 533 parser.setDataSplitterRegexp(Pattern.compile("\\t")); 534 parser.setInputStream(FileUtil.getInputStream(new java.io.File(filename)) );534 parser.setInputStream(FileUtil.getInputStream(new java.io.File(filename)), "ISO-8859-1"); 535 535 parser.parseHeaders(); 536 536 -
trunk/src/test/TestFlatFileParser.java
r2959 r2992 89 89 { 90 90 InputStream in = FileUtil.getInputStream(new java.io.File(file)); 91 ffp.setInputStream(in );91 ffp.setInputStream(in, "ISO-8859-1"); 92 92 FlatFileParser.LineType last_line_type = ffp.parseHeaders(); 93 93 int i = 0; … … 129 129 Set<String> sections = new HashSet<String>(Arrays.asList("FileInformation", "Block1", "Block2", "Block3", "Block4", "mapping")); 130 130 InputStream in = FileUtil.getInputStream(new java.io.File(file)); 131 ffp.setInputStream(in );131 ffp.setInputStream(in, "ISO-8859-1"); 132 132 FlatFileParser.Line section; 133 133 while (ffp.hasMoreSections()) -
trunk/src/test/TestParameterType.java
r2304 r2992 108 108 } 109 109 110 @SuppressWarnings("unchecked") 110 111 static void test_validation(List<ParameterType> parameters, int newsId, int newsId2) 111 112 { -
trunk/src/test/TestPlate.java
r2304 r2992 154 154 ffp.setDataHeaderRegexp(Pattern.compile(headerRegexp)); 155 155 ffp.setDataSplitterRegexp(Pattern.compile("\\t")); 156 ffp.setInputStream(FileUtil.getInputStream(new java.io.File(filename)) );156 ffp.setInputStream(FileUtil.getInputStream(new java.io.File(filename)), "ISO-8859-1"); 157 157 ffp.parseHeaders(); 158 158 PlateType pt = PlateType.getById(dc, plateTypeId); -
trunk/src/test/TestRawBioAssay.java
r2959 r2992 428 428 parser.setDataHeaderRegexp(Pattern.compile("\"Block\"\\t\"Column\"\\t\"Row\"\\t\"Name\"\\t\"ID\".*")); 429 429 parser.setDataSplitterRegexp(Pattern.compile("\\t")); 430 parser.setInputStream(FileUtil.getInputStream(new java.io.File(filename)) );430 parser.setInputStream(FileUtil.getInputStream(new java.io.File(filename)), "ISO-8859-1"); 431 431 parser.parseHeaders(); 432 432 -
trunk/src/test/TestReporter.java
r2959 r2992 248 248 ffp.setDataHeaderRegexp(Pattern.compile(headerRegexp)); 249 249 ffp.setDataSplitterRegexp(Pattern.compile("\\t")); 250 ffp.setInputStream(FileUtil.getInputStream(new java.io.File(filename)) );250 ffp.setInputStream(FileUtil.getInputStream(new java.io.File(filename)), "ISO-8859-1"); 251 251 ffp.parseHeaders(); 252 252 ReporterBatcher rb = ReporterBatcher.getNew(dc); -
trunk/www/admin/pluginconfigurations/index.jsp
r2978 r2992 145 145 int pluginDefinitionId = Values.getInt(request.getParameter("plugindefinition_id"), -1); 146 146 PluginDefinition plugin = PluginDefinition.getById(dc, pluginDefinitionId); 147 if ( configure &&!plugin.supportsConfigurations())147 if (!plugin.supportsConfigurations()) 148 148 { 149 149 throw new WebException("popup", "Configurations are not supported", -
trunk/www/biomaterials/extracts/edit_extract.jsp
r2978 r2992 378 378 var frm = document.forms['extract']; 379 379 var usedQuantity = frm.used_quantity.value; 380 usedQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg';380 var displayQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg'; 381 381 for (var i = 0; i < frm.extracts.length; i++) // > 382 382 { … … 385 385 { 386 386 option.item.value = usedQuantity; 387 var text = option.text.replace(/\[.*\]/, '['+ usedQuantity+']');387 var text = option.text.replace(/\[.*\]/, '['+displayQuantity+']'); 388 388 option.text = text; 389 389 } -
trunk/www/biomaterials/extracts/view_extract.jsp
r2978 r2992 314 314 extractsQuery.order(Orders.asc(Hql.property("name"))); 315 315 ItemResultList<Extract> extracts = extractsQuery.list(dc); 316 String extractLink = "index.jsp?ID="+ID;317 316 %> 318 317 <h4 class="docked">Pooled from extracts</h4> … … 343 342 %> 344 343 <tbl:row> 345 <tbl:cell column="name"><%=Base.get EncodedName(item, false, extractLink)%></tbl:cell>344 <tbl:cell column="name"><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 346 345 <tbl:cell column="quantity"><%=Values.formatNumber(creationEvent.getUsedQuantity(item), 2)%></tbl:cell> 347 346 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> … … 383 382 title="Name" 384 383 /> 384 <tbl:columndef 385 id="quantity" 386 title="Used quantity (µg)" 387 /> 385 388 <tbl:columndef 386 389 id="description" … … 396 399 <tbl:row> 397 400 <tbl:cell column="name"><%=Base.getLinkedName(ID, lbe, false, true)%></tbl:cell> 401 <tbl:cell column="quantity"><%=Values.formatNumber(lbe.getCreationEvent().getUsedQuantity(extract), 2)%></tbl:cell> 398 402 <tbl:cell column="description"><%=HTML.encodeTags(lbe.getDescription())%></tbl:cell> 399 403 </tbl:row> -
trunk/www/biomaterials/labeledextracts/edit_labeledextract.jsp
r2978 r2992 408 408 var frm = document.forms['labeledextract']; 409 409 var usedQuantity = frm.used_quantity.value; 410 usedQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg';410 var displayQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg'; 411 411 for (var i = 0; i < frm.labeledextracts.length; i++) // > 412 412 { … … 415 415 { 416 416 option.item.value = usedQuantity; 417 var text = option.text.replace(/\[.*\]/, '['+ usedQuantity+']');417 var text = option.text.replace(/\[.*\]/, '['+displayQuantity+']'); 418 418 option.text = text; 419 419 } -
trunk/www/biomaterials/labeledextracts/view_labeledextract.jsp
r2978 r2992 345 345 %> 346 346 <tbl:row> 347 <tbl:cell column="name"><%=Base.get EncodedName(item, false, extractLink)%></tbl:cell>347 <tbl:cell column="name"><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 348 348 <tbl:cell column="quantity"><%=Values.formatNumber(creationEvent.getUsedQuantity(item), 2)%></tbl:cell> 349 349 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> … … 382 382 title="Name" 383 383 /> 384 <tbl:columndef 385 id="quantity" 386 title="Used quantity (µg)" 387 /> 384 388 <tbl:columndef 385 389 id="description" … … 395 399 <tbl:row> 396 400 <tbl:cell column="name"><%=Base.getLinkedName(ID, hyb, false, true)%></tbl:cell> 401 <tbl:cell column="quantity"><%=Values.formatNumber(hyb.getCreationEvent().getUsedQuantity(extract), 2)%></tbl:cell> 397 402 <tbl:cell column="description"><%=HTML.encodeTags(hyb.getDescription())%></tbl:cell> 398 403 </tbl:row> -
trunk/www/biomaterials/samples/edit_sample.jsp
r2978 r2992 375 375 var frm = document.forms['sample']; 376 376 var usedQuantity = frm.used_quantity.value; 377 usedQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg';377 var displayQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg'; 378 378 for (var i = 0; i < frm.samples.length; i++) // > 379 379 { … … 382 382 { 383 383 option.item.value = usedQuantity; 384 var text = option.text.replace(/\[.*\]/, '['+ usedQuantity+']');384 var text = option.text.replace(/\[.*\]/, '['+displayQuantity+']'); 385 385 option.text = text; 386 386 } -
trunk/www/biomaterials/samples/view_sample.jsp
r2978 r2992 299 299 samplesQuery.order(Orders.asc(Hql.property("name"))); 300 300 ItemResultList<Sample> samples = samplesQuery.list(dc); 301 String sampleLink = "index.jsp?ID="+ID;302 301 %> 303 302 <h4 class="docked">Pooled from samples</h4> … … 328 327 %> 329 328 <tbl:row> 330 <tbl:cell column="name"><%=Base.get EncodedName(item, false, sampleLink)%></tbl:cell>329 <tbl:cell column="name"><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 331 330 <tbl:cell column="quantity"><%=Values.formatNumber(creationEvent.getUsedQuantity(item), 2)%></tbl:cell> 332 331 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> … … 364 363 id="name" 365 364 title="Name" 365 /> 366 <tbl:columndef 367 id="quantity" 368 title="Used quantity (µg)" 366 369 /> 367 370 <tbl:columndef … … 378 381 <tbl:row> 379 382 <tbl:cell column="name"><%=Base.getLinkedName(ID, e, false, true)%></tbl:cell> 383 <tbl:cell column="quantity"><%=Values.formatNumber(e.getCreationEvent().getUsedQuantity(sample), 2)%></tbl:cell> 380 384 <tbl:cell column="description"><%=HTML.encodeTags(e.getDescription())%></tbl:cell> 381 385 </tbl:row> -
trunk/www/common/plugin/configure.jsp
r2978 r2992 166 166 } 167 167 // Finally, if the parameter has multiplicity=1, is requried and has a list of enumeration values 168 if ((values == null || values.size() == 0) && pType.getNotNull() && pType.getMultiplicity() == 1 && pType.getItems() != null) 168 if ((values == null || values.size() == 0) && pType.getNotNull() && 169 pType.getMultiplicity() == 1 && pType.getItems() != null && pType.getItems().size() > 0) 169 170 { 170 171 values = Collections.singletonList(pType.getItems().get(0)); … … 663 664 for (Throwable t : errors) 664 665 { 666 t.printStackTrace(); 665 667 %> 666 668 <li><%=t.getMessage()%><br> … … 713 715 if (multiplicity == 0) 714 716 { 715 select = "Select one or more"; 717 if (pType.getNotNull()) 718 { 719 select = "Select one or more"; 720 } 721 else 722 { 723 select = "Select zero or more"; 724 } 716 725 } 717 726 else if (multiplicity == 1) … … 721 730 else 722 731 { 723 select = "Select 1 -- "+multiplicity; 732 if (pType.getNotNull()) 733 { 734 select = "Select 1 -- " + multiplicity; 735 } 736 else 737 { 738 select = "Select 0 -- " + multiplicity; 739 } 724 740 } 725 741 %> -
trunk/www/common/plugin/index.jsp
r2978 r2992 345 345 List<Throwable> parseErrors = new LinkedList<Throwable>(); 346 346 ItemContext currentContext = (ItemContext)sc.getSessionSetting("plugin.configure.currentContext"); 347 // Clear old errors 348 sc.setSessionSetting("plugin.configure.errors.message", null); 349 sc.setSessionSetting("plugin.configure.errors.list", null); 347 350 if (parameters != null && parameters.size() > 0) 348 351 { … … 463 466 sc.setSessionSetting("plugin.configure.plugin", null); 464 467 sc.setSessionSetting("plugin.configure.config", null); 465 sc.setSessionSetting("plugin.configure.errors.message", null);466 sc.setSessionSetting("plugin.configure.errors.list", null);467 468 sc.setSessionSetting("plugin.configure.currentContext", null); 468 469 message = "Plugin configured"; … … 520 521 sc.setSessionSetting("plugin.configure.plugin", null); 521 522 sc.setSessionSetting("plugin.configure.config", null); 522 sc.setSessionSetting("plugin.configure.errors.message", null);523 sc.setSessionSetting("plugin.configure.errors.list", null);524 523 sc.setSessionSetting("plugin.configure.currentContext", null); 525 524 if (pluginResponse != null && pluginResponse.getStatus() == Response.Status.EXECUTE_IMMEDIATELY) -
trunk/www/common/plugin/parse_file.jsp
r2978 r2992 26 26 --%> 27 27 <%@ page session="false" 28 contentType="text/html; charset=UTF-8" 28 29 import="net.sf.basedb.core.SessionControl" 29 30 import="net.sf.basedb.core.DbControl" 31 import="net.sf.basedb.core.Config" 30 32 import="net.sf.basedb.core.Item" 31 33 import="net.sf.basedb.core.File" … … 47 49 48 50 <% 51 request.setCharacterEncoding("UTF-8"); 49 52 final SessionControl sc = Base.getExistingSessionControl(pageContext, true); 50 53 final String ID = sc.getId(); … … 55 58 { 56 59 String path = request.getParameter("path"); 60 String charsetName = Values.getString(request.getParameter("charset"), Config.getCharset()); 57 61 File file = null; 58 62 FlatFileParser parser = null; … … 142 146 143 147 fileInputStream = file.getDownloadStream(0); 144 parser.setInputStream(fileInputStream );148 parser.setInputStream(fileInputStream, charsetName); 145 149 lastLine = parser.parseHeaders(); 146 150 dataIsFound = lastLine == FlatFileParser.LineType.DATA || lastLine == FlatFileParser.LineType.DATA_HEADER; … … 155 159 <script language="JavaScript"> 156 160 var patterns = new Array(); 161 var columnHeaders = new Array(); 157 162 function setPattern(list, patternIndex) 158 163 { … … 171 176 if (list) 172 177 { 173 expression = list[list.selectedIndex].text;174 178 var colIndex = list[list.selectedIndex].value; 179 expression = columnHeaders[colIndex]; 175 180 list.selectedIndex = 0; 176 181 var style = Forms.getCheckedRadio(frm.expressionStyle); … … 208 213 </base:head> 209 214 <base:body onload="window.parent.adjustIFrameSize()"> 210 211 215 <t:tabcontrol id="parsedFile" 212 216 contentstyle="<%="height: "+(int)(scale*400)+"px;"%>" autoheight="false"> … … 371 375 <% 372 376 } 377 if (parser.getColumnHeaders() != null) 378 { 379 for (String columnHeader : parser.getColumnHeaders()) 380 { 381 %> 382 columnHeaders[columnHeaders.length] = '<%=HTML.javaScriptEncode(columnHeader)%>'; 383 <% 384 } 385 } 373 386 %> 374 387 </script> -
trunk/www/common/plugin/test_with_file.jsp
r2978 r2992 26 26 --%> 27 27 <%@ page session="false" 28 contentType="text/html; charset=UTF-8" 28 29 import="net.sf.basedb.core.SessionControl" 29 30 import="net.sf.basedb.core.DbControl" 30 31 import="net.sf.basedb.core.Item" 32 import="net.sf.basedb.core.Config" 31 33 import="net.sf.basedb.core.Location" 32 34 import="net.sf.basedb.util.parser.FlatFileParser" … … 34 36 import="net.sf.basedb.util.Values" 35 37 import="net.sf.basedb.clients.web.util.HTML" 38 import="java.nio.charset.Charset" 36 39 %> 37 40 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> … … 281 284 <tr valign="top"> 282 285 <td class="prompt">Lines to parse</td> 283 <td colspan="3">286 <td> 284 287 <input type="text" class="text" name="maxLines" size="12" maxlength="10" 285 288 value="<%=FlatFileParser.DEFAULT_MAX_UNKNOWN_LINES%>" 286 289 onkeypress="return Numbers.integerOnly(event)"> 290 </td> 291 <td class="prompt">Encoding</td> 292 <td> 293 <select name="charset"> 294 <% 295 String defaultCharset = Config.getCharset(); 296 for (String charset : Charset.availableCharsets().keySet()) 297 { 298 %> 299 <option value="<%=charset%>" 300 <%=defaultCharset.equalsIgnoreCase(charset) ? "selected" : ""%>><%=charset%> 301 <% 302 } 303 %> 304 </select> 287 305 </td> 288 306 </tr> -
trunk/www/exception/exception.jsp
r2978 r2992 136 136 <table border="0" cellpadding="0" cellspacing="0" class="form"> 137 137 <tr> 138 <td class="prompt"> Base version</td>139 <td class="info"><%=Application.get MajorVersion() + "." +Application.getMinorVersion() + " (build #" + Application.getBuild()+"; schema #" + Application.getSchemaVersion()+")"%></td>138 <td class="prompt">Version</td> 139 <td class="info"><%=Application.getVersionString()%></td> 140 140 </tr> 141 141 <tr> -
trunk/www/info/about.jsp
r2978 r2992 76 76 <b>Administrator:</b> <%=Values.getString(serverAdminName, "<i>- unknown -</i>")%><br> 77 77 <b>Email:</b> <%=serverAdminEmail == null ? "<i>- unknown -</i>": "<a href=\"mailto:"+serverAdminEmail+"\">"+serverAdminEmail+"</a>"%><br> 78 <b>Version:</b> <%=Application.get MajorVersion() + "." +Application.getMinorVersion() + " (build #" + Application.getBuild()+"; schema #" + Application.getSchemaVersion()+")"%><br>78 <b>Version:</b> <%=Application.getVersionString()%><br> 79 79 <br> 80 80 <font size="-1"> … … 90 90 <table border="0" cellpadding="0" cellspacing="0" class="form"> 91 91 <tr> 92 <td class="prompt"> Base version</td>93 <td class="info"><%=Application.get MajorVersion() + "." +Application.getMinorVersion() + " (build #" + Application.getBuild()+"; schema #" + Application.getSchemaVersion()+")"%></td>92 <td class="prompt">Version</td> 93 <td class="info"><%=Application.getVersionString()%></td> 94 94 </tr> 95 95 <tr> -
trunk/www/lims/arrayslides/create_wizard.jsp
r2978 r2992 109 109 return false; 110 110 } 111 if (frm.arraybatch_id && frm.arraybatch_id[frm.arraybatch_id.selectedIndex].value == 0) 111 if (frm.arraybatch_id && 112 (frm.arraybatch_id.length == 0 || frm.arraybatch_id[frm.arraybatch_id.selectedIndex].value == 0)) 112 113 { 113 114 alert("You must select an array batch"); … … 256 257 <td class="prompt">Start at</td> 257 258 <td><input <%=clazz%> type="text" name="start_at" value="1" 258 size="12" maxlength="3" 259 onkeypress="return Numbers.integerOnly(event)"></td> 259 size="12" maxlength="10" 260 onkeypress="return Numbers.integerOnly(event)"> 261 <b>Pad size</b> 262 <input <%=clazz%> type="text" name="pad_length" value="" 263 size="12" maxlength="1" 264 onkeypress="return Numbers.integerOnly(event)"> 265 <br> 266 The index number will be padded with zeroes to this length 267 (ie, 1 --> Slide.001; 10 --> Slide.010).<br> 268 Leave empty for automatic selection. 269 </td> 260 270 </tr> 261 271 <tr> … … 303 313 </tr> 304 314 <% 305 int padLength = 1; 306 int lastIndex = startAt + quantity - 1; 307 if (lastIndex >= 10) padLength = 2; 308 if (lastIndex >= 100) padLength = 3; 315 int padLength = Values.getInt(request.getParameter("pad_length")); 316 if (padLength == 0) 317 { 318 int lastIndex = startAt + quantity - 1; 319 padLength = (int)Math.log10(lastIndex) + 1; 320 } 309 321 for (int i = 0; i < quantity; i++) 310 322 { -
trunk/www/views/hybridizations/edit_hybridization.jsp
r2978 r2992 390 390 var frm = document.forms['hybridization']; 391 391 var usedQuantity = frm.used_quantity.value; 392 usedQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg';392 var displayQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg'; 393 393 for (var i = 0; i < frm.labeled_extracts.length; i++) // > 394 394 { … … 397 397 { 398 398 option.item.value = usedQuantity; 399 var text = option.text.replace(/\[.*\]/, '['+ usedQuantity+']');399 var text = option.text.replace(/\[.*\]/, '['+displayQuantity+']'); 400 400 option.text = text; 401 401 }
Note: See TracChangeset
for help on using the changeset viewer.