diyabc / diyabcGUI

User interface to DIYABC/AbcRanger
https://diyabc.github.io/
Other
4 stars 2 forks source link

Odd display of results in modelchoice_out.predictions file #153

Open mamccartney opened 10 months ago

mamccartney commented 10 months ago

I just updated to R version 4.3.2 and ran a model contrast. Rather than displaying votes in the customary manner in the mmdelchoice_out file, the results for 8 tested scenarios look like this:

    model1        model2        model3        model4        model5        model6        model7        model8 selected model  post proba
     0.008         0.004         0.054         0.281         0.093         0.301         0.059         0.200              6       0.689
     0.000         0.000         0.002         0.092         0.008         0.865         0.003         0.031              6       1.000
     0.001         0.000         0.000         0.213         0.008         0.689         0.004         0.085              6       1.000

Please inform whether this is an updated display of the results (i.e with votes not displayed as integral values) and the meaning of the results listed in three rows such as this. Thank you.

fradav commented 10 months ago

Sorry, it’s a pollution from a WIP just ignore all values except the post prob on the first line. I will release a cleaned version shortly

mamccartney commented 1 month ago

Dear Drs. Collin and Durif,

Thank you for your messages about the DIYABC-RF GUI and my particular question. I have seen the notice on your dedicated site and certainly appreciate your decision to pause support and only support the command line version.

I am in the closing stages of preparing a revised manuscript that uses a lot of DIYABC-RF runs to study invasion genomics (based on SNP data from Genotyping by Sequencing) of zebra mussels in North America.

I have about 12-15 more scenario tests to run to revise a few results from which the diagnostics (LDA plots) indicated that scenarios and priors needed to be reformulated and the scenario tests re-run. Inferences from these few tests are most certainly incorrect. This past weekend while I was initiating a new run, I ran the commands to download the binary files:

library(diyabcGUI)

diyabcGUI::dl_all_latest_bin()

And of course, I found out that that was a bad idea. I see that there is no longer available for download a copy of abcranger for macOS when running the above command, at least at the public repository that R linked to.

I have run all of these scenarios tests (literally hundreds over the last two and half years) using the GUI via the Shiny app and it would be the least disruptive if I could simply complete these last few runs. Is there another way that I could obtain a copy abcranger for MacOS so that I can run the software in the shiny app on my Mac?

Thank you for any advice,

All the best,

Michael A McCartney, PhD Innovation Lab Scientist UMN Genomics Center 28 Snyder Hall 1475 Gortner Ave @.***

On Tue, Jan 9, 2024 at 4:20 AM François-David Collin < @.***> wrote:

Sorry, it’s a pollution from a WIP just ignore all values except the post prob on the first line. I will release a cleaned version shortly

— Reply to this email directly, view it on GitHub https://github.com/diyabc/diyabcGUI/issues/153#issuecomment-1882792337, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATEOWWJQ2SUZBSRFUHMJFODYNUKVRAVCNFSM6AAAAABBIJ3BGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSG44TEMZTG4 . You are receiving this because you authored the thread.Message ID: @.***>

fradav commented 1 month ago

Hi, since september, we release binaries for macos in either native x86 or native ARM parts. The names of the binaries changed to reflect that, but that change hasn’t been backported to DIYABC-GUI who fails to retrieve the new binaries for mac.

Workaround : manually download the right version for you, and rename it just to the expected name by the GUI to the expected location (perhaps @gdurif knows where exactly ?)

gdurif commented 1 month ago

Hi @mamccartney

