comparison mirdeep2/bowtie_build_wrapper.pl @ 0:5b9519f4b165

Upload first commmit
author nikhil-joshi
date Mon, 19 Sep 2011 19:04:41 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5b9519f4b165
1 #!/usr/bin/perl
2
3 use File::Copy qw/ copy /;
4
5 $fastafile = $ARGV[0];
6 $file_path = $ARGV[1];
7 $output_file = $ARGV[2];
8 $fastafile_text = $ARGV[3];
9
10 $output_basename = `basename $output_file`;
11 chomp $output_basename;
12 $filepath_basename = `basename $file_path`;
13 chomp $filepath_basename;
14
15 $output_dir = $output_file;
16 $output_dir =~ s/$output_basename/$filepath_basename/;
17
18 system ("mkdir -p $file_path");
19 copy ($fastafile, $output_file);
20 copy ($output_file, $file_path);
21
22 system ("bowtie-build $fastafile $file_path/$output_basename");
23
24 open (OUTPUT,">$output_file");
25 print OUTPUT "<h1>Bowtie index on $fastafile_text</h1>\n";
26 $dirout = `ls $file_path`;
27
28 foreach $file (split (/\n/, $dirout)) {
29 print OUTPUT "<a href='$file'>$file</a><br/>\n";
30 }
31 close (OUTPUT);