giannimonaco / ABIS

57 stars 16 forks source link

negative proportions #3

Closed eegk closed 5 years ago

eegk commented 5 years ago

Hi, I wonder if there is any other procedure required after TPM normalization,

I attempted to use your package using the formula below over a data-set and obtained negative proportions in some cases.

https://support.bioconductor.org/p/91218/

tpm3 <- function(counts,len) { x <- counts/len return(t(t(x)*1e6/colSums(x))) }

Best,

giannimonaco commented 5 years ago

Hello,

Yes, you should just use TPM values and it should be ok the way you did it.

It is normal to obtain negative proportions in some cases. If they are around zero (let's say between 0 to -5%), I would consider them as noise and I would simply take them as 0. Larger negative values, instead, should be taken as a warning message that the samples in your dataset have a composition that deviates substantially from the samples used to generate the ABIS signature matrix. The reason can be one of the following:

Hence, large negative values are actually giving you an information and are telling you that the ABIS signature matrix is not perfect for your dataset, and in particular for the cell types which produce the negative values. This is also the reason why I chose to use a deconvolution method that does not use constraints as a strategy to avoid negative values in the results.

Best,

Gianni

eegk commented 5 years ago

Thanks for the reply. Would you say it's possible to adjust a matrix to recover better a cell type signal ? Previous to a de-convolution analysis?