diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 380c887..10c878c 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -16,5 +16,12 @@ + + sqlite.xerial + true + org.sqlite.JDBC + jdbc:sqlite:identifier.sqlite + $ProjectFileDir$ + \ No newline at end of file diff --git a/Time_Series_Plot.png b/Time_Series_Plot.png deleted file mode 100644 index 65375bd..0000000 Binary files a/Time_Series_Plot.png and /dev/null differ diff --git a/templates/page/tools.html b/templates/page/tools.html index 1eda928..f5a0a3f 100644 --- a/templates/page/tools.html +++ b/templates/page/tools.html @@ -131,7 +131,7 @@ temp = $('#main_show') temp.empty() temp.append(String.raw`{% include 'tools/blast.html' %}`) - up_file_blast() + blast_run() form.render(); } @@ -194,11 +194,17 @@ temp = $('#main_show') temp.empty() temp.append(String.raw`{% include 'tools/fastqc.html' %}`) - up_file("select_file", {}) + fastqc_run() form.render(); } + // blast + function blast_run() { + + } + + // gen to fa function gen_to_fa() { layui.use(['upload'], function () { @@ -464,6 +470,39 @@ } + // fastqc + function fastqc_run() { + + layui.use(['upload'], function () { + var $ = layui.jquery + , layer = layui.layer; + upload.render({ + elem: '#select_fastqc' + , url: url_up + '/tools/' + "fastqc" + , auto: false + , accept: 'file' + , data: { + csrfmiddlewaretoken: '{{ csrf_token }}', + format: document.getElementById("format").value, + } + , before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。 + layer.load(1); //上传loading + } + , bindAction: '#fastqc_run' + , done: function (res, index) { + layer.closeAll('loading'); //关闭loading + ab = '' + ' ' + $("#down").append(ab) + } + , error: function (index, upload) { + layer.closeAll('loading'); //关闭loading + } + }) + ; + }) + + } + diff --git a/templates/tools/fastqc.html b/templates/tools/fastqc.html index 5dd93b9..5d12db6 100644 --- a/templates/tools/fastqc.html +++ b/templates/tools/fastqc.html @@ -18,81 +18,21 @@
-
+
- +
-
-
- -
- -
-
- -
- -
- -
-
- - -
- -
- -
-
- -
- -
- -
-
diff --git a/tools/views.py b/tools/views.py index 1e44641..20305da 100644 --- a/tools/views.py +++ b/tools/views.py @@ -101,6 +101,22 @@ def pfam(request): return JsonResponse(data) +def fastqc(request): + file = request.FILES.get("file", None) + format = request.POST.get("format", None) + if format is None: + format = "fastq" + + file_path, file_id = tools.path_out("chart") + tools.keep_file(file, file_path) + data = {"id": file_id} + os.mkdir(f"{file_path[:-1]}") + os.system( + f"{tools.tools_path}/fastqc -o {file_path[:-1]} -f {format} {file_path}") + os.system(f"7z a -t7z -r {file_id}.7z {file_path[:-1]}") + return JsonResponse(data) + + def Differential_expression_analysis(request): if request.method == 'POST': files = request.FILES.getlist('files')