# HG changeset patch # User jtilman # Date 1357127668 -3600 # Node ID 52c5e53aff28d7b952d534d2b3609f3689f552fc # Parent f0bdf862ba39ae2cef640cb0a4d853604bc15f44 Revised perl wrapper. diff -r f0bdf862ba39 -r 52c5e53aff28 flexbar.pl --- a/flexbar.pl Mon Dec 31 18:40:01 2012 +0100 +++ b/flexbar.pl Wed Jan 02 12:54:28 2013 +0100 @@ -5,12 +5,10 @@ use warnings; use strict; -my $format = pop @ARGV; -my $folder = pop @ARGV; -my $id = pop @ARGV; -my $outFile = pop @ARGV; -my $call = join " ", @ARGV; +my ($outFile, $id, $folder, $format) = @ARGV[($#ARGV - 3) .. $#ARGV]; + +my $call = join " ", @ARGV[0..($#ARGV - 4)]; system $call .' --target reads > '. $outFile and exit 1; @@ -23,11 +21,13 @@ $fileType = $format if /\.\w+fast\w$/; $fileType = 'tabular' if $fileType eq 'lengthdist'; + my $file = $_; + s/_//g; my $name = "primary_". $id ."_". $_ ."_visible_". $fileType; - rename $_, $name; + rename $file, $name; rename $name, $folder; }