diff emboss_single_outputfile_wrapper.pl @ 10:d49956b87f7e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/emboss_5 commit 2bfbb5ae6b801e43355fdc3f964a5111fe3fe3a1
author iuc
date Wed, 08 Feb 2017 12:42:22 -0500
parents
children dba489bfcd62
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emboss_single_outputfile_wrapper.pl	Wed Feb 08 12:42:22 2017 -0500
@@ -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";
+	}
+}