[Bio] / FigKernelScripts / load_attributes.pl Repository:
ViewVC logotype

Diff of /FigKernelScripts/load_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.42, Thu Mar 23 04:51:55 2006 UTC revision 1.43, Fri Aug 25 04:08:43 2006 UTC
# Line 86  Line 86 
86    
87  Trace("Deleting and Recreating attribute table.") if T(2);  Trace("Deleting and Recreating attribute table.") if T(2);
88    
89    
90    my %IGNORE_ATTR=('evidence_code'=>1);
91    
92    
93  # Set up the database tables. We have an attribute table and the a table of data about  # Set up the database tables. We have an attribute table and the a table of data about
94  # the attribute keys.  # the attribute keys.
95  my $dbf = $fig->db_handle;  my $dbf = $fig->db_handle;
# Line 274  Line 278 
278  =head2 parse_file_to_temp()  =head2 parse_file_to_temp()
279    
280  This method takes two arguments, the name of a file to read and a filehandle to write to.  This method takes two arguments, the name of a file to read and a filehandle to write to.
281  he file is opened, comments and blank lines are ignored, a couple of tests are applied,  The file is opened, comments and blank lines are ignored, a couple of tests are applied,
282  and the data is written to the filehandle. The incoming file must be an attribute file.  and the data is written to the filehandle. The incoming file must be an attribute file.
283    
284    Note, we also ignore the attributes stored in the hash %IGNORE_ATTR. These are mainly computed attributes.
285    
286  =cut  =cut
287    
288  sub parse_file_to_temp {  sub parse_file_to_temp {
# Line 327  Line 333 
333              $comment = 1;              $comment = 1;
334          } else {          } else {
335              @line = split /\t/, $inputLine;              @line = split /\t/, $inputLine;
336                # quietly ignore the IGNORE_ATTR keys
337                next if ($IGNORE_ATTR{$line[1]});
338    
339    
340              if (! $line[0]) {              if (! $line[0]) {
341                  Trace("No ID at line $lineCount in $from.") if T(1);                  Trace("No ID at line $lineCount in $from.") if T(1);
342                  $error = 1;                  $error = 1;

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3