[Bio] / FigKernelPackages / FigFam.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FigFam.pm

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

revision 1.17, Sat Sep 2 12:37:00 2006 UTC revision 1.18, Wed Sep 13 23:20:54 2006 UTC
# Line 74  Line 74 
74              confess "Family file $fam_file does not exist";              confess "Family file $fam_file does not exist";
75              return undef;              return undef;
76          }          }
77        }
78    
79          my @first = `head -n 1 \"$dir/PEGs\"`;      if (! -s "$dir/function")
         if ($first[0] =~ /^\S+\t\S+\t(\S.*\S)/)  
80          {          {
81            my @first = `head -n 1 \"$dir/PEGs\"`;
82            my $func = ($first[0] && ($first[0] =~ /^\S+\t\S+\t(\S.*\S)/)) ? $1 : "hypothetical protein";
83              open(FUNC,">$dir/function") || die "could not open $dir/function";              open(FUNC,">$dir/function") || die "could not open $dir/function";
84              print FUNC "$1\n";              print FUNC "$1\n";
85              close(FUNC);              close(FUNC);
86          }          }
87          else  
         {  
             confess "$dir has no valid function file";  
         }  
     }  
88      open(FUNC,"<$dir/function") || die "could not open $dir/function";      open(FUNC,"<$dir/function") || die "could not open $dir/function";
89      my $func = <FUNC>;      my $func = <FUNC>;
90      chomp $func;      chomp $func;

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3