drjieliu commited on
Commit
b97cd60
1 Parent(s): 28cec5d

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -56
app.py DELETED
@@ -1,56 +0,0 @@
1
- import gradio as gr
2
- import os
3
- import pyBigWig
4
- from func_gradio import predict_func,make_plots
5
-
6
- inputs = [
7
- gr.Dropdown([str(i) for i in range(1, 23)], label='Chromosome', default='1'),
8
- gr.Dropdown(['Micro-C', 'Hi-C (ChIA-PET)']
9
- , label='Chromatin contact map', info='One type of contact map is predicted for each time'),
10
- gr.Number(label='Region of interest (500kb for Micro-C and 1Mb for Hi-C)', info='From'),
11
- gr.Number(info='To', show_label=False),
12
- gr.File(label='Processed ATAC-seq file (in .pickle format)'),
13
-
14
- ]
15
-
16
- outputs = [
17
- gr.Files(label='Download the results'),
18
- ]
19
-
20
- app1 = gr.Interface(
21
- fn=predict_func,
22
- inputs=inputs,
23
- outputs=outputs,
24
- title='A computational tool to use ATAC-seq to impute epigenome, transcriptome, and high-resolution chromatin contact maps',
25
- description='<a href="https://github.com/zzh24zzh/EPCOT_gradio" class="built-with svelte-1lyswbr" target="_blank" '
26
- 'style="font-size: 15px; font-color: black; font-weight:bold" rel="noreferrer">'
27
- 'View Documentation </a>',
28
- # examples=[["11","Micro-C","10500000","11000000","./examples/atac_GM12878.pickle"],
29
- # ["11","Hi-C (ChIA-PET)","7750000","8750000","./examples/atac_GM12878.pickle"]]
30
- )
31
-
32
-
33
- with open(os.path.abspath('data/epigenomes.txt'), 'r') as f:
34
- epis=f.read().splitlines()
35
- inputs1 = [
36
- gr.File(label="Prediction file (in .npz format))"),
37
- gr.Markdown(value='### Visualization options'),
38
- gr.Dropdown(epis,label='Epigenome features',multiselect=True,max_choices=10,value=['CTCF','H3K4me3']),
39
- gr.Radio(choices=['Signal p-values (archsinh)','Binding probability'], label='Type of epigenomic feature data'
40
- , value='Signal p-values (archsinh)'),
41
- gr.Slider(maximum=16,label='Range of values displayed on the plots',info="Choose between 0 and 16 (contact maps)",value=4),
42
- gr.Slider(minimum=2,maximum=12,info="Choose between 2 and 12 (epigenomic feature signals)",value=4,show_label=False),
43
- gr.Slider(minimum=2,maximum=12,info="Choose between 2 and 12 (CAGE-seq)",value=8,show_label=False),
44
- ]
45
- outputs1 = gr.Plot(label='Plots')
46
- app2 = gr.Interface(
47
- fn=make_plots,
48
- inputs=inputs1,
49
- outputs=outputs1,
50
- live=True
51
- )
52
-
53
- demo = gr.TabbedInterface([app1, app2], ["Run model", "Visualize prediction results"],
54
- theme=gr.themes.Soft())
55
-
56
- demo.launch(debug=True)