-
Notifications
You must be signed in to change notification settings - Fork 34
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
Implement scverse datastucture #356
Merged
Merged
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
grst
force-pushed
the
scverse_datastructure
branch
from
March 25, 2023 11:03
d60ad64
to
17e7a17
Compare
for more information, see https://pre-commit.ci
This reverts commit 6e19241.
Will fail, because anndata 0.9rc1 is not on conda.
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.
Implementing the changes suggested in #327.
Close #327
Close #184
Close #383
Requires
installed from theval_shape
branchTODO
_check_upgrade_schema()
wrappers to detect the 0.7 < x <= 0.11 data structure.-> NO. Get rid of them everywhere.
Should chain_qc be called implicitly here?No good reason to change that. Also it adds toobs
and that should not happen implicitly.chain_qc
function.adata.obsm["airr"]
. These special cases must be caught beforehand (it loading/saving doesn't interfere, it should definitely be possible to rely on the data being cleaned during IO)merge_adata
functions? (-> We got rid ofmerge_with_ir
, and replacemerge_airr_chains
withmerge_airr
. There is probably some functionality to expand (e.g. add airr chains on IR object with different dimensions), but we'll see how that works out in practice (see 'documentation' section of this checklist).Spatial & bulk ready
adata.uns
For spatial data (visium) we may have spots instead of cells. That means our usual receptor model doesn't fit.
While I am not going to implement all required changes for that in this PR, it would be good if the data structure
could already be used without backwards-incompatible changes for that.
.obsm["chain_indices"]
to an awkward array withobsm['chain_indices']
is NaN) versus cells that have a receptor, but no CDR3 sequences. Currently (also in the old implementation) they are treated differently (the former receives 'nan' as a clonotype, the latter a separate clonotypeairr_key
/chain_idx_key
in all functions?index_chains
by default during IO, but instead perform it on-the-fly when missing, as done elsewhere..obsm[airr_key]
is missing instead of complaining that the schema is outdated, as this is only one possibility why the key is missing. Or change the check to havingIR_VJ...
columns in adata.obs. But those could also have been added manually 🤷airr
orchain_indices
is missing from obsmget_airr
,get.airr
,"chain_indices"
,_has_ir
.adata
as attributegex:xxx
,airr:xxx
.scirpy.datasets
inplace
operations write toGet module
[ ] Do we want amost_frequent
function or others?Documentation
merge_airr_chains
-> this function now returns an AnnData object and doesn't modify inplace anymore. Also it removes all non-airr information.
Final checks:
IR_
/IR_VJ
/IR_VDJ
just in case something is not covered by testshas_ir
,multichain
Follow-up