annotate iAssembler_wrapper.pl @ 5:1d53d653adef draft default tip

iAssembler perl wrapper dependency
author rogerngo
date Wed, 16 May 2012 00:24:38 -0400
parents 00edccfa662b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
1 #!/usr/bin/perl
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
2
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
3 # Wrapper script written by: Roger Ngo, Sam Min and Todd H. Oakley, UCSB
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
4
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
5 use warnings;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
6 use strict;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
7 use Cwd;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
8
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
9 my $dir = getcwd();
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
10
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
11 my $iAssemblerBinPath = '/labdata/nfs/galaxy/pkgs/iAssembler';
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
12 my $iAssemblerToolPath = '/labdata/nfs/galaxy/galaxy-dist/tools/iAssembler';
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
13
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
14 #iAssembler_wrapper.pl -i $input -e $maxlength -h $minoverlap -p $minpercent ...example
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
15
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
16 my $input=$ARGV[1];
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
17 my $maxlength=$ARGV[3];
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
18 my $minoverlap=$ARGV[5];
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
19 my $minpercent=$ARGV[7];
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
20
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
21 open my $file, '<', $iAssemblerToolPath."\/increment.txt";
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
22 my $increment = <$file>;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
23 $increment = int($increment);
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
24 close $file;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
25
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
26 my $temp = $increment;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
27
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
28 open(UPDATE, '>'.$iAssemblerToolPath."\/increment.txt");
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
29 $increment = $increment + 1;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
30 print UPDATE $increment;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
31 close(UPDATE);
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
32
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
33 qx/cp $input $iAssemblerBinPath\/input.$temp.fasta/;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
34
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
35 chdir($iAssemblerBinPath);
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
36
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
37 qx/$iAssemblerBinPath\/iAssembler.pl -i input.$temp.fasta -e $maxlength -h $minoverlap -p $minpercent/;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
38
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
39 chdir("$dir");
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
40
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
41 qx/cp $iAssemblerBinPath\/input.$temp.fasta_output\/unigene_seq.fasta unigene_seq.fasta/;
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
42
00edccfa662b iAssembler perl wrapper
rogerngo
parents:
diff changeset
43 qx/rm -rf $iAssemblerBinPath\/input.$temp.*/;