|
16 | 16 | 'coordinate_system': 'global', |
17 | 17 | 'output': '../pciSeq_assigned_transcripts.zarr', |
18 | 18 |
|
19 | | - 'input_scrnaseq': '../brain_scrnaseq_subsample_WMB-10X.h5ad', |
20 | | - 'sc_cell_type_key': 'subclass', |
| 19 | + 'input_scrnaseq': 'resources_test/task_ist_preprocessing/mouse_brain_combined/scrnaseq_reference.h5ad', |
| 20 | + 'sc_cell_type_key': 'cell_type', |
21 | 21 |
|
22 | 22 | 'exclude_genes': None, |
23 | 23 | 'max_iter': 1000, |
|
37 | 37 | } |
38 | 38 | ## VIASH END |
39 | 39 |
|
40 | | -# # Set coordinate system to default if not given |
41 | | -# if par['coordinate_system'] == None: |
42 | | -# par['coordinate_system'] = 'global' |
43 | | - |
44 | 40 | # Read input |
45 | 41 | print('Reading input files', flush=True) |
46 | 42 | sdata = sd.read_zarr(par['input_ist']) |
|
65 | 61 | y_coords = transcripts.y.compute().to_numpy(dtype=np.int64) |
66 | 62 | x_coords = transcripts.x.compute().to_numpy(dtype=np.int64) |
67 | 63 |
|
| 64 | +#test floats |
| 65 | +y_coords = transcripts.y.compute().to_numpy() |
| 66 | +x_coords = transcripts.x.compute().to_numpy() |
| 67 | + |
| 68 | +print(y_coords) |
| 69 | + |
68 | 70 | #Added for pciSeq |
69 | 71 | #TODO this will immediately break when the name of the gene isn't feature_name |
70 | 72 | transcripts_dataframe = sdata[par['transcripts_key']].compute()[['feature_name']] |
|
88 | 90 | 'save_data'] |
89 | 91 |
|
90 | 92 | opts = {k: par[k] for k in opts_keys} |
91 | | -# print(opts) |
92 | 93 |
|
93 | 94 | input_scrnaseq = ad.read_h5ad(par['input_scrnaseq']) |
94 | 95 | input_scrnaseq.X = input_scrnaseq.layers['counts'] |
|
129 | 130 | # - segmentation 2D, transcripts 3D |
130 | 131 |
|
131 | 132 | # Subset sdata to transcripts with cell ids |
132 | | -# print("test: save anndata") |
133 | | -# output_table.write_h5ad("../output_anndata.h5ad") |
134 | 133 |
|
135 | 134 | print('Subsetting to transcripts cell id and cell type data', flush=True) |
136 | 135 | sdata_transcripts_only = sd.SpatialData( |
|
147 | 146 | shutil.rmtree(par["output"]) |
148 | 147 | sdata_transcripts_only.write(par['output']) |
149 | 148 |
|
150 | | -# TODO: is this a problem? |
151 | | -# INFO The SpatialData object is not self-contained (i.e. it contains some elements that are Dask-backed from locations outside ../pciSeq_assigned_transcripts.zarr). |
152 | | -# Please see the documentation of `is_self_contained()` to understand the implications of working with SpatialData objects that are not self-contained. |
153 | | -# INFO The Zarr backing store has been changed from None the new file path: ../pciSeq_assigned_transcripts.zarr |
| 149 | + |
0 commit comments