-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong file loaded when building new SpatialData #147
Comments
From a quick look I think the reason is what you described. @lillux could you have a look at this please? |
@dawe @LucaMarconato This has been solved in #139, that also describe how the parsing behavior has been changed. Now the reader gives priority the file of which the path has been specified, instead of prioritizing the pattern matching. Implementation details on path resolution behaviorThis is in part to describe implementation details, in part to get opinions in improving it. spatialdata-io/src/spatialdata_io/readers/dbit.py Lines 282 to 287 in 3c03009
In the actual implementation, spatialdata-io/src/spatialdata_io/readers/dbit.py Lines 26 to 32 in 3c03009
Index Index Instead we care about index spatialdata-io/src/spatialdata_io/readers/dbit.py Lines 288 to 294 in 3c03009
Here we unpack the |
I am working with some data with many
.h5ad
files stored in the same directory. Whenever I create a newSpatialData
object I specify the path to the correctAnnData
counts file.I noticed that the file that is loaded is typically the wrong one and the first
.h5ad
in the directory is loaded instead. I believe this is because the first element of a list is considered herespatialdata-io/src/spatialdata_io/readers/dbit.py
Line 282 in e3c53b5
I guess the same happens for the barcodes that are specified in the line below
spatialdata-io/src/spatialdata_io/readers/dbit.py
Line 285 in e3c53b5
The only workaround right now is to have multiple paths for different files.
The text was updated successfully, but these errors were encountered: