ropensci / phylocomr

Phylocom R interface
https://docs.ropensci.org/phylocomr
Other
15 stars 7 forks source link

Error accessing phylocom from R #16

Closed ecp52 closed 5 years ago

ecp52 commented 7 years ago

phylocomr-phylocom-from-R.txt Thanks for making this package!

I have R version 3.4 on Windows 7.

I installed Rtools and downloaded phylocomR package as instructed.

However when I run the bladj line, I get the following error

Error: call to 'phylocom' failed with status -1073741819

This may be a problem with some program getting blocked, I can't say for sure.

As workaround, I've found two other ways to access phylocom-- directly from the .bat file and using the "rbladj" function written by Cam Webb. These are options "1" and "2" in the script

Attached script--First part is to build tree. Acces to phylocom is at lines 56-86

sckott commented 7 years ago

thanks for your message @ecp52 !

Yeah, there's often problems with this on Windows. I'll look into it and get back to you.

Can you please paste in your sessionInfo() when this pkg is loaded

ecp52 commented 7 years ago

Thanks very much Scott.

The R script appears as a link in blue in the first line of the original post.

I am going to try this on a different computer because phylocom is not playing nice right now. Yesterday it was crashing, this morning it worked once, now crashing again. So it's not proper to attribute any errors to the package itself. Although I would like to get this to run one way or another-- maybe by borrowing a Mac or Linux OS:)

