Skip to content

Commit f00a6ce

Browse files
author
Habib Rehman
committed
cleaning up comments
1 parent 6a2183e commit f00a6ce

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

  • src/methods_transcript_assignment

src/methods_transcript_assignment/basic_transcript_assignment/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
},
7474
tables={
7575
"table": ad.AnnData(
76-
obs=pd.DataFrame(cell_id_col), # have to make the series a dataframe for some reason
76+
obs=pd.DataFrame(cell_id_col),
7777
var=sdata.tables["table"].var[[]]
7878
)
7979
}

src/methods_transcript_assignment/pciSeq_transcript_assignment/script.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
'coordinate_system': 'global',
1717
'output': '../pciSeq_assigned_transcripts.zarr',
1818

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',
2121

2222
'exclude_genes': None,
2323
'max_iter': 1000,
@@ -37,10 +37,6 @@
3737
}
3838
## VIASH END
3939

40-
# # Set coordinate system to default if not given
41-
# if par['coordinate_system'] == None:
42-
# par['coordinate_system'] = 'global'
43-
4440
# Read input
4541
print('Reading input files', flush=True)
4642
sdata = sd.read_zarr(par['input_ist'])
@@ -65,6 +61,12 @@
6561
y_coords = transcripts.y.compute().to_numpy(dtype=np.int64)
6662
x_coords = transcripts.x.compute().to_numpy(dtype=np.int64)
6763

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+
6870
#Added for pciSeq
6971
#TODO this will immediately break when the name of the gene isn't feature_name
7072
transcripts_dataframe = sdata[par['transcripts_key']].compute()[['feature_name']]
@@ -88,7 +90,6 @@
8890
'save_data']
8991

9092
opts = {k: par[k] for k in opts_keys}
91-
# print(opts)
9293

9394
input_scrnaseq = ad.read_h5ad(par['input_scrnaseq'])
9495
input_scrnaseq.X = input_scrnaseq.layers['counts']
@@ -129,8 +130,6 @@
129130
# - segmentation 2D, transcripts 3D
130131

131132
# Subset sdata to transcripts with cell ids
132-
# print("test: save anndata")
133-
# output_table.write_h5ad("../output_anndata.h5ad")
134133

135134
print('Subsetting to transcripts cell id and cell type data', flush=True)
136135
sdata_transcripts_only = sd.SpatialData(
@@ -147,7 +146,4 @@
147146
shutil.rmtree(par["output"])
148147
sdata_transcripts_only.write(par['output'])
149148

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

Comments
 (0)