Changeset 4095
- Timestamp:
- Jan 21, 2008, 5:10:00 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 27 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/build.xml
r4094 r4095 61 61 62 62 Packaging: 63 package: Create *.tar.gz files with binary, source and examp le distributions63 package: Create *.tar.gz files with binary, source and exampele distributions 64 64 package.bin Create binary distribution only 65 65 package.src Create source distribution only … … 772 772 <target 773 773 name="examples.webservices" 774 depends="examples.webservices.compile,webservices.jar "774 depends="examples.webservices.compile,webservices.jar,webservices.wsdl" 775 775 description="Put together the webservices examples in the examples/webservices directory" 776 776 > … … 880 880 <target 881 881 name="web.compile" 882 depends="web.init,core.compile "882 depends="web.init,core.compile,coreplugins.compile" 883 883 description="Compile the web client application" 884 884 > … … 966 966 <target 967 967 name="webservices.init" 968 depends="core.init,coreplugins.init "968 depends="core.init,coreplugins.init,web.init" 969 969 > 970 970 <property name="webservices.src" location="${src}/webservices" … … 1024 1024 name="webservices.server.compile" 1025 1025 description="Compile the server part of webservices" 1026 depends="webservices.init,core.compile,coreplugins.compile "1026 depends="webservices.init,core.compile,coreplugins.compile,web.compile" 1027 1027 > 1028 1028 <mkdir dir="${webservices.build}/server" /> -
trunk/src/clients/web/net/sf/basedb/clients/web/fileupload/FileUpload.java
r4093 r4095 774 774 throws IOException 775 775 { 776 if (status.eof || status.atBoundary) return -1; 776 int available = end - start; 777 if (available == 0) 778 { 779 if (status.eof || status.atBoundary) return -1; 780 available = readMoreData(); 781 } 777 782 int result = -1; 778 int available = end - start;779 if (available == 0) available = readMoreData();780 783 if (available > 0) 781 784 { 782 result = buffer[start]; 785 // Important! Mask with 0xff to get values in range (0,255), NOT (-128,127) 786 result = buffer[start] & 0xff; 783 787 start++; 784 788 } -
trunk/src/clients/web/net/sf/basedb/clients/web/plugins/SimpleExport.java
r4093 r4095 468 468 template.writeHeaders(); 469 469 470 intnumExported = 0;470 long numExported = 0; 471 471 ResultIterator result = null; 472 472 try … … 506 506 if (progress != null) 507 507 { 508 int percent = (int)(100 f* numExported / totalItems);508 int percent = (int)(100L * numExported / totalItems); 509 509 progress.display(percent, numExported + " of " + totalItems + " done."); 510 510 } -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Page.java
r4093 r4095 278 278 throws JspException 279 279 { 280 StringBuilder sb = new StringBuilder(); 281 sb.append("</html>\n"); 282 try 283 { 284 pageContext.getOut().print(sb.toString()); 285 } 286 catch (Exception ex) 287 { 288 throw new JspTagException(ex.getMessage()); 280 if (type != PAGE_TYPE_INCLUDE) 281 { 282 StringBuilder sb = new StringBuilder(); 283 sb.append("</html>\n"); 284 try 285 { 286 pageContext.getOut().print(sb.toString()); 287 } 288 catch (Exception ex) 289 { 290 throw new JspTagException(ex.getMessage()); 291 } 289 292 } 290 293 return EVAL_PAGE; -
trunk/src/core/common-queries.xml
r4093 r4095 524 524 SELECT s 525 525 FROM net.sf.basedb.core.data.MimeTypeData s 526 WHERE s.extension = :extension526 WHERE LOWER(s.extension) = LOWER(:extension) 527 527 </sql> 528 528 <description> -
trunk/src/core/net/sf/basedb/core/Affymetrix.java
r4093 r4095 357 357 if (hasProgress && (index % progressInterval == 0)) 358 358 { 359 int percent = 5 + 90 * index / numProbesets;359 int percent = 5 + (int)(90L * (long)index / numProbesets); 360 360 int remain = numProbesets - index; 361 361 String created = create ? "; " + numCreated + " created" : ""; -
trunk/src/core/net/sf/basedb/core/Job.java
r4093 r4095 1279 1279 private long lastUpdate; 1280 1280 1281 private int lastValue; 1282 private int offset; 1283 1281 1284 ProgressReporterImpl(Job job, String server, ProgressReporter chained) 1282 1285 throws BaseException … … 1288 1291 this.chained = chained; 1289 1292 this.lastUpdate = 0; 1293 this.lastValue = 0; 1294 this.offset = 0; 1290 1295 } 1291 1296 … … 1299 1304 if (System.currentTimeMillis() - lastUpdate > UPDATE_INTERVAL || percent == 100) 1300 1305 { 1306 // If the percent is negative and less then the last value, an offset will be calculated. 1307 // This will adjust the percent to a realistic value. 1308 //Notice: It is only possible to give a value close to what expected. 1309 if (percent < lastValue && percent < 0) 1310 { 1311 if (Math.abs(percent) < Math.abs(lastValue)) 1312 { 1313 offset = offset + 2*Math.abs(lastValue); 1314 } 1315 else 1316 { 1317 offset = offset + 2*Math.abs(percent); 1318 } 1319 } 1320 lastValue = percent; 1321 percent = percent + offset; 1322 1301 1323 lastUpdate = System.currentTimeMillis(); 1302 1324 DbControl dc = null; -
trunk/src/core/net/sf/basedb/core/RawBioAssay.java
r4093 r4095 1164 1164 1165 1165 DataResultIterator<RawData> result = rawQuery.iterate(dc); 1166 intnumValidated = 0;1166 long numValidated = 0; 1167 1167 int numTotal = getNumDbSpots(); 1168 1168 while (result.hasNext()) … … 1221 1221 if (progress != null && numValidated % 100 == 0) 1222 1222 { 1223 int percent = 10 + ( 90 * numValidated) / numTotal;1223 int percent = 10 + ((int)(90L * numValidated) / numTotal); 1224 1224 progress.display(percent, "Validated " + numValidated + " of " + numTotal + " spots."); 1225 1225 } -
trunk/src/core/net/sf/basedb/core/SpotImages.java
r4093 r4095 472 472 if (progress != null) 473 473 { 474 intspotsDone = spotImagesPerImage*imageNumber;475 int percent = 10 + 90 * spotsDone / totalSpots;474 long spotsDone = spotImagesPerImage*imageNumber; 475 int percent = 10 + (int)(90L * spotsDone / totalSpots); 476 476 progress.display(percent, "Generating spot images ("+spotsDone+" done)..."); 477 477 } -
trunk/src/core/net/sf/basedb/util/BioAssaySetFilterUtil.java
r4093 r4095 123 123 } 124 124 125 intspotsDone = 0;125 long spotsDone = 0; 126 126 int spotsAfter = 0; 127 127 if (progress != null) progress.display(10, "Filtering spots (0 done; "+spotsTotal+" total)..."); … … 139 139 if (progress != null) 140 140 { 141 int percent = 10 + 90 * spotsDone / spotsTotal;141 int percent = 10 + (int)(90L * spotsDone / spotsTotal); 142 142 progress.display(percent, 143 143 "Filtering spot intensities ("+spotsDone+" done; "+spotsTotal+" total)..."); … … 205 205 // Prepare progress reporting 206 206 int interval = 10; // Update progress after this many spots >= 10 207 intspotsDone = 0;207 long spotsDone = 0; 208 208 int spotsAfter = 0; 209 209 if (progress != null) … … 236 236 if (spotsDone % interval == 0) 237 237 { 238 int percent = 10 + 90 * spotsDone / spotsTotal;238 int percent = 10 + (int)(90L * spotsDone / spotsTotal); 239 239 progress.display(percent, 240 240 "Filtering spot intensities ("+spotsDone+" done; "+spotsTotal+" total)..."); -
trunk/src/core/net/sf/basedb/util/IntensityCalculatorUtil.java
r4093 r4095 305 305 int maxPosition = 0; 306 306 307 intspotsDone = 0; // Number of calculated spots307 long spotsDone = 0; // Number of calculated spots 308 308 int totalSpots = 0; // Total number of spots 309 309 int interval = 0; // Interval between reporter to the progress reporter … … 426 426 if (spotsDone % interval == 0) 427 427 { 428 int percent = 10 + 90 * spotsDone / totalSpots;428 int percent = 10 + (int)((90L * spotsDone) / totalSpots); 429 429 progress.display(percent, "Calculating spot intensities ("+spotsDone+" done)..."); 430 430 } -
trunk/src/core/net/sf/basedb/util/parser/FlatFileParser.java
r4093 r4095 47 47 import net.sf.basedb.core.BaseException; 48 48 import net.sf.basedb.core.Config; 49 import net.sf.basedb.util.InputStreamTracker; 49 50 50 51 /** … … 176 177 177 178 /** 179 For keeping track of the number of bytes parsed. 180 */ 181 private InputStreamTracker tracker; 182 183 /** 178 184 The regular expression for matching a header line. 179 185 */ … … 522 528 { 523 529 Charset cs = Charset.forName(charsetName == null ? Config.getCharset() : charsetName); 524 this.reader = new BufferedReader(new InputStreamReader(in, cs)); 530 this.tracker = new InputStreamTracker(in); 531 this.reader = new BufferedReader(new InputStreamReader(tracker, cs)); 525 532 } 526 533 … … 1116 1123 correspond to the number of parsed bytes depending on the character 1117 1124 set of the file. 1125 @see #getParsedBytes() 1118 1126 */ 1119 1127 public long getParsedCharacters() 1120 1128 { 1121 1129 return parsedCharacters; 1130 } 1131 1132 /** 1133 Get the number of parsed bytes so far. This value may or may not 1134 correspond to the number of parsed characters depending on the character 1135 set of the file. 1136 @since 2.5.1 1137 @see #getParsedCharacters() 1138 */ 1139 public long getParsedBytes() 1140 { 1141 return tracker == null ? 0 : tracker.getNumRead(); 1122 1142 } 1123 1143 -
trunk/src/core/net/sf/basedb/util/zip/TarFilePacker.java
r4093 r4095 97 97 if (lastModified > 0) entry.setModTime(lastModified); 98 98 entry.setSize(size); 99 tar.putNextEntry(entry);99 TarUtil.putNextEntry(entry, tar); 100 100 if (!isDirectory) FileUtil.copy(in, tar); 101 101 tar.closeEntry(); -
trunk/src/plugins/core/net/sf/basedb/plugins/AbstractFlatFileImporter.java
r4093 r4095 542 542 if (section != null && section.type() == FlatFileParser.LineType.SECTION) 543 543 { 544 if (progress != null) progress.display(getProgress(ffp .getParsedCharacters()), "Parsing section "+section.name()+"...");544 if (progress != null) progress.display(getProgress(ffp), "Parsing section "+section.name()+"..."); 545 545 try 546 546 { … … 571 571 else 572 572 { 573 if (progress != null) progress.display(getProgress(ffp .getParsedCharacters()), "Parsing headers...");573 if (progress != null) progress.display(getProgress(ffp), "Parsing headers..."); 574 574 } 575 575 FlatFileParser.LineType result = ffp.parseHeaders(); … … 609 609 " on line " + (line == null ? "-1" : line.lineNo() + ": " + StringUtil.trimString(line.line(), 20)), t); 610 610 } 611 if (progress != null) progress.display(getProgress(ffp .getParsedCharacters()), "Parsing data...");611 if (progress != null) progress.display(getProgress(ffp), "Parsing data..."); 612 612 int progressLine = 0; 613 613 … … 640 640 if (progress != null) 641 641 { 642 progress.display(getProgress(ffp .getParsedCharacters()), "Parsing data... (" + ffp.getParsedLines() + " lines so far)");642 progress.display(getProgress(ffp), "Parsing data... (" + ffp.getParsedLines() + " lines so far)"); 643 643 } 644 644 } … … 685 685 // ------------------------------------------- 686 686 687 private int getProgress( long parsedCharacters)688 { 689 return (int) (100 * parsedCharacters/ fileSize);687 private int getProgress(FlatFileParser ffp) 688 { 689 return (int) (100 * ffp.getParsedBytes() / fileSize); 690 690 } 691 691 -
trunk/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java
r4093 r4095 1806 1806 case STRING: 1807 1807 { 1808 StringParameterType t = new StringParameterType( 255, defaultValue, false, 1, new Integer(options), 1);1808 StringParameterType t = new StringParameterType(65535, defaultValue, false, 1, new Integer(options), 1); 1809 1809 parameter = new PluginParameter<String>(name, commonName, "", t); 1810 1810 break; … … 1827 1827 case HIDDEN_STRING: 1828 1828 { 1829 StringParameterType t = new StringParameterType( 255, defaultValue, false, 1, 0, 1);1829 StringParameterType t = new StringParameterType(65535, defaultValue, false, 1, 0, 1); 1830 1830 parameter = new PluginParameter<String>(name, null, "", t); 1831 1831 break; … … 1855 1855 enums.add(at.getName(), at.getName()); 1856 1856 } 1857 StringParameterType t = new StringParameterType( 255, null, false, 1, Values.getInt(options, 30), 1, enums);1857 StringParameterType t = new StringParameterType(65535, null, false, 1, Values.getInt(options, 30), 1, enums); 1858 1858 parameter = new PluginParameter<String>(name, commonName, "", t); 1859 1859 break; … … 1861 1861 case ENUMERATION: 1862 1862 { 1863 StringParameterType t = new StringParameterType( 255, defaultValue, false, 1, Values.getInt(options, 30), 1, enumOptions);1863 StringParameterType t = new StringParameterType(65535, defaultValue, false, 1, Values.getInt(options, 30), 1, enumOptions); 1864 1864 parameter = new PluginParameter<String>(name, commonName, "", t); 1865 1865 break; -
trunk/src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java
r4093 r4095 685 685 int nof_reporters=bioassayset.getNumReporters(); 686 686 int progress_report_interval=nof_reporters/10; 687 intnof_processed_reporters=0;687 long nof_processed_reporters=0; 688 688 while (spotData.hasNext()) 689 689 { 690 690 if (progress != null && (nof_processed_reporters%progress_report_interval == 0)) 691 691 { 692 progress.display( 100 * nof_processed_reporters / nof_reporters,692 progress.display((int)(100L * nof_processed_reporters / nof_reporters), 693 693 "Exporting ... " + nof_processed_reporters + " of " + 694 694 nof_reporters + " done."); … … 781 781 int nof_spots=bioassayset.getNumSpots(); 782 782 int progress_spot_interval=nof_spots/10; 783 intnof_processed_spots=0;783 long nof_processed_spots=0; 784 784 while (spotData.hasNext()) 785 785 { … … 791 791 (nof_processed_spots%progress_spot_interval == 0)) 792 792 { 793 progress.display( 100 * nof_processed_spots / nof_spots,793 progress.display((int)(100L * nof_processed_spots / nof_spots), 794 794 "Exporting ..." + nof_processed_spots + " of " + 795 795 nof_spots + " done."); -
trunk/src/plugins/core/net/sf/basedb/plugins/IlluminaRawDataImporter.java
r4093 r4095 88 88 import net.sf.basedb.util.parser.FlatFileParser.Data; 89 89 import net.sf.basedb.util.parser.FlatFileParser.Line; 90 import net.sf.basedb.util.parser.FlatFileParser.LineType; 90 91 91 92 /** … … 165 166 Arrays.asList(new String[] {"COORDINATE", "POSITION", "FEATURE_ID" } )) 166 167 ); 167 168 168 169 169 private static final PluginParameter<String> invalidColumnsErrorParameter = new PluginParameter<String>( … … 290 290 storeValue(job, request, fileParameter); 291 291 storeValue(job, request, ri.getParameter(CHARSET)); 292 storeValue(job, request, ri.getParameter(DECIMAL_SEPARATOR)); 292 293 293 294 // Associations … … 343 344 Create a FlatFileParser that can parse Illumina data files: 344 345 <ul> 345 <li>Data splitter: ,346 <li>Data splitter: (,|\t) 346 347 <li>Header regexp: (.+)=(.*?),* 347 <li>Data header: TargetI d,.*348 <li>Data header: TargetID(,|\t).* 348 349 </ul> 350 NOTE! To begin with we support both comma and tab as column splitter but 351 later on (in {@link #isImportable(FlatFileParser)}) when we know which one is actually 352 used, we change this in the parser. We need to do this since numbers may 353 use comma as decimal separator. 349 354 */ 350 355 @Override … … 352 357 throws BaseException 353 358 { 359 String separator = "(,|\\t)"; 354 360 FlatFileParser ffp = new FlatFileParser(); 355 ffp.setDataSplitterRegexp(Pattern.compile( ","));356 ffp.setDataHeaderRegexp(Pattern.compile("TargetID ,.*"));361 ffp.setDataSplitterRegexp(Pattern.compile(separator)); 362 ffp.setDataHeaderRegexp(Pattern.compile("TargetID"+separator + ".*")); 357 363 ffp.setHeaderRegexp(Pattern.compile("(.+)=(.*?),*")); 358 364 return ffp; 359 365 } 360 366 /** 361 @return A lways "dot"367 @return As specified by job parameter or "dot" if not 362 368 */ 363 369 @Override 364 370 protected String getDecimalSeparator() 365 371 { 366 return "dot"; 372 String separator = super.getDecimalSeparator(); 373 if (separator == null) separator = "dot"; 374 return separator; 367 375 } 368 376 … … 376 384 { 377 385 String firstLine = ffp.getLineCount() >= 1 ? ffp.getLine(0).line() : null; 378 return firstLine != null && firstLine.contains("Illumina") ; 386 boolean isIllumina = firstLine != null && firstLine.contains("Illumina"); 387 if (isIllumina) 388 { 389 String separator = ","; 390 FlatFileParser.Line lastLine = ffp.getLine(ffp.getLineCount()-1); 391 if (lastLine.type() == LineType.DATA_HEADER) 392 { 393 int firstTab = lastLine.line().indexOf("\t"); 394 if (firstTab > 0 && firstTab < lastLine.line().indexOf(",")) 395 { 396 separator = "\\t"; 397 } 398 ffp.setDataSplitterRegexp(Pattern.compile(separator)); 399 } 400 } 401 return isIllumina; 379 402 } 380 403 … … 649 672 parameters.add(fileParameter); 650 673 parameters.add(getCharsetParameter(null, null, null)); 674 parameters.add(getDecimalSeparatorParameter(null, null, (String)job.getValue(DECIMAL_SEPARATOR))); 651 675 652 676 // parameters for scan, protocol, software and array design -
trunk/src/plugins/core/net/sf/basedb/plugins/LowessNormalization.java
r4093 r4095 408 408 query.restrict(intensityRestriction); 409 409 long numSpots = query.count(dc); 410 intnormalizedSpots = 0;410 long normalizedSpots = 0; 411 411 if (progress != null) progress.display((int)(normalizedSpots / numSpots * 100), normalizedSpots + " spots normalized"); 412 412 … … 504 504 } 505 505 normalizedSpots += smoothCurve.size(); 506 if (progress != null) progress.display((int)((normalizedSpots * 100 ) / numSpots), normalizedSpots + " spots normalized");506 if (progress != null) progress.display((int)((normalizedSpots * 100L) / numSpots), normalizedSpots + " spots normalized"); 507 507 } 508 508 fromBlock = toBlock + 1; -
trunk/src/plugins/core/net/sf/basedb/plugins/MedianRatioNormalization.java
r4093 r4095 349 349 query.restrict(intensityRestriction); 350 350 long numSpots = query.count(dc); 351 intnormalizedSpots = 0;351 long normalizedSpots = 0; 352 352 if (progress != null) progress.display((int)(normalizedSpots / numSpots * 100), normalizedSpots + " spots normalized"); 353 353 … … 441 441 } 442 442 normalizedSpots += toIndex - fromIndex; 443 if (progress != null) progress.display((int)((normalizedSpots * 100 ) / numSpots), normalizedSpots + " spots normalized");443 if (progress != null) progress.display((int)((normalizedSpots * 100L) / numSpots), normalizedSpots + " spots normalized"); 444 444 } 445 445 fromBlock = toBlock + 1; -
trunk/src/plugins/core/net/sf/basedb/plugins/PackedFileExporter.java
r4093 r4095 356 356 // Get parameters 357 357 Directory rootDir = (Directory)job.getValue("root"); 358 rootDir = Directory.getById(dc, rootDir.getId()); 358 359 List<Integer> files = (List<Integer>)job.getValues("files"); 359 360 List<Integer> directories = (List<Integer>)job.getValues("directories"); -
trunk/src/plugins/core/net/sf/basedb/plugins/TarFileUnpacker.java
r4093 r4095 24 24 package net.sf.basedb.plugins; 25 25 26 import java.io.BufferedInputStream; 26 27 import java.io.IOException; 27 28 import java.io.InputStream; … … 53 54 import net.sf.basedb.util.Values; 54 55 import net.sf.basedb.util.zip.AbstractFileUnpacker; 56 import net.sf.basedb.util.zip.TarUtil; 55 57 56 58 /** … … 138 140 if (isGzip) 139 141 { 140 tarStream = new TarInputStream(new GZIPInputStream( pin));142 tarStream = new TarInputStream(new GZIPInputStream(new BufferedInputStream(pin))); 141 143 } 142 144 else if (isBzip) … … 145 147 pin.read(); 146 148 pin.read(); 147 tarStream = new TarInputStream(new CBZip2InputStream( pin));149 tarStream = new TarInputStream(new CBZip2InputStream(new BufferedInputStream(pin))); 148 150 } 149 151 else … … 160 162 long totalUnpacked = 0; 161 163 int numFiles = 0; 162 163 while ((entry = tarStream.getNextEntry()) != null) 164 while ((entry = TarUtil.getNextEntry(tarStream)) != null) 164 165 { 165 166 String subPath = entry.getName(); -
trunk/src/test/net/sf/basedb/test/FileUtil.java
r4093 r4095 27 27 28 28 import org.apache.tools.bzip2.CBZip2InputStream; 29 30 import com.ice.tar.TarInputStream; 29 31 30 32 import net.sf.basedb.core.DbControl; … … 66 68 67 69 boolean isBzip = false; 70 boolean isTar = false; 68 71 if (filename.endsWith(".bz2")) 69 72 { 70 73 isBzip = true; 71 74 filename = filename.substring(0, filename.length()-4); 75 } 76 if (filename.endsWith(".tar")) 77 { 78 isTar = true; 79 filename = filename.substring(0, filename.length() - 4); 72 80 } 73 81 … … 96 104 toUpload = new CBZip2InputStream(toUpload); 97 105 } 106 if (isTar) 107 { 108 // Assume that the TAR only contains a single file 109 TarInputStream tar = new TarInputStream(toUpload); 110 tar.getNextEntry(); 111 toUpload = tar; 112 } 98 113 file.upload(toUpload, false, true); 99 114 } -
trunk/src/test/net/sf/basedb/test/roles/AdminTest.java
r4093 r4095 120 120 dc = TestUtil.getDbControl(); 121 121 File reporters = FileUtil.uploadFile(dc, "/mouse", "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE); 122 File affyReporters = FileUtil.uploadFile(dc, "/affymetrix/annotations", "MG_U74Av2_annot.csv. bz2", FileType.REPORTER);122 File affyReporters = FileUtil.uploadFile(dc, "/affymetrix/annotations", "MG_U74Av2_annot.csv.tar.bz2", FileType.REPORTER); 123 123 dc.commit(); 124 124 -
trunk/src/test/net/sf/basedb/test/roles/PowerUserTest.java
r4093 r4095 161 161 File plates = FileUtil.uploadFile(dc, "/mouse", "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE); 162 162 File printMap = FileUtil.uploadFile(dc, "/mouse", "printmap.mouse.v4.37k.tam", FileType.PRINT_MAP); 163 File cdfFile = FileUtil.uploadFile(dc, "/affymetrix/cdf", "MG_U74Av2.cdf. bz2", FileType.REPORTER_MAP);163 File cdfFile = FileUtil.uploadFile(dc, "/affymetrix/cdf", "MG_U74Av2.cdf.tar.bz2", FileType.REPORTER_MAP); 164 164 dc.commit(); 165 165 -
trunk/src/test/net/sf/basedb/test/roles/UserTest.java
r4093 r4095 142 142 File rawData2DyeSwap = FileUtil.uploadFile(dc, "/mouse", "genepix.mouse.v4.37k.24h.dyeswap.gpr", FileType.RAW_DATA); 143 143 144 File affy1 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1761.cel. bz2", FileType.RAW_DATA);145 File affy2 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1762.cel. bz2", FileType.RAW_DATA);146 File affy3 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1763.cel. bz2", FileType.RAW_DATA);144 File affy1 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1761.cel.tar.bz2", FileType.RAW_DATA); 145 File affy2 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1762.cel.tar.bz2", FileType.RAW_DATA); 146 File affy3 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1763.cel.tar.bz2", FileType.RAW_DATA); 147 147 dc.commit(); 148 148 -
trunk/www/common/annotations/list_annotations.jsp
r4093 r4095 389 389 } 390 390 %> 391 </div>392 391 393 392 </base:body> -
trunk/www/views/experiments/bioassaysets/view_bioassayset.jsp
r4093 r4095 174 174 } 175 175 } 176 function changeImage(imageId, url) 177 { 176 function runItemPlugin(cmd) 177 { 178 Main.openPopup('index.jsp?ID=<%=ID%>&cmd='+cmd+'&experiment_id=<%=experimentId%>&item_id=<%=itemId%>', 'RunPlugin'+cmd, 740, 540); 179 } 180 var imageQueue = new Array(); 181 var nextImage = 0; 182 function addImage(imageId, url) 183 { 184 imageQueue[imageQueue.length] = imageId; 178 185 var img = document.getElementById(imageId); 179 img.src = url; 180 } 181 function runItemPlugin(cmd) 182 { 183 Main.openPopup('index.jsp?ID=<%=ID%>&cmd='+cmd+'&experiment_id=<%=experimentId%>&item_id=<%=itemId%>', 'RunPlugin'+cmd, 740, 540); 186 img.realSrc = url; 187 } 188 function imageLoaded() 189 { 190 nextImage++; 191 prepareNextImage(); 192 } 193 function prepareNextImage() 194 { 195 if (imageQueue.length > nextImage) 196 { 197 var imageId = imageQueue[nextImage]; 198 var img = document.getElementById(imageId); 199 img.src = '../../../images/plot_generating_400x300.gif'; 200 setTimeout('loadNextImage()', 100); 201 } 202 } 203 function loadNextImage() 204 { 205 if (imageQueue.length > nextImage) 206 { 207 var imageId = imageQueue[nextImage]; 208 var img = document.getElementById(imageId); 209 img.onload = imageLoaded; 210 img.src = img.realSrc; 211 } 184 212 } 185 213 </script> 214 <style> 215 .plot { 216 border: 1px solid #666666; 217 background-image: url('../../../images/plot_empty_400x300.png'); 218 } 219 </style> 186 220 </base:head> 187 <base:body >221 <base:body onload="loadNextImage()"> 188 222 <p> 189 223 <p:path> … … 481 515 ItemQuery<BioAssay> bioAssayQuery = bioAssaySet.getBioAssays(); 482 516 bioAssayQuery.order(Orders.asc(Hql.property("name"))); 517 StringBuilder script = new StringBuilder(); 483 518 for (BioAssay bioAssay : bioAssayQuery.list(dc)) 484 519 { … … 488 523 url += "&filter="+filter; 489 524 url += "&title="+HTML.urlEncode(bioAssay.getName()); 525 script.append("addImage('MA").append(bioAssay.getId()).append("','"). 526 append(url).append("');\n"); 490 527 %> 491 528 <img id="MA<%=bioAssay.getId()%>" 492 src="../../../images/ plot_generating_400x300.gif"493 width="400" height="300" 529 src="../../../images/transparent_pixel.gif" 530 width="400" height="300" 494 531 alt="MA-plot for bioassay <%=HTML.encodeTags(bioAssay.getName())%>" 495 style="border: 1px solid #666666;"> 496 <script language="JavaScript"> 497 setTimeout("changeImage('MA<%=bioAssay.getId()%>', '<%=url%>')", 100); 498 </script> 532 class="plot" 533 > 499 534 <% 500 535 } 536 %> 537 <script language="JavaScript"> 538 <%=script%> 539 </script> 540 <% 501 541 } 502 542 %> … … 513 553 String xLabel = HTML.urlEncode("A, log10(ch1 * ch2) / 2"); 514 554 String yLabel = HTML.urlEncode("M, log2(ch1 / ch2)"); 555 StringBuilder script = new StringBuilder(); 515 556 for (BioAssay bioAssay : bioAssayQuery.list(dc)) 516 557 { … … 519 560 url += "&xLabel="+xLabel+"&yLabel="+yLabel; 520 561 url += "&title="+HTML.urlEncode(bioAssay.getName()); 562 script.append("addImage('CF").append(bioAssay.getId()).append("','"). 563 append(url).append("');\n"); 521 564 %> 522 565 <img id="CF<%=bioAssay.getId()%>" 523 src="../../../images/ plot_generating_400x300.gif"524 width="400" height="300" 566 src="../../../images/transparent_pixel.gif" 567 width="400" height="300" 525 568 alt="Correction factor plot for bioassay <%=HTML.encodeTags(bioAssay.getName())%>" 526 style="border: 1px solid #666666;"> 527 <script language="JavaScript"> 528 setTimeout("changeImage('CF<%=bioAssay.getId()%>', '<%=url%>')", 100); 529 </script> 569 class="plot" 570 > 530 571 <% 531 572 } 573 %> 574 <script language="JavaScript"> 575 <%=script%> 576 </script> 577 <% 532 578 } 533 579 %>
Note: See TracChangeset
for help on using the changeset viewer.