dylanplummer commited on
Commit
d94afa1
·
1 Parent(s): b717bd9

fix hic hvg

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -56,10 +56,11 @@ color_map = {**color_map, **sorted_color_map, **rna_color_map}
56
  color_map['Other'] = 'gray'
57
 
58
  hic = ad.read_h5ad(hic_file)
 
59
  print(hic)
60
  print('Loading prior knowledge graph...')
61
  prior = nx.read_graphml(graph_file)
62
- scglue.models.configure_dataset(hic, "NB", use_highly_variable=True)
63
  glue = scglue.models.load_model(model_file)
64
 
65
 
@@ -84,8 +85,8 @@ for i, gene in enumerate(genes):
84
  peaks = hic.var.query("highly_variable")
85
 
86
  rna_recon = glue.decode_data("rna", "rna", rna, prior)
87
- hic_recon = glue.decode_data("hic", "hic", hic, prior)
88
- print(rna_recon.shape, hic_recon.shape)
89
 
90
 
91
  def get_closest_peak_to_gene(gene_name, rna, peaks):
 
56
  color_map['Other'] = 'gray'
57
 
58
  hic = ad.read_h5ad(hic_file)
59
+ hic.var["highly_variable"] = hic.var[f"{prior_name}_highly_variable"]
60
  print(hic)
61
  print('Loading prior knowledge graph...')
62
  prior = nx.read_graphml(graph_file)
63
+ #scglue.models.configure_dataset(hic, "NB", use_highly_variable=True)
64
  glue = scglue.models.load_model(model_file)
65
 
66
 
 
85
  peaks = hic.var.query("highly_variable")
86
 
87
  rna_recon = glue.decode_data("rna", "rna", rna, prior)
88
+ #hic_recon = glue.decode_data("hic", "hic", hic, prior)
89
+ print(rna_recon.shape)
90
 
91
 
92
  def get_closest_peak_to_gene(gene_name, rna, peaks):