@@ -104,10 +104,12 @@ def cosmx(
104104 if not labels_dir .exists ():
105105 raise FileNotFoundError (f"Labels directory not found: { labels_dir } ." )
106106
107- counts = pd .read_csv (path / counts_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
107+ # counts = pd.read_csv(path / counts_file, header=0, index_col=CosmxKeys.INSTANCE_KEY)
108+ counts = pd .read_csv (counts_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
108109 counts .index = counts .index .astype (str ).str .cat (counts .pop (CosmxKeys .FOV ).astype (str ).values , sep = "_" )
109110
110- obs = pd .read_csv (path / meta_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
111+ # obs = pd.read_csv(path / meta_file, header=0, index_col=CosmxKeys.INSTANCE_KEY)
112+ obs = pd .read_csv (meta_file , header = 0 , index_col = CosmxKeys .INSTANCE_KEY )
111113 obs [CosmxKeys .FOV ] = pd .Categorical (obs [CosmxKeys .FOV ].astype (str ))
112114 obs [CosmxKeys .REGION_KEY ] = pd .Categorical (obs [CosmxKeys .FOV ].astype (str ).apply (lambda s : s + "_labels" ))
113115 obs [CosmxKeys .INSTANCE_KEY ] = obs .index .astype (np .int64 )
@@ -255,7 +257,7 @@ def cosmx(
255257 with tempfile .TemporaryDirectory () as tmpdir :
256258 print ("converting .csv to .parquet to improve the speed of the slicing operations... " , end = "" )
257259 assert transcripts_file is not None
258- transcripts_data = pd .read_csv (path / transcripts_file , header = 0 )
260+ transcripts_data = pd .read_csv (transcripts_file , header = 0 )
259261 transcripts_data .to_parquet (Path (tmpdir ) / "transcripts.parquet" )
260262 print ("done" )
261263
0 commit comments