4 package CXGN
::Bulk
::Converter
;
9 our %solyc_conversion_hash;
11 sub process_parameters
{
13 $self->{output_fields
} = [ 'Input', 'Output' ];
15 my @ids = split /\s+/, $self->{ids
};
30 if (!%solyc_conversion_hash) {
34 $self->{query_start_time
} = time();
35 my ($dump_fh, $notfound_fh) = $self->create_dumpfile();
37 foreach my $id (@
{$self->{ids
}}) {
38 print STDERR
"Converting $id to $solyc_conversion_hash{uc($id)}\n";
39 if (exists($solyc_conversion_hash{uc($id)})) {
40 print $dump_fh "$id\t$solyc_conversion_hash{uc($id)}\n";
43 print $notfound_fh "$id\t(not found)\n";
48 $self->{query_time
} = time() - $self -> {query_start_time
};
54 print STDERR
"Generating hash... ";
57 foreach my $file (@
{$self->{solyc_conversion_files
}}) {
58 print STDERR
"(processing $file) ";
59 my @lines = read_file
($file);
60 @conversion = (@conversion, @lines);
63 foreach my $entry (@conversion) {
64 my @fields = split /\t/, $entry;
65 $solyc_conversion_hash{uc($fields[0])} = $fields[1];
68 print STDERR
"Done.\n";