Closed doliv071 closed 3 years ago
So I have worked around the issue and I think I can give you a little more context on the problem:
Normally I would calculate quickCluster using ranks
tmp <- scran::quickCluster(scObj, use.ranks = TRUE, d = 50, BPPARAM = BiocParallel::MulticoreParam(8))
which generated the original error message I posted, I tracked it as low as I could go in R which was the scaledColRanks
function.
This function works when the input is a dense matrix object but not when it is sparse even if as.sparse
is set to true as below.
rankedCounts <- scran::scaledColRanks(as.matrix(counts(scObj)), subset.row = NULL, min.mean = 0.1,
transposed = FALSE, as.sparse = TRUE,
withDimnames = TRUE, BPPARAM = BiocParallel::MulticoreParam(8))
tmp <- scran::quickCluster(rankedCounts, use.ranks = FALSE, d = 50, BPPARAM = BiocParallel::MulticoreParam(8))
I'm honestly not sure that setting use.ranks = FALSE
within the quickCluster
function and passing it pre-ranked values produces the intended output, but I suspect it is close.
also, for reference,
> scObj
class: SingleCellExperiment
dim: 33538 6274
metadata(3): RAW cellsToKeep genesToKeep
assays(1): counts
rownames(33538): MIR1302.2HG FAM138A ... AC213203.1 FAM231C
rowData names(7): gene_id gene_name ... detected mean_in_detected
colnames(6274): AAACCTGAGAAGATTC-SRR12113801 AAACCTGAGGCAAAGA-SRR12113801 ... TTTGTCATCGGTCCGA-SRR12113801
TTTGTCATCTGAAAGA-SRR12113801
colData names(108): Cell_ID Barcode ... subsets_RP_percent total
reducedDimNames(0):
altExpNames(0):
Whoops. This has already been fixed in the next release, but try converting the matrix to a dgCMatrix
object for the time being.
Thanks Aaron, I actually updated BioC packages yesterday and scran was in the list so let me double check that my issue is resolved.
Edit: Just saw that you said it would be resolved in the next release. I will use the dgCMatrix
workaround for now. Thanks
I get the following error when attempting to use
scaledColRanks
Would appreciate any assistance