-
Notifications
You must be signed in to change notification settings - Fork 0
/
ncbi.html
executable file
·101 lines (88 loc) · 5.01 KB
/
ncbi.html
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html>
<head>
<title>Download/Update NCBI database</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="https://d3js.org/d3.v5.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/spinner.css">
<script type="text/javascript" src="js/menu.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript" src="js/adds.js"></script>
</head>
<body>
<script>
$( document ).ready(function() {
$("#Menu").load("menu.html");
});
function extension_vrl(element) {
var extName = new RegExp('vrl_.+nin$');
return extName.test(element);
};
const path = require('path');
var exec = require('child_process').exec;
var runperl = path.join("perlfiles","tmp_db.bat");
var commrun = "perl " + path.join(process.cwd(),'VD','bin','get_version.pl ');
create_analysisbat(runperl, commrun);
exec(runperl, function(error,stdout,stderr){
if(error!=null){
console.log('error :', error);
document.getElementById("running").innerHTML = 'Something went wrong readying external database version. ' + error;
} else{
document.getElementById("version").value = stdout;
console.log("output:" + stdout);
}
});
var fs = require('fs');
fs.readdir(path.join(process.cwd(),"VD","databases"), function(err, items) {
items.filter(extension_vrl).forEach(function(value) {
document.getElementById("currentv").value += value + "\n";
});
});
var dbfile = path.join("perlfiles","databases.lists");
fs.readFile(dbfile, 'utf8', (err, data) => {
if (err) {
document.getElementById("ftp").innerHTML = 'http://bioinfo.bti.cornell.edu/ftp/program/VirusDetect';
}
document.getElementById("ftp").innerHTML = data;
});
</script>
<div id="Menu"></div>
<!-- Use any element to open the sidenav -->
<span onclick="openNav()" style="color: chartreuse;background-color: black;"><B> ☰ Menu </B> </span>
<h3 align="center">Download/Update NCBI database</h3>
<div id="main">
<div class="container" id="container">
<p>This option enables you to download classified and non-redundant databases available on the <a onclick="nw.Shell.openExternal('http://bioinfo.bti.cornell.edu/ftp/program/VirusDetect/');" href="">VirusDetect ftp</a> site. This virus reference database is generated from the GenBank virus database (gbvrl) and updated on an occasional basis. The virus sequence databases have been classified into different kingdoms including plant, vertebrate, invertebrate, fungus, bacteria, algae, archaea and protozoa using a <a onclick="nw.Shell.openExternal('https://github.com/kentnf/virus-detect-new/tree/master/tools/genbank_vrl_classification');" href="">Virus Classification Pipeline</a>. Subdividing the different virus sequences by host reduces their size and increases the speed of analysis. Unique virus sequence databases were generated for each host kingdom by removing redundant sequences of 100%, 97% and 95% identity, respectively. Reducing the redundancy level reduces the database size, increasing the speed of analysis as well as reducing the complexity of results.
</p><br>
<label>Current database repository: </label><b><label id="ftp"></label></b><br><br>
<label>Current local NCBI database version installed on this computer</label><br>
<textarea readonly type="text" id="currentv" name="currentv" placeholder="No database available yet, please download the database"></textarea>
<br><br>
<label>Update to NCBI database version (latest available version is automatically displayed. If version is not listed, please close VDW and open again.)</label><br>
<input type="text" id="version" name="version" placeholder="">
<br>
<label>Select virus host organism</label><br>
<select class="form-control" id="organism" name="organism">
<option value=""></option>
<option value="plant">Plant</option>
<option value="algae">Algae</option>
<option value="bacteria">Bacteria</option>
<option value="fungus">Fungus</option>
<option value="invertebrate">Invertebrate</option>
<option value="protozoa">Protozoa</option>
<option value="vertebrate">Vertebrate</option>
</select><br>
<label>Select level of redundancy reduction for virus sequences (% identity)</label><br>
<select class="form-control" id="filtering" name="filtering">
<option value=""></option>
<option value="U95">U95</option>
<option value="U97">U97</option>
<option value="U100">U100</option>
</select><br>
<input type="submit" id="Update" value="Update" onclick="update_db('organism','filtering','version','ftp')">
<br><label id="running"></label>
</div>
</div>
</body>
</html>