dylan-plummer commited on
Commit
1f7dddc
·
1 Parent(s): 4ecd8d4

add example data

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -8,6 +8,9 @@ import matplotlib
8
  import matplotlib.pyplot as plt
9
  from pathlib import Path
10
  from tensorflow.keras.models import model_from_json
 
 
 
11
 
12
  data_dir = 'data/'
13
  sparse_data_dir = 'data/sparse_data/'
@@ -199,11 +202,10 @@ tile_size = 128
199
 
200
  # Load the input matrix
201
  # input_file = '../anchor_2_anchor.loop.chr22'
202
- # chr_name = get_chromosome_from_filename('../anchor_2_anchor.loop.chr22')
203
- # input_matrix = load_chr_ratio_matrix_from_sparse(os.path.dirname(input_file), os.path.basename(input_file),
204
- # os.path.dirname(anchor_file), force_symmetry=True)
205
- input_file = None
206
- input_matrix = None
207
 
208
  # Load the anchor list
209
  anchor_list = pd.read_csv(anchor_file, sep='\t', names=['chr', 'start', 'end', 'anchor'])
 
8
  import matplotlib.pyplot as plt
9
  from pathlib import Path
10
  from tensorflow.keras.models import model_from_json
11
+ from huggingface_hub import hf_hub_download
12
+
13
+ input_file = hf_hub_download(repo_id="dylanplummer/hicorr", filename="arima_beta.chr22", repo_type="dataset", token=os.environ['DATASET_SECRET'])
14
 
15
  data_dir = 'data/'
16
  sparse_data_dir = 'data/sparse_data/'
 
202
 
203
  # Load the input matrix
204
  # input_file = '../anchor_2_anchor.loop.chr22'
205
+ input_matrix = load_chr_ratio_matrix_from_sparse(os.path.dirname(input_file), os.path.basename(input_file),
206
+ os.path.dirname(anchor_file), force_symmetry=True)
207
+ # input_file = None
208
+ # input_matrix = None
 
209
 
210
  # Load the anchor list
211
  anchor_list = pd.read_csv(anchor_file, sep='\t', names=['chr', 'start', 'end', 'anchor'])