0
|
1 #sshpass -p pmac1512 ssh -o StrictHostkeyChecking=no galaxy@pmc-bioinf03 "gmt music play $*"
|
|
2 #echo "gmt music play $*"
|
|
3
|
|
4
|
|
5 use strict;
|
|
6 use warnings;
|
|
7 use File::Basename;
|
|
8 use Cwd;
|
|
9 die qq(
|
|
10 Bad numbr of inputs
|
|
11
|
|
12 ) if(!@ARGV);
|
|
13
|
|
14
|
|
15 my $player_options = "";
|
|
16 my $baseline_output;
|
|
17
|
|
18 my $dir = getcwd;
|
|
19 my $variable = "";
|
|
20 my $files = "";
|
|
21 foreach my $input (@ARGV)
|
|
22 {
|
|
23 my @tmp = split "::", $input;
|
|
24
|
|
25 if($tmp[0] eq "PLAYEROPTION")
|
|
26 {
|
|
27 $variable = $tmp[1];
|
|
28 $variable =~ s/=/ /g;
|
|
29 $player_options = "$player_options $variable";
|
|
30 }
|
|
31 elsif($tmp[0] eq "BASELINEOUTPUT")
|
|
32 {
|
|
33 $baseline_output = $tmp[1];
|
|
34 }
|
|
35 elsif($tmp[0] eq "BAMLISTENTRY")
|
|
36 {
|
|
37 $files = "$files ${tmp[1]}";
|
|
38 }
|
|
39 else
|
|
40 {
|
|
41 die("Unknown Input: $input\n");
|
|
42 }
|
|
43 }
|
|
44
|
|
45
|
|
46 my $working_dir = "BASELINE_OUTPUT";
|
|
47 #remove extension
|
|
48
|
|
49 #Create Contra Output dir
|
|
50 system ("mkdir $working_dir");
|
|
51
|
|
52 #run baseline
|
|
53
|
|
54 system ("baseline.py --file $files --output $working_dir $player_options > /dev/null");
|
|
55
|
|
56 #Search control file in output dir
|
|
57 opendir(DIR, $working_dir);
|
|
58 my @FILES= readdir(DIR);
|
|
59 foreach my $file (@FILES)
|
|
60 {
|
|
61 my ($filename,$directory,$extension) = fileparse($file, qr/\.[^.]*/);
|
|
62 if ($extension eq ".txt")
|
|
63 {
|
|
64 system ("mv $working_dir/$file $baseline_output");
|
|
65 }
|
|
66 }
|
|
67 closedir(DIR);
|
|
68
|