You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Splatter is an ideal tool to simulate different kinds of single-cell profiling data. Recently I met a commo problem for most of my reference datasets using the function splatEstimate when Splatter was estimating the dropout parameters. The error said:
It seems like fitting the reference data to the logistic model failed. After that, I looked for the solutions on the Internet and found one. https://github.com/broadinstitute/infercnv/blob/master/R/SplatterScrape.R. It adds x_approx_mid <- median(x[which(y>0.2& y < 0.8)]) step before fit <- nls(y ~ .logistic(x, x0 = x0, k = k), data = df, start = list(x0 = x_approx_mid, k = -1)) and considers x_approx_mid as the x0 starting point.
I accepted this alteration and rerun the estimating step. Finally, it works for all of my datasets. However, I am not good at statistics and cannot find out why it works. Here is my R environment.
Could you check this problem and fix this bug in splat-estimate.R? Thanks very much!
The text was updated successfully, but these errors were encountered:
lazappi
changed the title
There is something wrong when estimating Splat dropout parameters
Better start value for x0 when estimating dropout parameters
Mar 28, 2022
Thanks for the issue and the suggested solution! This seems like it is related to #133. After that issue I added another fallback method which might work in this case, you can try it using the development version of {splatter}.
This solution from {infercnv} is probably more robust though so I will look at adding it. I can definitely see how having a better starting estimate of x0 would improve the fitting.
Hi,
Splatter is an ideal tool to simulate different kinds of single-cell profiling data. Recently I met a commo problem for most of my reference datasets using the function
splatEstimate
when Splatter was estimating the dropout parameters. The error said:It seems like fitting the reference data to the logistic model failed. After that, I looked for the solutions on the Internet and found one. https://github.com/broadinstitute/infercnv/blob/master/R/SplatterScrape.R. It adds
x_approx_mid <- median(x[which(y>0.2& y < 0.8)])
step beforefit <- nls(y ~ .logistic(x, x0 = x0, k = k), data = df, start = list(x0 = x_approx_mid, k = -1))
and considersx_approx_mid
as the x0 starting point.I accepted this alteration and rerun the estimating step. Finally, it works for all of my datasets. However, I am not good at statistics and cannot find out why it works. Here is my R environment.
Could you check this problem and fix this bug in splat-estimate.R? Thanks very much!
The text was updated successfully, but these errors were encountered: