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

Error in (function (cl, name, valueClass) : "data" is not a slot in the "Assay5" category. #49

Open
Pigeongeon opened this issue Feb 5, 2024 · 3 comments

Comments

@Pigeongeon
Copy link

【code】:
library(Libra)
OnlyTumor_HCC_atlas$MLGS_Group <- factor(OnlyTumor_HCC_atlas$MLGS_Group,levels = c("High","Low"))
DE2 = run_de(
OnlyTumor_HCC_atlas,
meta = meta.data,
replicate_col = NULL,
cell_type_col = "Release_Global_Cluster",
label_col = "MLGS_Group",
min_cells = 3,
min_reps = 2,
min_features = 0,
de_family = "singlecell",
de_method = "wilcox"
)

【Bug】:
Error in (function (cl, name, valueClass) :
"data" is not a slot in the "Assay5" category.

@haukeh90
Copy link

Hi,

I think the problem lies within the V5 Seurat assay that needs to be converted prior to run_de.

convert a v3 assay to a v5 assay

pbmc3k[["RNA5"]] <- as(object = pbmc3k[["RNA3"]], Class = "Assay5")

Afterwards you need to set the RNA3 assay as DefaultAssay.

Best,

Hauke

@Random-x-1
Copy link

expr_mtx_com is a dgCMatrix with features (genes) in rows and cells in columns.
meta_data_com is a matched dataframe metadata

single_de_results <- Libra::run_de(
input = expr_mtx_com,
meta = meta_data_com,
label_col = label_col,
replicate_col = "SubjectID",
cell_type_col = "cell_types",
min_cells = 1,
min_reps = 2,
de_family = "singlecell",
de_method = "wilcox",
n_threads = 56)

Still got following error:
Error in (function (cl, name, valueClass) :
"data" is not a slot in the "Assay5" category.

@AlanTeoYueYang
Copy link
Collaborator

Hi, you can try running this command to see if there's any change in the input given into the de function
inputs = Libra:::check_inputs(input = expr_mtx_com, meta = meta_data_com, ...)

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

4 participants