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

Make sure all sample metadata columns are compatible before merging #252

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions R/merge_sce_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ merge_sce_list <- function(
# if object has sample metadata then combine into a single data frame
if ("sample_metadata" %in% names(metadata_list)) {
sample_metadata <- metadata_list$sample_metadata |>
purrr::map(\(df) {
# make sure all column types are compatible first
df <- df |>
dplyr::mutate(across(everything(), as.character))
}) |>
allyhawkins marked this conversation as resolved.
Show resolved Hide resolved
dplyr::bind_rows() |>
unique()

Expand Down
Loading