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

Unsure about the real need of this #411

Open
SamGG opened this issue Nov 8, 2024 · 0 comments
Open

Unsure about the real need of this #411

SamGG opened this issue Nov 8, 2024 · 0 comments

Comments

@SamGG
Copy link

SamGG commented Nov 8, 2024

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

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

CATALYST/R/prepData.R

Lines 231 to 236 in 4ff7b02

# 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

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

No branches or pull requests

1 participant