pySCTransform icon indicating copy to clipboard operation
pySCTransform copied to clipboard

How to get corrected counts

Open ahmetrifaioglu opened this issue 2 years ago • 5 comments

Dear @saketkc,

I would like to first thank you for providing SCTransform in python. I was wondering what is the proper way of getting corrected counts to perform further analysis? Is it correct to create AnnData object as below considering that I called the vst function with current_count=True?

corrected_counts = vst_out["corrected_counts"].T
var_names_corrected = vst_out['model_parameters_fit'].index
    
 adata_transformed = AnnData(corrected_counts, 
                                dict(obs_names=adata.obs_names),
                                dict(var_names=var_names_corrected))

Best

ahmetrifaioglu avatar Nov 08 '21 10:11 ahmetrifaioglu