This commit is contained in:
XXAY
2021-09-23 15:02:41 +08:00
parent 25a5f17474
commit 1b5cd78dfb
5 changed files with 27 additions and 27 deletions
+11 -6
View File
@@ -1,8 +1,9 @@
import os
import os, time
from django.http import JsonResponse
from django.shortcuts import render
from chart import tools
from Bio.SeqRecord import SeqRecord
def out_page(request, page):
@@ -23,9 +24,13 @@ def blast(request):
pass
def gen_to_fa(request):
file = request.FILES.get("file")
file_path, file_id = tools.path_out("chart")
keep_file(file, file_path)
data = {"id": file_id}
time.sleep(1)
# records = SeqIO.parse(file_path, "genbank") # 读入
# SeqIO.write(records, f"{file_path}", "fasta") # 写出
return JsonResponse(data)