comparison bowtie_build_wrapper.pl @ 0:17e442abb3de draft default tip

Uploaded
author david-hoover
date Wed, 23 Jul 2014 10:27:07 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:17e442abb3de
1 #!/usr/bin/perl
2
3 use File::Copy qw/ copy /;
4
5 $ENV{PATH} .= ":/usr/local/apps/mirdeep2/2.0.0.5:/usr/local/apps/bowtie/0.12.9:/usr/local/apps/viennarna/current/bin:/usr/local/randfold-2.0/bin";
6
7 $fastafile = $ARGV[0];
8 $file_path = $ARGV[1];
9 $output_file = $ARGV[2];
10 $fastafile_text = $ARGV[3];
11
12 $output_basename = `basename $output_file`;
13 chomp $output_basename;
14 $filepath_basename = `basename $file_path`;
15 chomp $filepath_basename;
16
17 $output_dir = $output_file;
18 $output_dir =~ s/$output_basename/$filepath_basename/;
19
20 system ("mkdir -p $file_path");
21 copy ($fastafile, $output_file);
22 copy ($output_file, $file_path);
23
24 system ("bowtie-build $fastafile $file_path/$output_basename");
25
26 open (OUTPUT,">$output_file");
27 print OUTPUT "<h1>Bowtie index on $fastafile_text</h1>\n";
28 $dirout = `ls $file_path`;
29
30 foreach $file (split (/\n/, $dirout)) {
31 print OUTPUT "<a href='$file'>$file</a><br/>\n";
32 }
33 close (OUTPUT);