@@ -70,7 +70,6 @@ def cosmx(
7070 -------
7171 :class:`spatialdata.SpatialData`
7272 """
73- print ("This is the local version" )
7473 path = Path (path )
7574
7675 # tries to infer dataset_id from the name of the counts file
@@ -107,11 +106,9 @@ def cosmx(
107106 raise FileNotFoundError (f"Labels directory not found: { labels_dir } ." )
108107
109108 counts = pd .read_csv (counts_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
110- print (counts .head ())
111109 counts .index = counts .index .astype (str ).str .cat (counts .pop (CosmxKeys .FOV ).astype (str ).values , sep = "_" )
112110
113111 obs = pd .read_csv (meta_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
114- print (obs .head ())
115112 obs [CosmxKeys .FOV ] = pd .Categorical (obs [CosmxKeys .FOV ].astype (str ))
116113 obs [CosmxKeys .REGION_KEY ] = pd .Categorical (obs [CosmxKeys .FOV ].astype (str ).apply (lambda s : s + "_labels" ))
117114 obs [CosmxKeys .INSTANCE_KEY ] = obs .index .astype (np .int64 )
@@ -257,7 +254,7 @@ def cosmx(
257254 import pyarrow .parquet as pq
258255
259256 with tempfile .TemporaryDirectory () as tmpdir :
260- print ("converting .csv to .parquet to improve the speed of the slicing operations... " , end = "" )
257+ print ("converting .csv to .parquet to improve the speed of the slicing operations... " , end = "" , flush = True )
261258 assert transcripts_file is not None
262259 transcripts_data = pd .read_csv (transcripts_file , header = 0 )
263260 transcripts_data .to_parquet (Path (tmpdir ) / "transcripts.parquet" )
0 commit comments