Closed vertesy closed 3 years ago
Solution probably here, but complicated... https://rpubs.com/will_townes/sparse-apply
referenced here: https://stackoverflow.com/questions/29901199/apply-for-sparsematrix-in-r
Instead, I use:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("sparseMatrixStats")
sparseMatrixStats::rowQuantiles()
irequire(sparseMatrixStats)
expr.q90 = iround(sparseMatrixStats::rowQuantiles(x, probs = quantileX) )
The calculation seem to be solved, but Calcq90Expression()
>>> qhistogram()
>>> qqSave()
just cant save the output.
### Keeps hanging
> qhistogram(log2.gene.expr.of.the.90th.quantile)
[1] "/groups/knoblich/users/abel/cbehome/Dropbox/Abel.IMBA/AnalysisD/Abel/SEO2/m1500c21.dSample.Organoids_2000/Highest.Expressed.Genes.umap/log2.gene.expr.of.the.90th.quantile.hist.pdf"
# output just before qqSave
### Saving works in
xxx = qplot(1:11); ggsave(plot = xxx, filename = "xxx.png")
xxx = qplot(1:11); cowplot::save_plot(plot = xxx, filename = "xxxCOW.png") # used
Problem is qHist and vector names: "Vector too many names. Messed up auto-coloring + label.
https://github.com/satijalab/seurat/issues?q=+Cholmod+error+%27problem+too+large%27