-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep05.php
86 lines (79 loc) · 3.6 KB
/
step05.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
<?php
$proteinasSelecionadas = $_POST['proteinasSelecionadas']; // Proteínas selecionadas
if(count($proteinasSelecionadas) > 0){
foreach($proteinasSelecionadas as $val)
$relTexto .= $val . ' ';
$rel = '<b>Selected proteins (Id)</b><br />' . $relTexto;
// Busca imagem da rede da(s) proteína(s)
if(count($proteinasSelecionadas) == 1)
$linkFile = 'http://string-db.org/api/url/network?identifier=' . $proteinasSelecionadas[0];
elseif(count($proteinasSelecionadas) > 1){
for($i = 0; $i < count($proteinasSelecionadas); $i++){
if($i != (count($proteinasSelecionadas) - 1))
$listaProteinas .= $proteinasSelecionadas[$i] . '%0A';
else
$listaProteinas .= $proteinasSelecionadas[$i];
}
$linkFile = 'http://string-db.org/api/url/networkList?identifiers=' . $listaProteinas . '&limit=0';
}
} else
$linkFile = NULL;
?>
<html>
<head>
<title>.:: BioNet ::.</title>
</head>
<body>
<font face="verdana">
<center>
<img src="imgs/BioNet.png" width="262" height="66" onLoad="window.parent.frames[1].location='flow.php?textoSoft=<?=$rel?>'" /><br />
<img src="imgs/FluxoSoftware05.png" width="500" height="220" /><br /><br />
</center>
<?php
if($linkFile != NULL){
// Pega o endereço da imagem
$urlFile = file($linkFile);
// Separa o id do endereço
$er = '(e\_([A-Za-z0-9]{2}[A-Za-z0-9\_]+)\.)'; // Expressão regular
preg_match_all($er, $urlFile[0], $matches, PREG_SET_ORDER);
?>
<table bgcolor="#FFD42A" width="100%">
<tr><td>
<table bgcolor="#FFFFAA" width="100%">
<tr><td>
To <b>save</b> the XML file of the network, click with right-click on the link <b>Download XML</b>, select <b>Save As</b> and choose a destination for the file.<br />
Clicking on the link <b>Other files</b> will appear files available for this network.<br />
Clicking on the link <b>Evaluate</b> you can evaluate the system.<br />
Clicking on the image of the network you will visualize it at STRING.
</td></tr>
</table>
</td></tr>
</table><br />
<center>
<a href="http://string-db.org/newstring_userdata/xml_summary.<?=$matches[0][1]?>.xml" target="_blank" title="Download XML">Download XML</a>
::
<a href="http://string-db.org/newstring_cgi/show_network_save_page.pl?taskId=<?=$matches[0][1]?>" target="_blank" title="Other files">Other files</a>
::
<a href="http://spreadsheets.google.com/viewform?formkey=dE1HSEdvd0xJdXJzdzRFLW5aTVdBc1E6MA" target="_blank" title="Evaluate">Evaluate</a>
::
<a href="#" onClick="history.go(-2)">Back</a><br /><br />
<a href="http://string-db.org/newstring_cgi/show_network_section.pl?taskId=<?=$matches[0][1]?>" target="_blank" title="View at STRING database">
<img src="<?=$urlFile[0]?>" />
</a>
</center>
<iframe name="aux" src="http://string-db.org/newstring_cgi/show_network_save_page.pl?taskId=<?=$matches[0][1]?>" frameBorder="0" width="1" height="1" scrolling="no"></iframe>
<?php } else { ?>
<table bgcolor="#FF0000" width="100%">
<tr><td>
<table bgcolor="#FF7F55" width="100%">
<tr><td>
No protein selected!
</td></tr>
</table>
</td></tr>
</table><br />
<input type="button" name="back" value="Back" onClick="history.go(-2)" />
<?php } ?>
</font>
</body>
</html>