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

Diff of /FigKernelPackages/SeedV.pm

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

revision 1.7, Sun Aug 29 21:30:44 2010 UTC revision 1.8, Tue Aug 31 19:03:59 2010 UTC
# Line 1283  Line 1283 
1283    
1284      my $newGdir = $self->{_orgdir};      my $newGdir = $self->{_orgdir};
1285    
1286      for my $fdir (<$newGdir/Features/*>)      for my $ftype ($self->feature_types())
1287      {      {
1288            my $fdir = "$newGdir/Features/$ftype";
1289          my $ftype = basename($fdir);          my $ftype = basename($fdir);
1290    
1291          #          #
# Line 1462  Line 1463 
1463      my $contig_entries = [];      my $contig_entries = [];
1464      my $cur_contig;      my $cur_contig;
1465    
1466      for my $tbl_file (<$newGdir/Features/*/tbl>)      for my $type ($self->feature_types())
1467      {      {
1468            my $tbl_file = "$newGdir/Features/$type/tbl";
1469          my($type) = $tbl_file =~ m,/([^/]+)/tbl$,;          my($type) = $tbl_file =~ m,/([^/]+)/tbl$,;
1470          print "Load $type\n";          print "Load $type\n";
1471          if (open(my $fh, "<", $tbl_file))          if (open(my $fh, "<", $tbl_file))
# Line 1516  Line 1518 
1518      my $roles     = {};      my $roles     = {};
1519    
1520      # order of "cat" is important - proposed_user_functions must be last      # order of "cat" is important - proposed_user_functions must be last
1521      for my $fn_file (<$newGdir/*functions>)  
1522        opendir(my $dh, $newGdir);
1523        my @fn_files = map { "$newGdir/$_" } sort grep { /functions$/ } readdir($dh);
1524        closedir($dh);
1525        for my $fn_file (@fn_files)
1526    #    for my $fn_file (<$newGdir/*functions>)
1527      {      {
1528          if (open(my $fh, "<", $fn_file))          if (open(my $fh, "<", $fn_file))
1529          {          {
# Line 1642  Line 1649 
1649      my $index = {};      my $index = {};
1650      my $rev_index = {};      my $rev_index = {};
1651    
1652      for my $cfile (<$dir/CorrToReferenceGenomes/*>)      opendir(my $dh, "$dir/CorrToReferenceGenomes");
1653        my @corr_files = map { "$dir/CorrToReferenceGenomes/$_" } sort grep { /^\d+\.\d+$/ } readdir($dh);
1654        closedir($dh);
1655        for my $cfile (@corr_files)
1656    #    for my $cfile (<$dir/CorrToReferenceGenomes/*>)
1657      {      {
1658          if ($cfile =~ m,/\d+\.\d+$,)          if ($cfile =~ m,/\d+\.\d+$,)
1659          {          {
# Line 1987  Line 1998 
1998    
1999      if (-f "$feature_dir/fasta.norm.phr")      if (-f "$feature_dir/fasta.norm.phr")
2000      {      {
2001          unlink(<$feature_dir/fasta.norm.*>);  # todo fix dangerous
2002            #unlink(<$feature_dir/fasta.norm.*>);
2003      }      }
2004    
2005    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3