Open HanyingYan opened 1 month ago
Hi Hanying,
Redeconve does not require spatial information when performing deconvolution, this guarantees its eligibility of using parallel computation and thus efficiency. Therefore, in priciple, it can be used for bulk RNA-seq deconvolution as well. All you need to do is to substitute the st
matrix, which is supposed to be a gene-by-spot matrix, to your gene-by-sample matrix from bulk RNA-seq, and remain other parts as the same.
Hope this will help you. Feel free to ask if you have further questions.
Zixiang
Hi Zixiang,
Thank you for the instruction. I was able to apply deconvoluting()
on my bulk RNA-seq data by replace st
with bulk
matrix. However, I still have several questions.
res.ctmerge
and res.ct
(using get.ref()
) are somewhat different. Do you think the previous one is more accurate and we should stick to it when reference is not very large?normalize, you mentioned that Redeconve can also be used for bulk RNA-seq deconvolution. When doing this, normalization for reference is not required. When deconvoluting spatial transcriptomics, normalization is recommended. Can you explain why? Both my
bulkand
sc` and count-level, if I set normalize=F, the proportion results for every cell types in the annotation(N) with be generally around 1/N. However, if I set normalize=T, the results are more reasonable/variant.var_thresh
and exp_thresh
for bulk RNA data deconvolution? How do you evaluate the results with different hyperparameters?Thanks, Hanying
Hi Hanying,
You are raising very valuable questions. Here are my answers or suggestions:
res.ct
, we first get the average expression of all cells in a cell type through get.ref()
, then this averaged expression profile is used to get the abundance. For res.ctmerge
, we first get the abundance of each cell with its unique expression profile, then the abundance are merged. These results are the same only when the abundance of each cell in a cell type is exactly identical. In short res.ctmerge
is more accurate and res.ct
is an alternative when computing resources are insufficient.var_thresh
can remain the same because it's about variance of reference. exp_thresh
, which considers the minimum total count of a gene can be much larger than 0.003 (default) for you're using bulk, not st. We don't have a suggestion on the specific value, but you can try with a set of numbers to see which one will result in a satisfying number of genes.autoselection
mode. Basically it is by the residue of the LS term.Feel free to ask if you have further questions.
Zixiang
Hi Zixiang,
res.ctmerge
and res.ct
, can I always runto.proportion()
to get proportions? Because for each column(spot or bulkRNA sample) the values don't sum up to 1. And when you visualize the results using spatial.piechart(res.ctmerge, coords)
, it seems that you are using the proportions. exp_thresh
is 0.03 by default, not 0.003. Can you double check? Also, I noticed that in your sample code, you used res <- deconvoluting(sc, st, genemode = **"def"**, hpmode = "def", dopar = T, ncores = 8)
, but in the explanation, you mentioned the 3 modes are 'default', 'customized' and 'filtered'. So I wonder if it can recognize
'def' as 'default' and use all genes instead of filtering with default thresholds. default
but I will also try autoselection
to see how it goes!Thanks, Hanying
deconvoluting
only has relative significance, and that's why we need the "Gaining interpretability" section. to.proportion
is always a good choice for visualization and downstream analyses. You can also use to.absolute.abundance
if you have some prior knowledge about how many cells there are approximately in one st spot.
spatial.piechart
will automatically normalize the results so that the sum is 1 for each column, per the requirement of piechart.gene.filter
which actually filters the genes this value is 0.003, but we mistakenly set it to 0.03 in the function deconvoluting
. We will correct that.
For def
and default
, the built-in function in R match.arg
can match your input to a set of candidate values.
Hi team,
In the Redeconve manual.ipynb, I noticed that you mentioned Redeconve can also be used for bulk RNA-seq deconvolution. Does this mean we can use scRNA as reference to deconvolute bulk RNA data instead of ST?
If so, do you have any sample codes to run this kind of deconvolution? Because it looks to me that the deconvoluting() function only accepts parameters 'ref' and 'st'.
Thanks, Hanying