Skip to content

Commit

Permalink
correct path name
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldoucet committed Jun 12, 2024
1 parent 959fcf4 commit 1c2fc89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
- name: Run reader tests
run: |
python tests/reader_tests.py
continue-on-error: true

- name: Run hestdata tests
run: |
python tests/hestdata_tests.py
5 changes: 3 additions & 2 deletions src/hest/HESTData.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ def save(self, path: str, save_img=True, pyramidal=True, bigtiff=False, plot_pxl
with open(os.path.join(path, 'metrics.json'), 'w') as json_file:
json.dump(self.meta, json_file)

with open(os.path.join(path, 'cells.geojson'), 'w') as json_file:
json.dump(self.cellvit_seg, json_file)
if self.cellvit_seg is not None:
with open(os.path.join(path, 'cells.geojson'), 'w') as json_file:
json.dump(self.cellvit_seg, json_file)

downscaled_img = self.adata.uns['spatial']['ST']['images']['downscaled_fullres']
down_fact = self.adata.uns['spatial']['ST']['scalefactors']['tissue_downscaled_fullres_scalef']
Expand Down
3 changes: 3 additions & 0 deletions tests/reader_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def test_visium_reader_img_matrix_spatial(self):
bc_matrix_path, # path to filtered_feature_bc_matrix.h5
spatial_coord_path=spatial_coord_path # path to a space ranger spatial/ folder containing either a tissue_positions.csv or tissue_position_list.csv
)
os.makedirs(_j(self.output_dir, 'img+filtered_matrix+spatial'), exist_ok=True)

st.save(_j(self.output_dir, 'img+filtered_matrix+spatial'), pyramidal=True)
st.save_spatial_plot(_j(self.output_dir, 'img+filtered_matrix+spatial'), self.output_dir)
Expand All @@ -53,6 +54,8 @@ def test_visium_reader_img_matrix(self):
fullres_img_path, # path to a full res image
bc_matrix_path, # path to filtered_feature_bc_matrix.h5
)

os.makedirs(_j(self.output_dir, 'img+filtered_matrix'), exist_ok=True)
st.save(_j(self.output_dir, 'img+filtered_matrix'), pyramidal=True)
st.save_spatial_plot(_j(self.output_dir, 'img+filtered_matrix'), self.output_dir)

Expand Down

0 comments on commit 1c2fc89

Please sign in to comment.