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

Diff of /FigKernelScripts/prepare_metagenome_files_for_download.pl

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

revision 1.1, Thu Dec 20 23:06:35 2007 UTC revision 1.2, Thu Jan 17 21:30:52 2008 UTC
# Line 21  Line 21 
21      }      }
22      close(IN);      close(IN);
23    
24      `cp $jobs_dir/$job/rp/$mg_id/Features/peg/fasta $jobs_dir/$job/$mg_id.peg.fasta`;      if(! -d "$jobs_dir/$job/DOWNLOAD"){
25      `cp $jobs_dir/$job/rp/$mg_id/assigned_functions $jobs_dir/$job/$mg_id.assigned_functions.txt`;          `mkdir $jobs_dir/$job/DOWNLOAD`;
26        };
27    
28        `cp $jobs_dir/$job/rp/$mg_id/Features/peg/fasta $jobs_dir/$job/DOWNLOAD/$mg_id.peg.fasta`;
29        `cp $jobs_dir/$job/rp/$mg_id/assigned_functions $jobs_dir/$job/DOWNLOAD/$mg_id.assigned_functions.txt`;
30    
31      opendir(DIR,"$jobs_dir/$job/proc");      opendir(DIR,"$jobs_dir/$job/proc");
32      my @files = readdir(DIR);      my @files = readdir(DIR);
33      close(DIR);      close(DIR);
34      foreach my $file (@files){      foreach my $file (@files){
35          if($file =~/(\d+.fa)$/){          if($file =~/(\d+.fa)$/){
36              `cp $jobs_dir/$job/proc/$file $jobs_dir/$job/$mg_id.normalized.fasta`;              `cp $jobs_dir/$job/proc/$file $jobs_dir/$job/DOWNLOAD/$mg_id.normalized.fasta`;
37              last;              last;
38          }          }
39      }      }
40    
41      `tar -czf $jobs_dir/$job/$mg_id.genome_and_proc_dir.tar.gz $jobs_dir/$job/proc $jobs_dir/$job/rp/$mg_id`;      `tar -czf $jobs_dir/$job/DOWNLOAD/$mg_id.genome_and_proc_dir.tar.gz $jobs_dir/$job/proc $jobs_dir/$job/rp/$mg_id`;
42  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3