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