I am trying to analysis scRNAseq
data and have both matrix and h5 as input for my pipeline (I have tried both off them). I have used the same pipeline before and worked perfectly.
the following lines are the beginning of the pipeline till I add information about the mitochondrial genes to the seurat
object.
data <- Read10X_h5(filename = 'test_filtered_feature_bc_matrix.h5')
counts <- data$`Gene Expression`
data <- CreateSeuratObject(counts = counts, project = "test", min.cells = 3, min.features = 200)
data[["percent.mt"]] <- PercentageFeatureSet(data, pattern = "^MT-")
after running the last line of the pipeline, I get the following error. do you know how solve the error?
I get the same error if I use matrix files as input. here is the last few lines of the error:
"ZFY-AS1", "LINC00278", "PCDH11Y", "PRKY", "USP9Y", "AC244213.1", "DDX3Y", "UTY", "TMSB4Y", "NLGN4Y", "NLGN4Y-AS1", "TTTY14", "AC010889.1", "KDM5D", "AC010889.2", "TTTY10", "EIF1AY", "MT-ND1", "MT-ND2", "MT-CO1", "MT-CO2", "MT-ATP8", "MT-ATP6", "MT-CO3", "MT-ND3", "MT-ND4L", "MT-ND4", "MT-ND5", "MT-ND6", "MT-CYB", "MAFIP", "AC011043.1", "AL354822.1", "AL592183.1", "AC240274.1", or "AC007325.4", not "counts". ℹ Did you mean "CLINT1"?
---
Backtrace:
▆
1. ├─Seurat::PercentageFeatureSet(nsclc.seurat.obj, pattern = "^MT-")
2. │ ├─features %||% ...
3. │ ├─base::grep(...)
4. │ │ └─base::is.factor(x)
5. │ ├─base::rownames(x = object[[assay]][layer])
6. │ ├─object[[assay]][layer]
7. │ └─SeuratObject:::`[.Assay`(object[[assay]], layer)
8. │ ├─SeuratObject::LayerData(...)
9. │ └─SeuratObject:::LayerData.Assay(features = i)
10. │ └─rlang::arg_match(...)
11. │ └─rlang:::arg_match_multi(arg, values, error_arg, error_call)
12. │ └─rlang:::map_chr(arg, ~arg_match0(.x, values, error_arg, error_call = error_call))
13. │ └─rlang:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
14. │ └─base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
15. │ └─rlang (local) FUN(X[[i]], ...)
16. │ └─rlang::arg_match0(.x, values, error_arg, error_call = error_call)
17. └─rlang:::stop_arg_match(w, values = x, error_arg = y, error_call = z)
18. └─rlang::abort(msg, call = error_call, arg = error_arg)