Open Feng-Zhang opened 1 year ago
Hi Feng-Zhang
Sorry for the delayed response. I would just perform an arcsin square root transformation of the matrix of proportions directly. The output you have shown above is not really compatible with the speckle package where it is expected that columns are samples and the rows are cell types.
prop.trans <- asin(sqrt(props))
Cheers, Belinda
How can I perform a variance stabilizing transformation on the proportions estimated by spacexr? I have the weight matrix below, where row is spot id, column is cell type name, the number in the matrix is the proportion of cell types estimated by spacexr. The sum of each row should equal 1, and here is not since I didn't copy the complete matrix.
By the way, would the scale.fac value largely affects the test results? In
prop.list <- convertDataToList(sexprops,data.type="proportions", transform="logit", scale.fac=174684/20)
vignette, scale.fac seems just equal the total number of cells divided by sample number, which is the mean number of cell for each samples rather than the exact vector of the total number of cells N for each sample.