Following @fradav suggestion, you can download the new binary files for diyabc and abcranger from the corresponding repositories (see https://diyabc.github.io/cli/ to get the URL), and you just need to put them in the directory returned by the function:

diyabcGUI:::bin_dir()

(Be careful to use the three : because the bin_dir() function is not exported by the package)

The only prerequisite is that the binary files contain diyabc or abcranger respectively.

mamccartney commented 1 month ago

Dear Dr. Durif,

Thank you very much for your time and for the instructions on the workaround. I downloaded the following versions of the two binaries that should work for my M1 Mac:

diyabc-RF-macos-v1.1.51 abcranger-macos-arm64-v1.16.69

And then placed them into this directory: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/diyabcGUI/bin

This is the directory that is returned on my machine when I run the function that you sent: diyabcGUI:::bin_dir() (Using three ::: )

Then in R, I launched the interface:

library(diyabcGUI) diyabcGUI::diyabc()

In R, I still see the error: Warning: Missing binary file(s), please run 'diyabcGUI::dl_all_latest_bin()

And when the window appears in the shiny app, I get the message to Update the internal engine and the software will not run.

I tried leaving the filenames for the binaries as above, and just in case, I also tried changing their names to

diyabc abcranger

Am I missing something? Thank you, all the best,

Michael

Michael A McCartney, PhD Innovation Lab Scientist UMN Genomics Center 28 Snyder Hall 1475 Gortner Ave @.***

On Tue, Oct 8, 2024 at 8:12 AM gdurif @.***> wrote:

Hi @mamccartney https://github.com/mamccartney

Following @fradav https://github.com/fradav suggestion, you can download the new binary files for diyabc and abcranger from the corresponding repositories (see https://diyabc.github.io/cli/ to get the URL), and you just need to put them in the directory returned by the function:

diyabcGUI:::bin_dir()

(Be careful to use the three : because the bin_dir() function is not exported by the package)

The only prerequisite is that the binary files contain diyabc or abcranger respectively.

— Reply to this email directly, view it on GitHub https://github.com/diyabc/diyabcGUI/issues/153#issuecomment-2399809508, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATEOWWJXHYA7NPZEY25FCJDZ2PK2PAVCNFSM6AAAAABNMCGIFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJZHAYDSNJQHA . You are receiving this because you were mentioned.Message ID: @.***>

fradav commented 1 month ago

The latest release for diyabc binary is 1.1.54 and it has the two binaries release for macos. Sorry, I forgot to declare it as the latest release.

mamccartney commented 1 month ago

Thank you Dr. Collin, I downloaded the new binary and put both it and abc ranger binaries in the correct directory The binaries are named diyabc-RF-macos-arm64-v1.1.54 abcranger-macos-arm64-v1.16.69

I copied them again into this directory: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/diyabcGUI/bin

This is the directory that is returned on my machine when I run the function: diyabcGUI:::bin_dir() (Using three ::: )

When I run the commands to launch the interface: library(diyabcGUI) diyabcGUI::diyabc()

Now DIYABC-RF opens in shiny and looks normal. If I load a datafile and click to check it, the program freezes and exits the shiny app, as below. This is the logged output from trying to launch the toy dataset: "simu_dataset_test_divergence_admixture_001.snp"

Listening on http://127.0.0.1:4065 INFO [2024-10-10 10:54:44] Starting diyabc-RF-GUI app INFO [2024-10-10 10:56:27] analysis project directory: /var/folders/h_/5sq53ll92_3chqcnft0tvpfr0000gn/T//RtmpUmWxAE/diyabc_rf774b7db1d36b WARN [2024-10-10 10:57:07] Error in &&: 'length = 1003' in coercion to 'logical(1)' Warning: Error in &&: 'length = 1003' in coercion to 'logical(1)' 2: shiny::runApp 1: diyabcGUI::diyabc INFO [2024-10-10 10:57:08] Exiting diyabc-RF-GUI app

Thank you,

Michael A McCartney, PhD Innovation Lab Scientist UMN Genomics Center 28 Snyder Hall 1475 Gortner Ave

On Thu, Oct 10, 2024 at 2:02 AM François-David Collin < @.***> wrote:

The latest release for diyabc binary is 1.1.54 https://github.com/diyabc/diyabc/releases/tag/v1.1.54 and it has the two binaries release for macos. Sorry, I forgot to declare it as the latest release.

— Reply to this email directly, view it on GitHub https://github.com/diyabc/diyabcGUI/issues/153#issuecomment-2404213280, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATEOWWIQQVZT5PEKQGOLVI3Z2YQ7ZAVCNFSM6AAAAABNMCGIFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBUGIYTGMRYGA . You are receiving this because you were mentioned.Message ID: @.***>

mamccartney commented 1 month ago

Hello Drs. Collin and Durif,

I am sending this note in case you did not receive it. Can you please check the error I encountered below (in blue text) and advise how I might address it? Thank you again,


Thank you Dr. Collin, I downloaded the new binary for diyabc-RF and put both it and abc ranger binary in the correct directory The binaries are named diyabc-RF-macos-arm64-v1.1.54 abcranger-macos-arm64-v1.16.69

I copied them into this directory: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/diyabcGUI/bin

This is the directory that is returned when I run the function suggested by G Durif: diyabcGUI:::bin_dir() (Using three ::: )

When I run the commands to launch the interface: library(diyabcGUI) diyabcGUI::diyabc()

Now DIYABC-RF opens in shiny and looks normal. If I load a datafile and click to check it, the program freezes and exits the shiny app, as below. This is the logged output after loading and checking the toy dataset: "simu_dataset_test_divergence_admixture_001.snp"

Listening on http://127.0.0.1:4065 INFO [2024-10-10 10:54:44] Starting diyabc-RF-GUI app INFO [2024-10-10 10:56:27] analysis project directory: /var/folders/h_/5sq53ll92_3chqcnft0tvpfr0000gn/T//RtmpUmWxAE/diyabc_rf774b7db1d36b WARN [2024-10-10 10:57:07] Error in &&: 'length = 1003' in coercion to 'logical(1)' Warning: Error in &&: 'length = 1003' in coercion to 'logical(1)' 2: shiny::runApp 1: diyabcGUI::diyabc INFO [2024-10-10 10:57:08] Exiting diyabc-RF-GUI app

Thank you,

Michael A McCartney, PhD Innovation Lab Scientist University of Minnesota Genomics Center 28 Snyder Hall 1475 Gortner Ave @.***

On Tue, Oct 8, 2024 at 2:45 AM François-David Collin < @.***> wrote:

Hi, since september, we release binaries for macos in either native x86 or native ARM parts. The names of the binaries changed to reflect that, but that change hasn’t been backported to DIYABC-GUI who fails to retrieve the new binaries for mac.

Workaround : manually download the right version for you, and rename it just to the expected name by the GUI to the expected location (perhaps @gdurif https://github.com/gdurif knows where exactly ?)

— Reply to this email directly, view it on GitHub https://github.com/diyabc/diyabcGUI/issues/153#issuecomment-2399095318, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATEOWWOYEL65AN4QRX2ILNLZ2OES5AVCNFSM6AAAAABNMCGIFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJZGA4TKMZRHA . You are receiving this because you authored the thread.Message ID: @.***>

mamccartney commented 1 month ago

Hello Drs. Collin and Durif,

I am sending this note in case you did not receive it. Can you please check the error I encountered below (in blue text) and advise how I might address it? Thank you again,


Thank you Dr. Collin, I downloaded the new binary for diyabc-RF and put both it and abc ranger binary in the correct directory The binaries are named diyabc-RF-macos-arm64-v1.1.54 abcranger-macos-arm64-v1.16.69

I copied them into this directory: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/diyabcGUI/bin

This is the directory that is returned when I run the function, kindly suggested by G Durif: diyabcGUI:::bin_dir() (Using three ::: )

When I run the commands to launch the interface: library(diyabcGUI) diyabcGUI::diyabc()

Now DIYABC-RF opens in shiny and looks normal. If I load a datafile and click to check it, the program freezes and exits the shiny app, as below. This is the logged output after loading and checking the toy dataset: "simu_dataset_test_divergence_admixture_001.snp"

Listening on http://127.0.0.1:4065 INFO [2024-10-10 10:54:44] Starting diyabc-RF-GUI app INFO [2024-10-10 10:56:27] analysis project directory: /var/folders/h_/5sq53ll92_3chqcnft0tvpfr0000gn/T//RtmpUmWxAE/diyabc_rf774b7db1d36b WARN [2024-10-10 10:57:07] Error in &&: 'length = 1003' in coercion to 'logical(1)' Warning: Error in &&: 'length = 1003' in coercion to 'logical(1)' 2: shiny::runApp 1: diyabcGUI::diyabc INFO [2024-10-10 10:57:08] Exiting diyabc-RF-GUI app

Thank you,

Michael A McCartney, PhD Innovation Lab Scientist University of Minnesota Genomics Center 28 Snyder Hall 1475 Gortner Ave @.***

On Tue, Oct 8, 2024 at 8:12 AM gdurif @.***> wrote:

Hi @mamccartney https://github.com/mamccartney

Following @fradav https://github.com/fradav suggestion, you can download the new binary files for diyabc and abcranger from the corresponding repositories (see https://diyabc.github.io/cli/ to get the URL), and you just need to put them in the directory returned by the function:

diyabcGUI:::bin_dir()

(Be careful to use the three : because the bin_dir() function is not exported by the package)

The only prerequisite is that the binary files contain diyabc or abcranger respectively.

— Reply to this email directly, view it on GitHub https://github.com/diyabc/diyabcGUI/issues/153#issuecomment-2399809508, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATEOWWJXHYA7NPZEY25FCJDZ2PK2PAVCNFSM6AAAAABNMCGIFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJZHAYDSNJQHA . You are receiving this because you were mentioned.Message ID: @.***>

gdurif commented 1 month ago

Hi @mamccartney

The error Error in &&: 'length = 1003' in coercion to 'logical(1)' is probably due to a bug in the interface code. To be able to locate it, could you run the command traceback() just after you encounter the error ?

Since the support for diyabcGUI is currently paused, we would normally not fix bugs at the moment, but I could try to look into it and check if I can fix it quickly.

Best,

mamccartney commented 1 month ago

Hello Dr. Durif,

Here is the output after running traceback()

12: execCallbacks(timeoutSecs, all, loop$id) 11: run_now(timeoutMs/1000, all = FALSE) 10: service(timeout) 9: serviceApp() 8: ..stacktracefloor..(serviceApp()) 7: withCallingHandlers(expr, error = doCaptureStack) 6: domain$wrapSync(expr) 5: promises::with_promise_domain(createStackTracePromiseDomain(), expr) 4: captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) } }) 3: ..stacktraceoff..(captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) } })) 2: shiny::runApp(appDir = system.file("application", package = "diyabcGUI")) 1: diyabcGUI::diyabc()

