spatialdata-io icon indicating copy to clipboard operation
spatialdata-io copied to clipboard

`spio.cosmx` appends path two times to the file name

Open tsvvas opened this issue 9 months ago • 0 comments

Hi spatialdata team,

It seems that the parser function for cosmx data appends path to the file name two times: first, when checking whether the file exists, and second, when reading the file:

counts_file = path / f"{dataset_id}_{CosmxKeys.COUNTS_SUFFIX}"
...
counts = pd.read_csv(path / counts_file, header=0, index_col=CosmxKeys.INSTANCE_KEY)

This leads to the error when reading:

FileNotFoundError: [Errno 2] No such file or directory: '../cosmx_data/12345/../cosmx_data/12345/12345_exprMat_file.csv'

Best regards, Vasily

tsvvas avatar Apr 03 '25 11:04 tsvvas