-
Notifications
You must be signed in to change notification settings - Fork 25
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
[r] Add initial support for ragged array writing for Seurat v5 #2523
Open
mojaveazure
wants to merge
5
commits into
main
Choose a base branch
from
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[r] Add initial support for ragged array writing for Seurat v5 #2523
mojaveazure
wants to merge
5
commits into
main
from
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mojaveazure
force-pushed
the
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
branch
from
May 30, 2024 21:01
b21a806
to
49e4edf
Compare
mojaveazure
force-pushed
the
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
branch
from
July 15, 2024 21:57
49e4edf
to
3f5bca1
Compare
mojaveazure
force-pushed
the
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
branch
from
August 1, 2024 19:08
3f5bca1
to
c5a48a3
Compare
mojaveazure
force-pushed
the
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
branch
2 times, most recently
from
August 14, 2024 20:53
6461bc9
to
b692361
Compare
mojaveazure
force-pushed
the
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
branch
3 times, most recently
from
September 9, 2024 17:43
cb7147e
to
86a7be1
Compare
mojaveazure
force-pushed
the
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
branch
from
September 16, 2024 14:41
86a7be1
to
f80acdc
Compare
mojaveazure
added a commit
that referenced
this pull request
Sep 17, 2024
Seurat v5 adds support for ragged arrays, where not every `X` layer has exactly the same cells and features. To handle this, ragged `X` layers need to be re-indexed and re-shaped on ingestion to resize down to only the data present Modified SOMA methods: - `SOMAExperimentAxisQuery$to_seurat()` and `SOMAExperimentAxisQuery$to_seurat_assay()`: now read in as v5 assays New SOMA methods: - `SOMAExperimentAxisQuery$private$.to_seurat_assay_v5()`: helper method to read in ragged and non-ragged arrays into a v5 assay; note this method only handles expression layers, all other assay-level information is handled by parent `$to_seurat_assay()` to share code with v3 assay outgestion Requires #2523 and #3007 [SC-52261](https://app.shortcut.com/tiledb-inc/story/52261/)
Seurat v5 adds support for ragged arrays, where not every `X` layer has exactly the same cells and features. To handle these ragged arrays on ingestion, re-indexing the soma join IDs is necessary to pad the `X` layer to the full domain of the SOMA measurement Implemented SOMA methods: - `write_soma.Assay5()`: write a Seurat v5 assay to a SOMA measurement. When writing `X` layers, if a layer is ragged: - cast layer to `TsparseMatrix` for COO representation - re-index Seurat's character IDs to SOMA join IDs - re-index COO coordinates to SOMA join IDs - write array using `SOMASparseNDArray$private$.write_coo_dataframe()` Notes: - This PR does not implement alternate matrix (eg. DelayedArray, BPCells) ingestion
Expand tests
mojaveazure
force-pushed
the
paulhoffman/sc-46644/add-support-for-ragged-arrays-in-write-soma
branch
from
September 17, 2024 18:02
db6e539
to
9d0357a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Seurat v5 adds support for ragged arrays, where not every
X
layer has exactly the same cells and features. To handle these ragged arrays on ingestion, re-indexing the soma join IDs is necessary to pad theX
layer to the full domain of the SOMA measurementImplemented SOMA methods:
write_soma.Assay5()
: write a Seurat v5 assay to a SOMA measurement. When writingX
layers, if a layer is ragged:TsparseMatrix
for COO representationSOMASparseNDArray$private$.write_coo_dataframe()
Notes:
SC-46644
resolves #2658