Entering edit mode
4.7 years ago
Researcher
▴
130
Hi, I am trying to calculate the average expression using the given command:
cluster.averages <- AverageExpression(test)
and referring RNA values to export its raw counts but getting "Inf" as its value for most of the genes.
Example:
cluster.averages$RNA['EGFR','Tumor Cells']
[1] Inf
cluster.averages$RNA['SEC61G','macrophage']
[1] Inf
cluster.averages$RNA['SPP1', ]
T cell macrophage microglia Oligodendrocyte Tumor Cells
SPP1 Inf Inf Inf Inf Inf
Does any of you encounter this issue or can explain why I am getting this instead of an average read count?
Thanks in advance!
What is the command you're using?
Can you show the standard
summary()
result for the expression values of any one of those genes, e.g. EGFR? My suspicion is that it probably has to do with log-transforming 0 or the like.Hi Friederike, Just to clarify, I have data from 9 different samples. These were first merged and this how the GetAssayData() looks like:
Later, SCTransform was performed on this integrated data set and now the GetAssayData() gives:
Can you please guide how can I rectify this?
what does
GetAssayData(test_sct)['EGFR',] %>% summary
return?@Friederike, It is
Note: This summary is from the whole dataset. But I want this for each of the cluster or cell type identified thus used AverageExpression().
Well, I'm out. Sorry.
the only way I'm getting
-Inf
is with log-transformation:head(AverageExpression(object = pbmc_small))$RNA %>% as.matrix %>% log
I suggest you approach the Seurat authors on their github page and raise an issue/ask for a clarification.
Sure,Thanks for your help.