edmundmiller commited on
Commit
3fb28d3
·
unverified ·
1 Parent(s): 25cd418

fix: Clean up UI

Browse files
Files changed (1) hide show
  1. app.py +38 -8
app.py CHANGED
@@ -3,29 +3,59 @@ from predict_chromosome import predict_and_write
3
 
4
 
5
  st.title("DeepLoop")
 
 
 
 
 
6
 
7
 
8
  #########
9
  # INPUT #
10
  #########
11
-
12
- # TODO A drop down of models for different depths
13
- # depth = st.selectbox("Select Model", ["Model 1", "Model 2", "Model 3"])
14
- # HACK
15
- chromosome = "chr11"
16
  prefix = "results"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  # Load the model from hugging face
19
  from huggingface_hub import from_pretrained_keras
20
 
21
- model = from_pretrained_keras("funlab/DeepLoop-CPGZ-LoopDenoise")
22
 
23
  from huggingface_hub import snapshot_download
24
 
25
  anchors = snapshot_download(
26
- repo_id="funlab/hg19_HindIII_anchor_bed", repo_type="dataset"
27
  )
28
- HiCorr_data = snapshot_download("funlab/HiCorr_test_data", repo_type="dataset")
29
 
30
  import os
31
 
 
3
 
4
 
5
  st.title("DeepLoop")
6
+ st.write("Looking for some example data?")
7
+ st.write(
8
+ "http://hiview.case.edu/ssz20/tmp.HiCorr.ref/HiCorr_test_data/HiCorr_output.tar.gz"
9
+ )
10
+ st.write("Use hg19, HindIII, chr11, CPGZ and LoopDenoise for the Demo data")
11
 
12
 
13
  #########
14
  # INPUT #
15
  #########
16
+ HiCorr_data = st.file_uploader("Upload HiCorr Data", type=["tar.gz", "zip"])
17
+ training_set = st.selectbox("Select Training Set", ["CPGZ", "H9"], index=0)
18
+ depth = st.selectbox("Select Depth", ["LoopDenoise", "50M", "101K"], index=0)
19
+ # TODO Throw a warning that h9 only has LoopDenoise and 100M
20
+ chromosome = st.selectbox("Select Chromosome", ["chr11"])
21
  prefix = "results"
22
+ genome = st.selectbox(
23
+ "Reference Genome",
24
+ [
25
+ "hg19",
26
+ "hg38",
27
+ "mm10",
28
+ ],
29
+ )
30
+ digestion_enzyme = st.selectbox(
31
+ "Digestion Enzyme",
32
+ [
33
+ "HindIII",
34
+ "Arima",
35
+ # FIXME "microC_5kb_bin"
36
+ "DPNII",
37
+ ],
38
+ index=0,
39
+ )
40
+ # TODO Add the other toggles
41
+ # small_matrix_size
42
+ # step_size
43
+ # max_dist
44
+ # dummy
45
+ # val_cols
46
+ # keep_zeros
47
+
48
 
49
  # Load the model from hugging face
50
  from huggingface_hub import from_pretrained_keras
51
 
52
+ model = from_pretrained_keras(f"funlab/DeepLoop-{training_set}-{depth}")
53
 
54
  from huggingface_hub import snapshot_download
55
 
56
  anchors = snapshot_download(
57
+ repo_id=f"funlab/{genome}_{digestion_enzyme}_anchor_bed", repo_type="dataset"
58
  )
 
59
 
60
  import os
61