-
Notifications
You must be signed in to change notification settings - Fork 914
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
spaceranger 2.1 update #7141
spaceranger 2.1 update #7141
Conversation
Co-authored-by: Shaun Jackman <sjackman@gmail.com>
Hey @stephenwilliams22, apologies for the slow reply and thanks for the PR. This looks good, I'd just like to test a bit more on my end and have a couple of questions.
|
Hey @AustinHartman now I need to apologies for the late reply! An intermediate CRAN release would be a HUGE help! This is the way that most 10x users i've spoken with use Seurat. |
Thanks @stephenwilliams22, that makes sense. I'll plan on waiting until SR 2.1's release so I can do a bit of testing. Assuming that goes well, I'll merge to develop and aim for a CRAN release with a few additional updates shortly after. |
@AustinHartman I just wanted to let you know that SR 2.1 datasets are live on the 10x website. Please let me know if you run into any bumps in the road! Data found here |
R/preprocessing.R
Outdated
file_path <- file.path(data.dir, filename) | ||
infile <- hdf5r::H5File$new(filename = file_path, mode = 'r') | ||
if("matrix/features/probe_region" %in% hdf5r::list.objects(infile)) { | ||
probe_metadata <- Read10x_probe_metadata(data.dir) | ||
Misc(object = object[['Spatial']], slot = "probe_metadata") <- probe_metadata | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @stephenwilliams22, I'm having a hard time understanding these lines. It seem like with filename
as the default value, the probe info won't be loaded since file_path
will point to the filtered h5. Should there be a separate variable (like probes.filename
) for raw_probe_bc_matrix.h5
which contains the probe information (and also 'matrix/features/probe_region')? Let me know what you think or if I'm misunderstanding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @AustinHartman. I actually wrote it this way if we ever decided to include the probe metadata in the raw or filtered feature_bc_matrix.h5 it will work as is. The way the code is written if you don't use filename=raw_probe_bc_matrix.h5
if("matrix/features/probe_region" %in% hdf5r::list.objects(infile))
will catch that that slot isn't there and skip making the meta-data. if you'd rather I update the code to not run file_path <- file.path(data.dir, filename) infile <- hdf5r::H5File$new(filename = file_path, mode = 'r')
I'm happy to do that as well. As it stands the code works for raw_probe_bc_matrix.h5
, raw_feature_bc_matrix.h5
, and filtered_feature_bc_matrix.h5
and will only write probe_metadata for raw_probe_bc_matrix.h5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. In that case, do you think filename
should be passed to Read10x_probe_metadata
in the event that the raw_probe_bc_matrix.h5
has a different name? It seems possible for the if
condition to pass and Read10x_probe_metadata
to fail with File not found
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a good idea. I'll make the fix
@AustinHartman Feel free to run through this one more time. I ran |
Great, thanks for the PR! Hoping to have a CRAN release somewhat soon. |
Awesome! |
This pull request makes updates to
Load10X_Spatial
andRead10X_h5
to accommodate the new output of spaceranger 2.1 (which is still in development)This PR
raw_probe_bc_matrix.h5
to be loaded byLoad10X_Spatial
Read10x_probe_metadata
The structure of the
raw_probe_bc_matrix.h5
is as followsI added an example
raw_probe_barcode_matrix.h5
to the visium test folderThis will probably require a fresh
roxygenize
but I don't know your workflow and didn't want to overstep