Open KatjaRM opened 4 years ago
I have the same issue! Did you manage to solve it?
I did not. Weirdly it happened with only one specific dataset but not with other ones. In the end I used a very annoying and time consuming workaround involving excel sheets that worked out, where I averaged everything myself and then reloaded the data back into R.
Hi Katja. Thanks for your reply! I have actually found out what was causing the error. I was trying to do exactly the same, that is looking at regulon activity between Seurat clusters. However, my set of cells did not match the clusters perfectly, and one cluster was represented by just one cell. This caused the error because, when selecting a single cell, I was getting an object "NULL" dimensions and passing it to "rowMeans". The fix (at least for me) is actually easy:
regulonActivity_byCellType <- sapply(split(rownames(cellInfo), cellInfo$seuratCluster),
I am sorry that you had to use a complex workaround, but I hope this answer is helpful anyway :)
Thank you! That helps!!! :)
Hi,
I am not able to run this for some reason, here's my code and error, can someone help? Thanks
regulonActivity_byCellType <- sapply(cellInfo$seuratCluster,
+ function(Cell) rowMeans(getAUC(auc_mtx)[,Cell]))
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'rowMeans': could not find function "getAUC"
Hi everyone,
I am trying to plot regulon activity using the code provided in the vignette. When I try to run
regulonActivity_byCellType <- sapply(split(rownames(cellInfo), cellInfo$seuratCluster), function(cells) rowMeans(getAUC(regulonAUC)[,cells]))
I get the error
Error in base::rowMeans(x, na.rm = na.rm, dims = dims, ...) : 'x' must be an array of at least two dimensions
I checked that my cells are named similarly and they are all present in the cellInfo. No cells are missing in cellInfo.
Here is
head(cellInfo)
dataset2_AAAGTAGGTACGACCC 25 1790 5693 dataset2_AACTGGTCAACACCCG 24 1909 6369 dataset2_AAGGAGCAGATATACG 24 2046 8431 dataset2_ACATCAGTCTACCAGA 25 2043 7201 dataset2_ACCAGTAGTGGTCTCG 24 2061 6361 dataset2_ACGATGTCATGTAGTC 24 2586 9339
I think the error is potentially about regulonAUC, but cannot quite figure out where exactly.
getAUC(regulonAUC)
returns the cell names matching to cellInfo, as it should androwMeans(getAUC(regulonAUC)
returns the averages for the regulonsDoes anyone have any idea what could be wrong? Help would be greatly appreciated!
Best,
Katja