All the best,

Michael A McCartney, PhD Innovation Lab Scientist University of Minnesota Genomics Center 28 Snyder Hall 1475 Gortner Ave @.***

On Fri, Oct 18, 2024 at 2:06 AM gdurif @.***> wrote:

Reopened #153 https://github.com/diyabc/diyabcGUI/issues/153.

— Reply to this email directly, view it on GitHub https://github.com/diyabc/diyabcGUI/issues/153#event-14713167606, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATEOWWKL6ZZLCSOURTFHYULZ4CXQRAVCNFSM6AAAAABNMCGIFOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUG4YTGMJWG43DANQ . You are receiving this because you were mentioned.Message ID: @.***>

mamccartney commented 3 weeks ago

Hello Dr. Durif,

I'm writing to check with you about whether you think it will be possible for you to work on the possible bug in the GUI for DIYABC-RF.

I am also looking into an alternative, and that is for me to run the command line version. I have started working on that, with some success. If this looks to be a preferable option, may I communicate with you through email or on github to ask a couple of questions?

I am not an "advanced user" of command line tools, but I do have colleagues with coding experience who can help me and I do have a lot of experience with running DIYABC-RF in the GUI. I would like to have an alternative that respects your time and your policy--since you are willing to support the command line version.

Thank you, all the best,

