annotate tools/emboss_5/emboss_single_outputfile_wrapper.pl @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 #! /usr/bin/perl -w
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 use strict;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 use File::Copy;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 my $cmd_string = join (" ",@ARGV);
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 my $results = `$cmd_string`;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 my @files = split("\n",$results);
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 my $fileNameOut = $ARGV[6];
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 my ($drive, $outputDir, $file) = File::Spec->splitpath( $fileNameOut );
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 my $destination = $fileNameOut;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 foreach my $thisLine (@files)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 {
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 if ($thisLine =~ /Created /)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 {
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 $thisLine =~ /[\w|\.]+$/;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 $thisLine =$&;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 #print "outfile: $thisLine\n";
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 #there is only one file to move, so we can quit after finding it
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 move($drive.$outputDir.$thisLine,$fileNameOut);
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 exit(1);
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 }
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 else
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 {
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 print $thisLine,"\n";
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 }
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 }