Closed thjimmylee closed 1 year ago
Hi Jimmy, thanks for reporting. Can you try using the latest main version? @giovp worked on a related problem on https://github.com/scverse/spatialdata-io/pull/51 and therefore it could be fixed now.
Otherwise, @giovp could you please have a look? Maybe we could test the various SpaceRanger versions with scripts in the spatialdata-sandbox that I run nightly, wdyt?
Hi @LucaMarconato , Thanks for your reply. Yes I am using the latest version 0.0.7 that has this error and this is how I read the spacerange output:
import spatialdata_io
sp_data=spatialdata_io.visium('./spaceranger210_count_47058_WTSI_GRCh38-2020-A')
Having the same issue here, and I think it's definitely related to #51. @giovp, which data sets did you test it on? I know that files downloaded from the 10x website do have a library_id
prepended, but this is never the case for actual spaceranger output, which is why I had removed it in #44.
Same issue here... the IO function should ideally support both h5 files with and without library_id
prefix.
I had the same issue now with the naming of the files, it would be very useful to have the option to load without the prefix. I also encountered the second error message: TypeError: ufunc 'points' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' For me it was related to the two types of SpaceRanger outputs : "tissue_positions.csv" and "tissue_positions_list.csv". When using squidpy I have renamed this file to use the sc.read_visium() command and then correcting for the format, that's why it caused now the problem. I see that @thjimmylee also had both files under the spatial folder and probably caused the same mismatched naming and format.
The PR https://github.com/scverse/spatialdata-io/pull/91 should fix the problem.
I haven't made a full test like @giovp did in https://github.com/scverse/spatialdata-io/pull/51 of the various SpaceRanger versions, but I am testing against three datasets (see details in the PR), including one that doesn't contain the dataset_id
in the file name.
Also now I am testing these three datasets in a nightly job, so this should prevent coming back to the same bug in the future.
Please @grst @benedekp @ilia-kats @thjimmylee, if you have the change let me know if this fixes your problem. If not I am happy to be more systematic and include more datasets in the nightly job.
Hi, This is a cool spatial tool, but I run into issue might be specific to the new Visium Cytassist SpaceRanger output For instance, if I directly read the spaceranger output using
spatialdata_io.visium
, I would get the error below:By reading the error message, I got that the tool was expecting to have a library_id for the matrix.h5 file, which is not essentially included in the spaceranger output, but I renamed it with some random string and it worked, but then I encounter another error message as shown below:
Below is the file tree of the spaceranger output:
I am currently using the latest version of Space Ranger 2.0.1 (January 18, 2023).