spacexr icon indicating copy to clipboard operation
spacexr copied to clipboard

RCTD for bulk to sc devonvolution

Open li-xuyang28 opened this issue 1 year ago • 1 comments

Dear dev team of spacexr,

Thanks for maintaining the package! I am trying to use RCTD to deconvolute TCGA bulkRNAseq with a scRNAseq object as reference (instead of spatial to sc). Our colleague has done this before. However, I noticed one caveat: RCTD prefers to deconvolute based on raw count (which makes sense as it maps to count of scRNAseq). Is it possible to map FPKM from bulk to some sort of pseudo-FPKM of scRNAseq? I was wondering if people have considered this to eliminate any length bias. Thanks!

li-xuyang28 avatar Jan 27 '25 19:01 li-xuyang28

Yes, there is actually a mode of RCTD that would accomplish this task well. Please see the fitBulk function within RCTD. This is used in the platform effect normalization step of RCTD. The default RCTD method will not work because it doesn't handle count sizes above 1000.

The scaling of gene expression doesn't actually matter for this mode, as long as it is linear. In fact, the scaling of FPKM is also preferable in this case because it corrects for gene length. I would recommend just multiplying FPKM by total library size for each sample. You can then pass this into the fitBulk function of RCTD.

dmcable avatar Jul 19 '25 00:07 dmcable