Skip to content
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

Allow to select a slot (e.g. scaled, raw etc..) in join_features() #69

Merged
merged 5 commits into from
Aug 21, 2023

Conversation

noriakis
Copy link
Contributor

@stemangiola

I have made the following changes to join_features() and checked that R CMD CHECK does not produce any warnings or errors. I would be grateful if you could review the PR.

  • add params for assay slot and prefix in get_abundance_sc_wide()
  • make get_abundance_sc_long() handle assay and slot specification
  • add arguments and params for assay slot in get_abundance_sc_long()
  • add params for assay slot and ... in join_features()

@stemangiola stemangiola self-requested a review August 21, 2023 09:04
Copy link
Owner

@stemangiola stemangiola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you please add unit tests, similar to join_features wide?

R/utilities.R Outdated
#'
#' @return A Seurat object
#'
#' @export
get_abundance_sc_long = function(.data, features = NULL, all = FALSE, exclude_zeros = FALSE){
get_abundance_sc_long = function(.data, features = NULL, all = FALSE, exclude_zeros = FALSE, assay = .data@active.assay, slot = "data"){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assay here is not needed as we will return all assays (inside the function is clear).

R/utilities.R Outdated
Comment on lines 194 to 199

DefaultAssay(.data) = assay
for(i in Assays(.data) %>% setdiff(assay)) {
.data[[i]] = NULL
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed as we return all assays

@noriakis
Copy link
Contributor Author

Thank you very much for your prompt review. I apologize for the misinterpretation of the feature. I have removed the assay argument from get_abundance_sc_long, and added a unit test for join_feature wide and long.

R/methods.R Outdated Show resolved Hide resolved
@stemangiola stemangiola merged commit 07426ae into stemangiola:master Aug 21, 2023
2 of 3 checks passed
@stemangiola
Copy link
Owner

Condrats! 🎉

@stemangiola stemangiola linked an issue Aug 21, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

join_feature, allow to select a slot (e.g. scaled, raw etc..)
2 participants