-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshowSHfile.php
87 lines (70 loc) · 2.19 KB
/
showSHfile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
require "../phplib/genlibraries.php";
require "../phplib/tools.inc.php";
redirectOutside();
print "<h2>Execution Summary</h2>";
$fn = $_REQUEST['fn'];
$toolId = $_REQUEST['tool'];
$tool = $GLOBALS['toolsCol']->findOne(array('_id' => $toolId));
if (empty($tool)){
print "<p>The tool '$toolId' is not defined or is not registered in the database. Sorry, cannot show the details for the selected execution</p>";
die(0);
}
#$fn = getAttr_fromGSFileId($fn,'path');
$rfn = $GLOBALS['dataDir']. "/$fn";
$getPrefix = Array(
'readBAM.R' => 'PPread',
'coverage.R' => 'PPcov',
'index' => 'PPidx',
'sort' => 'PPsort',
'nucleR.R' => 'NR',
'nucleosomeDynamics.R ' => 'ND',
'nfr.R' => 'NFR',
'periodicity.R' => 'P',
'gauss_fit.R' => 'STF',
'tx_classes.R' => 'TSS',
);
if (!is_file($rfn)){
print "<p>Sorry, no information found for this execution. ".$rfn." not found</p>";
die(0);
}
$cmdsParsed = Array();
switch($toolId){
case 'pydock':
$cmdsParsed = parseSHFile_pyDock($rfn);
break;
case 'nucldynWF':
$cmdsParsed = parseSHFile_NuclDynWF($rfn);
break;
case 'BAMval':
$cmdsParsed = parseSHFile_BAMval($rfn);
break;
default:
//$cmdsParsed = parseSGFile_generic($rfn);
}
foreach ($cmdsParsed as $n => $cmd){
?>
<table class="table table-striped table-bordered">
<tr>
<th><b>Analysis #<?php echo $n;?></b></th>
<!--<th><a target="_blank" href="help.php?id=<?php echo $cmd['prgPrefix'];?>">-->
<th><a href="javascript:;">
<strong><?php echo $cmd['prgName'];?></strong></a>
</th>
</tr>
<?php
foreach ( $cmd['params'] as $k => $v){
print "<tr><td>$k</td><td>$v</td></tr>";
}
?>
</table>
<a href="javascript:toggleVis('raw<?php echo $n?>');"><i class="fa fa-code"></i> View raw comand</a>
<div id="raw<?php echo $n;?>" class="display-hide">
<table class="table table-striped table-bordered" style="border:2px solid #79a2c5;margin-top:10px;">
<tr><td>Raw command</td><td><?php echo $cmd['cmdRaw'];?></td></tr>
<tr><td>Working directory</td><td><?php echo $cmd['cwd'];?></td></tr>
</table>
</div>
<?php
}
?>