Mercurial > repos > ucsb-phylogenetics > ucsb_phylogenetics
view ucsb_phylogenetics/iAssembler/iAssembler_wrapper2.pl @ 8:798d8401d420 draft
Uploaded
author | ucsb-phylogenetics |
---|---|
date | Sat, 08 Sep 2012 15:33:34 -0400 |
parents | |
children |
line wrap: on
line source
#!/usr/bin/perl # Wrapper script written by: Roger Ngo, Sam Min and Todd H. Oakley, UCSB use warnings; use strict; use Cwd; my $dir = getcwd(); my $iAssemblerBinPath = '/home/galaxy/pkgs/iAssembler'; my $iAssemblerToolPath = '/home/galaxy/galaxy-dist/tools/iAssembler'; #iAssembler_wrapper.pl -i $input -e $maxlength -h $minoverlap -p $minpercent ...example my $input=$ARGV[1]; my $maxlength=$ARGV[3]; my $minoverlap=$ARGV[5]; my $minpercent=$ARGV[7]; open my $file, '<', $iAssemblerToolPath."\/increment.txt"; my $increment = <$file>; $increment = int($increment); close $file; my $temp = $increment; open(UPDATE, '>'.$iAssemblerToolPath."\/increment.txt"); $increment = $increment + 1; print UPDATE $increment; close(UPDATE); qx/cp $input $iAssemblerBinPath\/input.$temp.fasta/; chdir($iAssemblerBinPath); qx/$iAssemblerBinPath\/iAssembler.pl -i input.$temp.fasta -e $maxlength -h $minoverlap -p $minpercent 2>$dir\/log/; chdir("$dir"); qx/cp $iAssemblerBinPath\/input.$temp.fasta_output\/unigene_seq.fasta unigene_seq.fasta/; qx/rm -rf $iAssemblerBinPath\/input.$temp.*/;