minwoosun commited on
Commit
3a0872a
·
verified ·
1 Parent(s): 78a758b

Update app.py -- output file path

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -83,7 +83,13 @@ def main(input_file_path, species):
83
  UMAP = True
84
 
85
  if (UMAP):
86
- adata = sc.read_h5ad('/home/user/app/UCE/10k_pbmcs_proc_uce_adata.h5ad')
 
 
 
 
 
 
87
 
88
  labels = pd.Categorical(adata.obs["cell_type"])
89
 
@@ -116,9 +122,6 @@ def main(input_file_path, species):
116
  else:
117
  img = None
118
  print("no image")
119
-
120
- # this need to be changed based on data file name
121
- output_file = '/home/user/app/UCE/10k_pbmcs_proc_uce_adata.h5ad'
122
 
123
  return img, output_file
124
 
 
83
  UMAP = True
84
 
85
  if (UMAP):
86
+
87
+ # Set output file path
88
+ file_name_with_ext = os.path.basename(input_file_path)
89
+ file_name = os.path.splitext(file_name_with_ext)[0]
90
+ output_file = "/home/user/app/UCE/" + f"{file_name}_uce_adata.h5ad"
91
+
92
+ adata = sc.read_h5ad(output_file_path)
93
 
94
  labels = pd.Categorical(adata.obs["cell_type"])
95
 
 
122
  else:
123
  img = None
124
  print("no image")
 
 
 
125
 
126
  return img, output_file
127