Michael A McCartney, PhD Innovation Lab Scientist University of Minnesota Genomics Center 28 Snyder Hall 1475 Gortner Ave @.*** St. Paul MN, USA

On Sat, Oct 19, 2024 at 1:58 PM Michael McCartney < @.***> wrote:

Hello Dr. Durif,

Here is the output after running traceback()

12: execCallbacks(timeoutSecs, all, loop$id) 11: run_now(timeoutMs/1000, all = FALSE) 10: service(timeout) 9: serviceApp() 8: ..stacktracefloor..(serviceApp()) 7: withCallingHandlers(expr, error = doCaptureStack) 6: domain$wrapSync(expr) 5: promises::with_promise_domain(createStackTracePromiseDomain(), expr) 4: captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) } }) 3: ..stacktraceoff..(captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) } })) 2: shiny::runApp(appDir = system.file("application", package = "diyabcGUI")) 1: diyabcGUI::diyabc()

All the best,

Michael A McCartney, PhD Innovation Lab Scientist University of Minnesota Genomics Center 28 Snyder Hall 1475 Gortner Ave @.***

On Fri, Oct 18, 2024 at 2:06 AM gdurif @.***> wrote:

Reopened #153 https://github.com/diyabc/diyabcGUI/issues/153.

— Reply to this email directly, view it on GitHub https://github.com/diyabc/diyabcGUI/issues/153#event-14713167606, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATEOWWKL6ZZLCSOURTFHYULZ4CXQRAVCNFSM6AAAAABNMCGIFOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUG4YTGMJWG43DANQ . You are receiving this because you were mentioned.Message ID: @.***>

gdurif commented 2 weeks ago

Hi @mamccartney,

Sorry for the late reply. And I have not been able to spare time to work on the issue with the GUI. For support with the command line interface, you can open issues on the dedicated repositories:

Sorry for the trouble, Best regards

mamccartney commented 2 weeks ago

Hi Dr. Durif,

Thank you, that is very kind of you to reply. All is well as I continue to make progress on the command line version of DIYABC-RF. I have some trouble modifying headerRF.txt files for the more complex scenario tests, but I am also making progress on that.

In the future, it would be extremely useful to have the GUI working. I would probably use it just to create the header files, since working in the command line has other significant advantages, once I get comfortable.

We have another big project starting in January that will involve invasion scenario testing. Perhaps someone at the University of Minnesota here can work on debugging the interface if you think that might help. I have no idea how hard that might be based on the output from running traceback on the error.

Thanks again to you and to Dr. Collin for your help. All the best,

Michael A McCartney, PhD Innovation Lab Scientist University of Minnesota Genomics Center 28 Snyder Hall, 1475 Gortner Ave St Paul, MN 55108 USA @.***

On Mon, Nov 4, 2024 at 2:54 AM gdurif @.***> wrote:

Hi @mamccartney https://github.com/mamccartney,

Sorry for the late reply. And I have not been able to spare time to work on the issue with the GUI. For support with the command line interface, you can open issues on the dedicated repositories:

Sorry for the trouble, Best regards

— Reply to this email directly, view it on GitHub https://github.com/diyabc/diyabcGUI/issues/153#issuecomment-2454130753, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATEOWWKDS2VWBPHKDTUBRFTZ64Y23AVCNFSM6AAAAABNMCGIFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJUGEZTANZVGM . You are receiving this because you were mentioned.Message ID: @.***>