File size: 2,914 Bytes
b31426e
 
 
1a9e8d2
 
 
d6919b2
b31426e
29510b6
b31426e
a6efeae
 
 
 
 
 
 
1a9e8d2
b31426e
1a9e8d2
 
 
 
 
 
 
 
b31426e
 
1a9e8d2
 
 
b31426e
 
 
aea175a
b31426e
a6efeae
1a9e8d2
 
 
 
 
 
d6919b2
 
 
 
 
b31426e
 
 
1a9e8d2
 
 
 
 
 
aea175a
b31426e
1a9e8d2
b31426e
d6919b2
 
b31426e
1a9e8d2
a6efeae
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
import gradio as gr
from Sort_Scores import *
from Preinput_Merge import *
from Sort_Dlkcat import *
from Merge_Dlsc import *
from Sort_Sco_Kcat import *
from Plt import *

with gr.Blocks(css=".gradio-container {background-image: url('file=background.jpeg')}") as demo:
    gr.Markdown("Welcome using this demo.")
    with gr.Tab("HelloWorld"):
        gr.Markdown("Welcome using this demo.")
        gr.Markdown("This is a succend test")
        gr.Markdown("I think this demo can do some things")
        gr.Markdown("在sort里,可以对scores文件,dlkcat文件,以及合并后的scores与dlkcat文件进行排序")
        gr.Markdown("Pre Merge里,可以将序列文件与smi文件进行合并,合并后可以进行dlkcat值的计算,合并前若序列文件需要处理换行符也可以对其进行处理")
        gr.Markdown("Merge Dlsc里,可以合并scores值文件和dlkcat文件,主义这两个文件序列需要一致")
    with gr.Tab("Sort"):
        with gr.Row():
            file1_input1 = gr.File(label="scores_file")
            file1_input2 = gr.File(label="dlkcat_file")
            file1_input3 = gr.File(label="kcasco_file")
        file1_output = gr.File()
        file1_button1 = gr.Button("Sort Scores")
        file1_button2 = gr.Button("Sort Dlkcat")
        file1_button3 = gr.Button("Sort Mergekcat")

    with gr.Tab("Pre Merge"):
        with gr.Row():
            file2_input1 = gr.File(label="strip_file")
            file2_input2 = gr.File(label="smi_file")
            file2_input3 = gr.File(label="seq_file")
        file2_output = gr.File()
        file2_button1 = gr.Button("Strip")
        file2_button2 = gr.Button("Merge")
        file2_button3 = gr.Button("Merge All")

    with gr.Tab("Merge Dlsc"):
        with gr.Row():
            file4_input1 = gr.File(label="sc_file")
            file4_input2 = gr.File(label="cat_file")
        file4_output = gr.File()
        file4_button = gr.Button("Merge")

    with gr.Tab("Plt Picture"):
        file5_input = gr.File(label="log_file")
        file5_output = gr.File()
        file5_button = gr.Button("Plt")

    with gr.Accordion("Open for More!"):
        gr.Markdown("Look at me...")

    file1_button1.click(Sort_Scores, inputs=file1_input1, outputs=file1_output)
    file1_button2.click(Sort_Dlkcat, inputs=file1_input2, outputs=file1_output)
    file1_button3.click(Sort_Sco_Kcat, inputs=file1_input3, outputs=file1_output)

    file2_button1.click(Strip, inputs=file2_input1, outputs=file2_output)
    file2_button2.click(Merge, inputs=[file2_input2, file2_input3], outputs=file2_output)
    file2_button3.click(Merge_All, inputs=[file2_input2, file2_input3], outputs=file2_output)

    file4_button.click(Merge_Dlsc, inputs=[file4_input1, file4_input2], outputs=file4_output)

    file5_button.click(Plt, inputs=file5_input, outputs=file5_output)

if __name__ == "__main__":
    demo.launch()