Repository navigation
initial implementation of from_Seurat - #64
Merged
Merged
Conversation
Member
Author
|
The PR currently contains code to check whether there are conflicts in the var keys. # detect conflicting var keys
var_keys_checker <- do.call(rbind, lapply(names(seurat_obj@assays), function(assay_name) {
var_keys <- colnames(seurat_obj@assays[[assay_name]]@meta.features)
if (length(var_keys) > 0) {
data.frame(
assay = assay_name,
var_key = var_keys
)
} else {
NULL
}
}))
duplicated_var_keys <- unique(var_keys_checker$var_key[duplicated(var_keys_checker$var_key)])
var_keys_checker$conflict <- var_keys_checker$var_key %in% duplicated_var_keys
var_keys_checker$renamed_var_key <- ifelse(
var_keys_checker$conflict,
paste0(var_keys_checker$assay, "_", var_keys_checker$var_key),
var_keys_checker$var_key
)I'm thinking if the var keys are the same across assays, they can be stored in the AnnData. However, if there are conflicts, we should throw an error saying that MuData should be used instead. |
Member
Author
|
Will need to be updated based on our discussion in #72 |
rcannood
marked this pull request as ready for review
May 16, 2023 17:50
Member
Author
|
to_Seurat needs more unit tests, but the PR is already ready to be merged :) |
lazappi
added a commit
that referenced
this pull request
May 22, 2023
* origin/main: (23 commits) initial implementation of from_Seurat (#64) only check size when the names are already defined todo: add back obs_names and var_names length check update roxygen move required args to the front Update R/HDF5-read.R fix lint issues update tests refactor code to assume obs_names and var_names are defined Style and lint Add rhdf5 package skipe to HDF5 tests Add 1D sparse array to example.h5ad Remove requireNamespace("rhdf5") Fix bug in read_h5ad_string_array() Add support for reading H5AD rec arrays Covert 1D string arrays to vectors in read_h5ad_string_array() Update tests to use example.h5ad wip changes for #76 Remove Krumsiek augemented dataset Reduce example H5AD to 50 cells x 100 genes ...
lazappi
added a commit
that referenced
this pull request
Jul 5, 2023
* main: (26 commits) add gthb pat Update HDF5 writing functions and implement data frame writing (#85) remove shape trackstatus for now initial implementation of from_Seurat (#64) only check size when the names are already defined todo: add back obs_names and var_names length check update roxygen move required args to the front Update R/HDF5-read.R fix lint issues update tests refactor code to assume obs_names and var_names are defined Style and lint Add rhdf5 package skipe to HDF5 tests Add 1D sparse array to example.h5ad Remove requireNamespace("rhdf5") Fix bug in read_h5ad_string_array() Add support for reading H5AD rec arrays Covert 1D string arrays to vectors in read_h5ad_string_array() Update tests to use example.h5ad ...
This file contains hidden or 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
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.
Closes #60