comparison runNGSplot.pl @ 1:4dd92ce61a5c draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'3611708386b2a2495ac9daee71a32cd990f2aa16\n'
author artbio
date Fri, 08 Dec 2017 09:25:05 -0500
parents 3ca58369469c
children de27d4172d19
comparison
equal deleted inserted replaced
0:3ca58369469c 1:4dd92ce61a5c
20 20
21 my $randfile = rand(100)."\.config\.txt"; 21 my $randfile = rand(100)."\.config\.txt";
22 my $randfile2 = $randfile; 22 my $randfile2 = $randfile;
23 $randfile2 =~ s/config\.txt/logfile/gm; 23 $randfile2 =~ s/config\.txt/logfile/gm;
24 24
25 my $outfile = File::Spec->catfile(abs_path(dirname(__FILE__)),"$randfile"); 25 my $outfile = File::Spec->catfile($ENV{"PWD"},"ngsplot.config.txt");
26 open(FILE,">$outfile"); 26 open(FILE,">$outfile");
27 27
28 for (my $i=1;$i<=$numsamples;$i++) { 28 for (my $i=1;$i<=$numsamples;$i++) {
29 my $bamfile=shift(@inputs); 29 my $bamfile=shift(@inputs);
30 my $reffile=shift(@inputs); 30 my $reffile=shift(@inputs);
85 85
86 if ($GO eq 'km') { 86 if ($GO eq 'km') {
87 $GO = "$GO -KNC $KNC -MIT $MIT -NRS $NRS"; 87 $GO = "$GO -KNC $KNC -MIT $MIT -NRS $NRS";
88 } 88 }
89 89
90 my $logfile = File::Spec->catfile(abs_path(dirname(__FILE__)),"$randfile2"); 90 my $logfile = File::Spec->catfile($ENV{"PWD"},"ngsplot.log");
91 open(FILE2,">>$logfile"); 91 open(FILE2,">>$logfile");
92 my $cmd5="pwd >> $logfile 2>&1"; 92 my $cmd5="pwd >> $logfile 2>&1";
93 system($cmd5); 93 system($cmd5);
94 my $NGSPLOT = $ENV{"NGSPLOT"}; 94 my $NGSPLOT = $ENV{"NGSPLOT"};
95 my $cmd=''; 95 my $cmd='';
110 } 110 }
111 111
112 print("$cmd\n"); 112 print("$cmd\n");
113 my $cmd2="cp data.zip $O"; 113 my $cmd2="cp data.zip $O";
114 my $cmd3="rm $outfile"; 114 my $cmd3="rm $outfile";
115 my $cmd4="rm $logfile";
116 syswrite(FILE2, "\n$cmd\n"); 115 syswrite(FILE2, "\n$cmd\n");
117 syswrite(FILE2, "\n$cmd2\n"); 116 syswrite(FILE2, "\n$cmd2\n");
118 syswrite(FILE2, "\n$cmd3\n"); 117 syswrite(FILE2, "\n$cmd3\n");
119 syswrite(FILE2, "\n$cmd4\n\n");
120 118
121 # print STDERR "cmd: $cmd\n"; 119 # print STDERR "cmd: $cmd\n";
122 system($cmd); 120 system($cmd);
123 system($cmd2); 121 system($cmd2);
124 #system($cmd3); 122 system($cmd3);
125 #system($cmd4);
126 123
127 close(FILE2); 124 close(FILE2);
128 125
129 126