scran computeSumFactors showing error
1
0
Entering edit mode
@hemantcnaik-23771
Last seen 15 days ago
India

I am using scran version 1.22.1 trying to get the size factor from computeSumFactors

script which i am using

sizefact <- scran::computeSumFactors(x = input, clusters = emp.clusters)

Error

Error in (function (classes, fdef, mtable)  :
unable to find an inherited method for function ‘assay’ for signature ‘"matrix", "character"’


error is not showing with calculateSumFactors please suggest me why this error I am getting in case of computeSumFactors

scran single cell • 101 views
1
Entering edit mode
Aaron Lun ★ 27k
@alun
Last seen 12 hours ago
The city by the bay

Try using pooledSizeFactors.

In the past, computeSumFactors returned a vector of size factors if the input was a matrix, otherwise it would store the size factors in sizeFactors() if the input was an SCE. This was mildly confusing as the output varied depending on the format of the input, even when the assay matrix is the same. So, I created a pooledSizeFactors function that always returns a vector, and now computeSumFactors only modifies the input SCE - this is much more predictable.

(Note that computeSumFactors() is an alias of computePooledFactors().)