File tree Expand file tree Collapse file tree
src/spatialdata_io/readers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ def cosmx(
6767 -------
6868 :class:`spatialdata.SpatialData`
6969 """
70+ print ("This is the local version" )
7071 path = Path (path )
7172
7273 # tries to infer dataset_id from the name of the counts file
@@ -102,10 +103,12 @@ def cosmx(
102103 if not labels_dir .exists ():
103104 raise FileNotFoundError (f"Labels directory not found: { labels_dir } ." )
104105
105- counts = pd .read_csv (path / counts_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
106+ counts = pd .read_csv (counts_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
107+ print (counts .head ())
106108 counts .index = counts .index .astype (str ).str .cat (counts .pop (CosmxKeys .FOV ).astype (str ).values , sep = "_" )
107109
108- obs = pd .read_csv (path / meta_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
110+ obs = pd .read_csv (meta_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
111+ print (obs .head ())
109112 obs [CosmxKeys .FOV ] = pd .Categorical (obs [CosmxKeys .FOV ].astype (str ))
110113 obs [CosmxKeys .REGION_KEY ] = pd .Categorical (obs [CosmxKeys .FOV ].astype (str ).apply (lambda s : s + "_labels" ))
111114 obs [CosmxKeys .INSTANCE_KEY ] = obs .index .astype (np .int64 )
You can’t perform that action at this time.
0 commit comments