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 Sigma[m.ids, ] : incorrect number of dimensions #109

Open
Jiangmeling opened this issue Dec 6, 2022 · 1 comment
Open

Error in Sigma[m.ids, ] : incorrect number of dimensions #109

Jiangmeling opened this issue Dec 6, 2022 · 1 comment

Comments

@Jiangmeling
Copy link

est = music2_prop_t_statistics(bulk.control.mtx = bulk.control.mtx, bulk.case.mtx = bulk.case.mtx, sc.sce = sce,
clusters = 'celltype', samples = 'identity', select.ct = 'CD28')
Error in Sigma[m.ids, ] : incorrect number of dimensions

str(sce)
...............

..@ colData :Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. ..@ rownames : chr [1:29974] "sc09_AAACCCAAGTAGTGCG-1" "sc09_AAACCCACATGTAACC-1" "sc09_AAACCCAGTAGGCTCC-1" "sc09_AAACGAATCATCTCTA-1" ...
.. .. ..@ nrows : int 29974
.. .. ..@ listData :List of 2
.. .. .. ..$ celltype: Factor w/ 13 levels "CD28","CTLs",..: 1 1 3 4 10 3 10 3 3 3 ...
.. .. .. .. ..- attr(, "names")= chr [1:29974] "sc09_AAACGAATCGCTCTAC-1" "sc09_AAACGCTCACCGTGCA-1" "sc09_AAAGAACAGGAAGTGA-1" "sc09_AAAGAACCACGGCGTT-1" ...
.. .. .. ..$ identity: Factor w/ 9 levels "AC.sc10","AC.sc12",..: 6 6 6 6 6 6 6 6 6 6 ...
.. .. .. .. ..- attr(
, "names")= chr [1:29974] "sc09_AAACGAATCGCTCTAC-1" "sc09_AAACGCTCACCGTGCA-1" "sc09_AAAGAACAGGAAGTGA-1" "sc09_AAAGAACCACGGCGTT-1" ...
.. .. ..@ elementType : chr "ANY"
.. .. ..@ elementMetadata: NULL
.. .. ..@ metadata : list()

I think it might be the cause of "attr(*, "names")", but trying to fix it hasn't solved it yet. I wonder if anyone has similar problems. I hope you can get an answer, thanks!

@jsha129
Copy link

jsha129 commented Mar 27, 2023

I solved this by adding more than one celltype.
select.ct = c('CD28', 'CD138)

This is because R automatically coverts a matrix into a vector when selecting only one column. little annoying!

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

2 participants