I've tried 4 avenues of access.

  1. Running phylocomr: ph_bladj(ages = Family.ages, phylo = treeget) Error: call to 'phylocom' failed with status -1073741819

  2. Command line: phylocom bladj >phylo.ages.txt "The program phylocom.exe has stopped working".....and the shell command-window closes

  3. Invoking the shell from within R shell("phylocom bladj > phylooutout.txt" ERROR execution failed with error code 5

  4. Using the "rbladj" draft function that you posted in the "brranching" documentation. Ages<-read.table("wikstrom.ages") rbladj(tree=treeget, ages=Family.ages, path="C:/phylocom/", fixroot=TRUE) Read 1 item Warning messages: 1: running command 'C:\Windows\system32\cmd.exe /c phylocom bladj > phyloout.txt' had status 1 2: In shell("phylocom bladj > phyloout.txt") : 'phylocom bladj > phyloout.txt' execution failed with error code 1

Thanks again for your support.

Here is the sessionInfo() R version 3.4.0 (2017-04-21) Platform: i386-w64-mingw32/i386 (32-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] reshape_0.8.6 phylocomr_0.1.0 rncl_0.8.2 taxize_0.8.4 phytools_0.6-00 [6] maps_3.1.1 Hmisc_4.0-2 ggplot2_2.2.1 Formula_1.2-1 survival_2.41-3 [11] lattice_0.20-35 brranching_0.2.0 ape_4.1

loaded via a namespace (and not attached): [1] Rcpp_0.12.10 knitr_1.15.1 xml2_1.1.1
[4] magrittr_1.5 cluster_2.0.6 MASS_7.3-47
[7] splines_3.4.0 progress_1.1.2 mnormt_1.5-5
[10] scatterplot3d_0.3-39 colorspace_1.3-2 R6_2.2.0
[13] quadprog_1.5-5 fastmatch_1.1-0 foreach_1.4.3
[16] parallel_3.4.0 msm_1.6.4 phangorn_2.2.0
[19] clusterGeneration_1.3.4 latticeExtra_0.6-28 coda_0.19-1
[22] iterators_1.0.8 htmltools_0.3.5 assertthat_0.2.0
[25] digest_0.6.12 tibble_1.3.0 numDeriv_2016.8-1
[28] Matrix_1.2-8 acepack_1.4.1 curl_2.5
[31] animation_2.5 compiler_3.4.0 scales_0.4.1
[34] prettyunits_1.0.2 backports_1.0.5 combinat_0.0-8
[37] jsonlite_1.4 igraph_1.0.1 munsell_0.4.3
[40] httr_1.2.1 plyr_1.8.4 stringr_1.2.0
[43] tools_3.4.0 sys_1.3 grid_3.4.0
[46] nnet_7.3-12 bold_0.4.0 nlme_3.1-131
[49] htmlTable_1.9 data.table_1.10.4 gtable_0.2.0
[52] checkmate_1.8.2 plotrix_3.6-4 lazyeval_0.2.0
[55] gridExtra_2.2.1 reshape2_1.4.2 RColorBrewer_1.1-2
[58] codetools_0.2-15 htmlwidgets_0.8 base64enc_0.1-3
[61] rpart_4.1-11 stringi_1.1.5 mvtnorm_1.0-6
[64] expm_0.999-2 foreign_0.8-67

ecp52 commented 7 years ago

Update: phylocom is working from the shell command line but still gives the same Error: call to 'phylocom' failed with status -1073741819 when running _phbladj()

lucasjardim commented 6 years ago

@ecp52, Have you solved this problem ("Error: call to 'phylocom' failed with status -1073741819") ?. I also tried to invoke the shell and it returned status 5, Do you know how to fix it?

ecp52 commented 6 years ago

No, I switched to "pez" package in R: Here is from Methods of a manuscript in prep: We used function “congeneric.merge” in the pez package (Pearse et al. 2015) to obtain a time-scaled, rooted tree by extraction of our species from an unparalleled molecular phylogeny of flower plants (Zanne et al. 2014). Contact me off-list if you need a sample script.

On Fri, Jan 12, 2018 at 12:28 PM, lucasjardim notifications@github.com wrote:

@ecp52 https://github.com/ecp52, Have you solved this problem ("Error: call to 'phylocom' failed with status -1073741819") ?. I also tried to invoke the shell and it returned status 5, Do you know how to fix it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/phylocomr/issues/16#issuecomment-357337311, or mute the thread https://github.com/notifications/unsubscribe-auth/ASk-sHDgeZK0UoO-6BpgZNsb5VaxX0wIks5tJ76LgaJpZM4NKWNN .

-- Evan Palmer-Young PhD candidate Department of Biology 221 Morrill Science Center 611 North Pleasant St Amherst MA 01003 https://scholar.google.com/citations?user=VGvOypoAAAAJ&hl=en https://sites.google.com/a/cornell.edu/evan-palmer-young/ epalmery@cns.umass.edu ecp52@cornell.edu

mrhelmus commented 3 years ago

@sckott I have received the same error as @lucasjardim on Windows. Phylocom is "installed" and works in the windows shell, but calling ph_bladj (or rbladj from brranching) results in

Error: call to 'phylocom' failed with status -1073740940

If you have time, any thoughts would be much appreciated!

Here is my session info: R version 4.0.2 (2020-06-22) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] ape_5.4-1 phylocomr_0.3.2.91

loaded via a namespace (and not attached): [1] compiler_4.0.2 parallel_4.0.2 Rcpp_1.0.6 nlme_3.1-152
[5] grid_4.0.2 sys_3.4 lattice_0.20-41

sckott commented 3 years ago

Thanks @mrhelmus for commenting here. The C code is from the Phylocom codebase, which I don't know enough about to debug. It seems to have more problems on Windows than elsewhere, so one solution is to not use on Windows - that's not a great solution of course.

What's needed is some debugging on a windows machine. I don't have a good setup for that. I'll try to add Windows checks on Github Actions here to see if bugs can be re-created at least

sckott commented 3 years ago

(crazy, right when I push up a github action file, actions is down 😆 )

mrhelmus commented 3 years ago

Thanks for taking a look at this so quickly @sckott! I broke two Macs while in grad school years ago so I switched to Windows... which at that time seemed more grad student proof (while ignoring people telling me to use Linux). I will pass the code along to a student who has a Mac so no worries if you don't see an obvious fix :)

sckott commented 3 years ago

Glad you have a non-windows option for now.

At least we're replicating the windows errors now https://github.com/ropensci/phylocomr/runs/2132375381?check_suite_focus=true#step:8:245 that's some progress.