Hi Helena,
While adapting prepData() to convert my own object to sce and then using the CATALYST pipeline, I am usure about the need of this factor conversion
|
cd <- DataFrame(lapply(md[k], function(u) { |
|
v <- as.character(rep(u, md$n_cells)) |
|
factor(v, levels = levels(u)) |
|
}), row.names = NULL) |
|
|
as md is reduced to the columns specified in md_cols and those columns previously converted to factor in
|
# assure correctness of formats |
|
k <- c(md_cols$id, md_cols$factors) |
|
md <- md[, k, drop = FALSE] %>% |
|
mutate_all(factor) %>% |
|
rename("sample_id" = md_cols$id) |
|
|
In the latter part, I am also unsure about the rename at L235.
Could you have a look when you have time and just drop me a line (without explanation) if you modify something or not.
Best wishes,
Samuel
Hi Helena,
While adapting prepData() to convert my own object to sce and then using the CATALYST pipeline, I am usure about the need of this factor conversion
CATALYST/R/prepData.R
Lines 291 to 295 in 4ff7b02
as md is reduced to the columns specified in md_cols and those columns previously converted to factor in
CATALYST/R/prepData.R
Lines 231 to 236 in 4ff7b02
In the latter part, I am also unsure about the rename at L235.
Could you have a look when you have time and just drop me a line (without explanation) if you modify something or not.
Best wishes,
Samuel