[ome-users] Problem with Spreadsheet Importer

Tom Macura tm289 at cam.ac.uk
Thu Aug 9 03:04:43 BST 2007


Hi Bryson,

Thanks a lot for your email.

You were absolutely right -- there was a bug. The spreadsheet  
importer has an internal data-structure listing indices to all the  
columns. These indicies need to be sorted, but the spreadsheet  
importer was using alphabetical sort ('1','10','2','3') instead of  
numerical sort ('1','2','3',...,'10'). That's why the imports seemed  
so "confused". We didn't notice this bug before because all our  
spreadsheets have less than 10 columns.

I fixed this bug and was able to import the "advanced" spreadsheet no- 
problems. This fix will be included in 2.6.1. You can use the fixed  
code now from CVS (cvs checkout -r OME_2_6_0 OME).

>  One of the main reasons why we chose OME was because it allows for  
> custom mass-annotation of images.
We use OME with 25,000 images (385GB) and you bet they are all mass- 
annotated with spreadsheets.

We have clever ways to produce these spreadsheets auto-magically  
(Perl scripts). Basically the scripts say that all the files in a  
certain directory meet a certain filename pattern belong to a certain  
category.

e.g.
my $root = "/Users/tmacur1/Images/worms/";
my $cg_age = {
	ColumnName => "Age",
	"$root/day1/*" => "Day 1",
	"$root/day2/*" => "Day 2",
	"$root/day4/*" => "Day 4",
	"$root/day6/*" => "Day 6",
	"$root/day8/*" => "Day 8",
};

my $cg_body_part = {
	ColumnName => "Body Part",
	DefaultColumnValue => "body",
	"$root/*/day*head*" => "head",
};

my $cg_quality = {
	ColumnName => "Quality",
#	DefaultColumnValue => "Average",	
	"$root/*/day*blurry*" => Blurry,
	"$root/*/day*windy*" => Windy,
};

processFile ("tmp.tsv", $cg_age, $cg_body_part, $cg_quality);

see src/perl2/OME/Util/Annotate/SpreadsheetWriter.pm for details.

Best,

Tom




More information about the ome-users mailing list