File size: 908 Bytes
4b0a09a
8574486
4b0a09a
8574486
 
 
e1a4424
 
 
 
 
8574486
 
e1a4424
 
8574486
 
 
 
 
 
e1a4424
 
 
 
 
8574486
 
 
e1a4424
 
 
 
 
 
 
 
 
 
 
8574486
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
import streamlit as st
from .predict_chromosome import predict_and_write


st.title("DeepLoop")


#########
# INPUT #
#########

# TODO A drop down of models for different depths
# depth = st.selectbox("Select Model", ["Model 1", "Model 2", "Model 3"])
# HACK
chromosome = "chr11"

# Load the model from hugging face
from huggingface_hub import from_pretrained_keras

model = from_pretrained_keras("funlab/DeepLoop-CPGZ-LoopDenoise")

from datasets import load_dataset

anchors = load_dataset("funlab/hg19_HindIII_anchor_bed")
full_matrix = load_dataset("funlab/HiCorr_test_data")


predict_and_write(
    model,
    full_matrix_dir=full_matrix,
    input_name=f"anchor_2_anchor.loop.{chromosome}.p_val",
    outdir="results",
    anchor_dir=anchors,
    chromosome=chromosome,
    small_matrix_size=128,
    step_size=128,
    dummy=5,
    # max_dist,
    val_cols=["obs" "exp" "pval"],
    # keep_zeros,
)