Mercurial > repos > devteam > emboss_5
diff emboss_single_outputfile_wrapper.pl @ 10:9b98d3d903c6 draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
author | devteam |
---|---|
date | Fri, 12 Aug 2016 19:17:10 -0400 |
parents | |
children | bde3097ac0f6 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emboss_single_outputfile_wrapper.pl Fri Aug 12 19:17:10 2016 -0400 @@ -0,0 +1,27 @@ +#! /usr/bin/perl -w +use strict; +use File::Copy; + +my $cmd_string = join (" ",@ARGV); +my $results = `$cmd_string`; +my @files = split("\n",$results); +my $fileNameOut = $ARGV[6]; +my ($drive, $outputDir, $file) = File::Spec->splitpath( $fileNameOut ); +my $destination = $fileNameOut; + +foreach my $thisLine (@files) +{ + if ($thisLine =~ /Created /) + { + $thisLine =~ /[\w|\.]+$/; + $thisLine =$&; + #print "outfile: $thisLine\n"; + #there is only one file to move, so we can quit after finding it + move($drive.$outputDir.$thisLine,$fileNameOut); + exit(1); + } + else + { + print $thisLine,"\n"; + } +}