Open DUAN-GAO opened 2 years ago
Hi @Iweirdo,
You can take the command for how to run the calculateSumFactors
function (as it's now called) from #77. This function is from scran, which is an R package. So you'd need to run it in r. Try something like:
import rpy2.robjects as ro
ro.r('data') = data
adata.obs['size_factors'] = ro.r('calculateSumFactors(...)')
I haven't tested the above. This is just to give you an idea of what needs to be run in R
and what in python.
Hello Malte,I m running in a .py file, when I tried to use scran function computeSumFactors, that I need to convert anndata to SingleCellExperiment object,I tried following but not worked: a = robjects.r'list' b = robjects.r'SingleCellExperiment' size_factors = computeSumFactors(b, clusters=input_groups)
could you help, many thanks.