-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Fitting failed. Unable to retrieve the metadata #163
Comments
Hello, it works for me. Please try to clean the model cache sccomp:::clear_stan_model_cache() |
Thanks you your rapid reply.
sccomp says: count column is an integer. The sum-constrained beta binomial model will be used Model executable is up to date! |
Very strange > library(sccomp)
> data("counts_obj")
> sccomp_result =
+ counts_obj |>
+ sccomp_estimate(
+ formula_composition = ~ type,
+ .sample = sample,
+ .cell_group = cell_group,
+ .abundance = count,
+ cores = 1, verbose = FALSE
+ )
sccomp says: count column is an integer. The sum-constrained beta binomial model will be used
sccomp says: estimation
sccomp says: the composition design matrix has columns: (Intercept), typecancer
sccomp says: the variability design matrix has columns: (Intercept)
Precompiled model not found. Compiling the model...
Compiling Stan program...
Running make /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b "STAN_THREADS=TRUE" \
"STANCFLAGS += --name='glm_multi_beta_binomial_model'"
--- Translating Stan model to C++ code ---
bin/stanc --name='glm_multi_beta_binomial_model' --o=/var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b.hpp /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b.stan
--- Compiling C++ code ---
arch -arch arm64e clang++ -Wno-deprecated-declarations -std=c++17 -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -ffp-contract=off -Wno-ignored-attributes -DSTAN_THREADS -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.84.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -c -include-pch stan/src/stan/model/model_header.hpp.gch/model_header_threads_15_0.hpp.gch -x c++ -o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b.o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b.hpp
--- Linking model ---
arch -arch arm64e clang++ -Wno-deprecated-declarations -std=c++17 -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -ffp-contract=off -Wno-ignored-attributes -DSTAN_THREADS -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.84.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -Wl,-L,"/Users/a1234450/.cmdstan/cmdstan-2.35.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/a1234450/.cmdstan/cmdstan-2.35.0/stan/lib/stan_math/lib/tbb" /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b.o src/cmdstan/main_threads.o -ltbb stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/stan_math/lib/tbb/libtbb.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc_proxy.dylib -o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b
rm /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b.o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c3e41439b.hpp
Model executable is up to date!
Model compiled and saved to cache successfully.
sccomp says: to do hypothesis testing run `sccomp_test()`,
the `test_composition_above_logit_fold_change` = 0.1 equates to a change of ~10%, and
0.7 equates to ~100% increase, if the baseline is ~0.1 proportion.
Use `sccomp_proportional_fold_change` to convert c_effect (linear) to proportion difference (non-linear).
> clear_stan_model_cache()
Error in clear_stan_model_cache() :
could not find function "clear_stan_model_cache"
> sccomp:::clear_stan_model_cache()
Cache deleted: /Users/a1234450/.sccomp_models/2.1.0
> sccomp_result =
+ counts_obj |>
+ sccomp_estimate(
+ formula_composition = ~ type,
+ .sample = sample,
+ .cell_group = cell_group,
+ .abundance = count,
+ cores = 1, verbose = FALSE
+ )
sccomp says: count column is an integer. The sum-constrained beta binomial model will be used
sccomp says: estimation
sccomp says: the composition design matrix has columns: (Intercept), typecancer
sccomp says: the variability design matrix has columns: (Intercept)
Precompiled model not found. Compiling the model...
Compiling Stan program...
Running make /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b "STAN_THREADS=TRUE" \
"STANCFLAGS += --name='glm_multi_beta_binomial_model'"
--- Translating Stan model to C++ code ---
bin/stanc --name='glm_multi_beta_binomial_model' --o=/var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b.hpp /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b.stan
--- Compiling C++ code ---
arch -arch arm64e clang++ -Wno-deprecated-declarations -std=c++17 -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -ffp-contract=off -Wno-ignored-attributes -DSTAN_THREADS -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.84.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -c -include-pch stan/src/stan/model/model_header.hpp.gch/model_header_threads_15_0.hpp.gch -x c++ -o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b.o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b.hpp
--- Linking model ---
arch -arch arm64e clang++ -Wno-deprecated-declarations -std=c++17 -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -ffp-contract=off -Wno-ignored-attributes -DSTAN_THREADS -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.84.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -Wl,-L,"/Users/a1234450/.cmdstan/cmdstan-2.35.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/a1234450/.cmdstan/cmdstan-2.35.0/stan/lib/stan_math/lib/tbb" /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b.o src/cmdstan/main_threads.o -ltbb stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/stan_math/lib/tbb/libtbb.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc_proxy.dylib -o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b
rm /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b.hpp /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c34e9cd7b.o
Model executable is up to date!
Model compiled and saved to cache successfully.
sccomp says: to do hypothesis testing run `sccomp_test()`,
the `test_composition_above_logit_fold_change` = 0.1 equates to a change of ~10%, and
0.7 equates to ~100% increase, if the baseline is ~0.1 proportion.
Use `sccomp_proportional_fold_change` to convert c_effect (linear) to proportion difference (non-linear).
> sccomp_result =
+ counts_obj |>
+ sccomp_estimate(
+ formula_composition = ~ type,
+ .sample = sample,
+ .cell_group = cell_group,
+ .abundance = count,
+ cores = 1, verbose = FALSE
+ ) |>
+ sccomp_remove_outliers(cores = 1, verbose = FALSE) |> # Optional
+ sccomp_test()
sccomp says: count column is an integer. The sum-constrained beta binomial model will be used
sccomp says: estimation
sccomp says: the composition design matrix has columns: (Intercept), typecancer
sccomp says: the variability design matrix has columns: (Intercept)
Loading model from cache...
sccomp says: to do hypothesis testing run `sccomp_test()`,
the `test_composition_above_logit_fold_change` = 0.1 equates to a change of ~10%, and
0.7 equates to ~100% increase, if the baseline is ~0.1 proportion.
Use `sccomp_proportional_fold_change` to convert c_effect (linear) to proportion difference (non-linear).
Precompiled model not found. Compiling the model...
Compiling Stan program...
Running make /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4 "STAN_THREADS=TRUE" \
"STANCFLAGS += --name='glm_multi_beta_binomial_generate_data_model'"
--- Translating Stan model to C++ code ---
bin/stanc --name='glm_multi_beta_binomial_generate_data_model' --o=/var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4.hpp /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4.stan
--- Compiling C++ code ---
arch -arch arm64e clang++ -Wno-deprecated-declarations -std=c++17 -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -ffp-contract=off -Wno-ignored-attributes -DSTAN_THREADS -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.84.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -c -include-pch stan/src/stan/model/model_header.hpp.gch/model_header_threads_15_0.hpp.gch -x c++ -o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4.o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4.hpp
--- Linking model ---
arch -arch arm64e clang++ -Wno-deprecated-declarations -std=c++17 -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -ffp-contract=off -Wno-ignored-attributes -DSTAN_THREADS -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.84.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -Wl,-L,"/Users/a1234450/.cmdstan/cmdstan-2.35.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/a1234450/.cmdstan/cmdstan-2.35.0/stan/lib/stan_math/lib/tbb" /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4.o src/cmdstan/main_threads.o -ltbb stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/stan_math/lib/tbb/libtbb.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc.dylib stan/lib/stan_math/lib/tbb/libtbbmalloc_proxy.dylib -o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4
rm /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4.o /var/folders/7w/rg5zrgd17dn9pfwgpbgwdvxc0000gp/T/RtmpM2Mud5/model-c53c543baac4.hpp
Model executable is up to date!
Model compiled and saved to cache successfully.
Running standalone generated quantities after 1 MCMC chain, with 1 thread(s) per chain...
Chain 1 finished in 0.0 seconds.
sccomp says: outlier identification - step 1/2
Loading model from cache...
Running standalone generated quantities after 1 MCMC chain, with 1 thread(s) per chain...
Chain 1 finished in 0.0 seconds.
sccomp says: outlier-free model fitting - step 2/2
sccomp says: the composition design matrix has columns: (Intercept), typecancer
sccomp says: the variability design matrix has columns: (Intercept)
Loading model from cache...
>
> sccomp_result
# A tibble: 72 × 14
cell_group parameter factor c_lower c_effect c_upper c_pH0 c_FDR v_lower v_effect v_upper v_pH0 v_FDR count_data
<chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <list>
1 B1 (Intercept) NA 0.975 1.13 1.28 0 0 -6.36 -5.95 -5.53 0 0 <tibble [20 × 12]>
2 B1 typecancer type -1.15 -0.898 -0.644 0 0 NA NA NA NA NA <tibble [20 × 12]>
3 B2 (Intercept) NA 0.476 0.773 1.07 0 0 -5.63 -5.27 -4.93 0 0 <tibble [20 × 12]>
4 B2 typecancer type -1.19 -0.776 -0.359 0.000500 0.0000909 NA NA NA NA NA <tibble [20 × 12]>
5 B3 (Intercept) NA -0.625 -0.332 -0.0431 0.0583 0.00410 -6.83 -6.47 -6.11 0 0 <tibble [20 × 12]>
6 B3 typecancer type -0.625 -0.210 0.183 0.291 0.0826 NA NA NA NA NA <tibble [20 × 12]>
7 BM (Intercept) NA -1.25 -0.953 -0.660 0 0 -7.48 -7.00 -6.53 0 0 <tibble [20 × 12]>
8 BM typecancer type -0.752 -0.333 0.109 0.144 0.0369 NA NA NA NA NA <tibble [20 × 12]>
9 CD4 1 (Intercept) NA 0.200 0.380 0.564 0.00225 0.000163 -6.74 -6.36 -6.00 0 0 <tibble [20 × 12]>
10 CD4 1 typecancer type -0.0779 0.155 0.391 0.326 0.106 NA NA NA NA NA <tibble [20 × 12]>
# ℹ 62 more rows
# ℹ Use `print(n = ...)` to see more rows Please
Thanks |
Very very strange. I reinstall from github and then update all outdated packages upon request, this error return:
sccomp says: count column is an integer. The sum-constrained beta binomial model will be used --- Translating Stan model to C++ code --- --- Compiling C++ code --- --- Linking model ---
Matrix products: default locale: time zone: America/Toronto attached base packages: other attached packages: loaded via a namespace (and not attached): |
I suggest to update R. 4.3 is very outdated. Please try after updating if you can. I will also try to ask to some windows users to reproduce the code. |
When I used the example data, the following error occurred:
I have installed the latest version of sccomp (2.1.0). Could you check what the issue might be? Thank you!
The text was updated successfully, but these errors were encountered: