Open huoqiang138 opened 3 years ago
If I understand correctly, you don't want the Pearson residuals (normalized data) for all genes, but only for a subset. You can do so in a two-step process:
vst_out <- vst(umi = pbmc, residual_type = 'none', return_cell_attr = TRUE)
norm_counts <- get_residuals(vst_out = vst_out, umi = pbmc[c('GZMK', 'PPBP', 'LYZ'), ])
This way vst
will not return a residual matrix, but only estimate the model parameters. When you then call get_residuals
you can use a subset of the original counts matrix to get only the residuals that you are interested in.
Ruinning
vst_out <- vst(umi = pbmc, residual_type = 'none', return_cell_attr = TRUE) Calculating cell attributes from input UMI matrix: log_umi gives: Error in h(simpleError(msg, call))
What is pbmc
in your case? In my example it is a count matrix that comes with the package, i.e. sctransform::pbmc
.
What version of sctransform
are you using? Please install from the develop branch with this command: remotes::install_github("ChristophH/sctransform@develop")
.
Finally, if you still see the error, please prove the output of the traceback()
command run right after the error shows up. Also provide the output of sessionInfo()
.
Hi Christoph, Thanks for all your work. When we use Scaledata we can specify the gene, for example"pbmc <- ScaleData(pbmc,features = all.genes,vars.to.regress = "percent.mt")", "features"can can specify the gene.So how to specify the desired gene in SCTransform? Many thanks in advance