joey711 / shiny-phyloseq

An interactive web application for demonstrating and using phyloseq.
http://joey711.github.io/shiny-phyloseq
GNU General Public License v3.0
59 stars 45 forks source link

shiny::runGitHub error #61

Closed bioboot closed 8 years ago

bioboot commented 9 years ago

I get the following error trying to run your shiny app:

> shiny::runGitHub("shiny-phyloseq","joey711")
Downloading https://github.com/joey711/shiny-phyloseq/archive/master.tar.gz
The following objects are masked from env_psdata (pos = 3):

    closed_1457_uparse, enterotype, esophagus, GlobalPatterns, kostic

The following objects are masked from env_psdata (pos = 11):

    closed_1457_uparse, enterotype, esophagus, GlobalPatterns, kostic

The following objects are masked from env_psdata (pos = 12):

    closed_1457_uparse, enterotype, esophagus, GlobalPatterns, kostic

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘distance’ for signature ‘"character", "missing"’

I ran through the dependency install steps, including running successfully the
https://raw.githubusercontent.com/joey711/shiny-phyloseq/master/install.R

Here is my sessionInfo()

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] scales_0.3.0         RColorBrewer_1.1-2   png_0.1-7
 [4] rmarkdown_0.8.1      markdown_0.7.7       genefilter_1.52.0
 [7] gridExtra_2.0.0      networkD3_0.2.6      data.table_1.9.6
[10] ggplot2_1.0.1        phyloseq_1.14.0      BiocInstaller_1.20.0
[13] shinythemes_1.0.1    shiny_0.12.2

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.1          ape_3.3              lattice_0.20-33
 [4] Biostrings_2.38.0    digest_0.6.8         foreach_1.4.3
 [7] biom_0.3.12          mime_0.4             R6_2.1.1
[10] plyr_1.8.3           chron_2.3-47         stats4_3.2.2
[13] RSQLite_1.0.0        httr_1.0.0           zlibbioc_1.16.0
[16] curl_0.9.3           annotate_1.48.0      vegan_2.3-1
[19] S4Vectors_0.8.0      Matrix_1.2-2         proto_0.3-10
[22] devtools_1.9.1       splines_3.2.2        stringr_1.0.0
[25] htmlwidgets_0.5      igraph_1.0.1         munsell_0.4.2
[28] httpuv_1.3.3         BiocGenerics_0.16.0  multtest_2.26.0
[31] mgcv_1.8-7           htmltools_0.2.6      IRanges_2.4.0
[34] codetools_0.2-14     XML_3.98-1.3         permute_0.8-4
[37] MASS_7.3-44          nlme_3.1-122         xtable_1.7-4
[40] gtable_0.1.2         DBI_0.3.1            magrittr_1.5
[43] stringi_0.5-5        XVector_0.10.0       reshape2_1.4.1
[46] iterators_1.0.8      tools_3.2.2          RJSONIO_1.3-0
[49] ade4_1.7-2           Biobase_2.30.0       parallel_3.2.2
[52] survival_2.38-3      AnnotationDbi_1.32.0 colorspace_1.2-6
[55] cluster_2.0.3        memoise_0.2.1

Any tips or advise for loving this. Thanks!

bioboot commented 9 years ago

I also get the same error after a git clone and a runApp("shiny-phyloseq")

spholmes commented 9 years ago

Biostrings_2.38.0 is the problem as it has it's own distance

as well, I believe this was fixed recently, my workaroudn was to

prefix calls to distance with phyloseq::distance

On Wed, Oct 21, 2015 at 10:13 AM, Biocomputing Bootcamp < notifications@github.com> wrote:

I also get the same error after a git clone and a runApp("shiny-phyloseq")

— Reply to this email directly or view it on GitHub https://github.com/joey711/shiny-phyloseq/issues/61#issuecomment-149966092 .

Susan Holmes Professor, Statistics and BioX John Henry Fellow in Undergraduate Education Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

spholmes commented 9 years ago

I believe this comes from an error we have been seeing alot for a different distance method that is taking precedence. Biostrings is the culprit and I believe Joey made a change to phyloseq that he may not have carried over to Shiny-phyloseq. Hack I used: If you prefix distance everywhere distance occurs with phyloseq::distance

Susan

On Wed, Oct 21, 2015 at 10:11 AM, Biocomputing Bootcamp < notifications@github.com> wrote:

I get the following error trying to run your shiny app:

shiny::runGitHub("shiny-phyloseq","joey711") Downloading https://github.com/joey711/shiny-phyloseq/archive/master.tar.gz The following objects are masked from env_psdata (pos = 3):

closed_1457_uparse, enterotype, esophagus, GlobalPatterns, kostic

The following objects are masked from env_psdata (pos = 11):

closed_1457_uparse, enterotype, esophagus, GlobalPatterns, kostic

The following objects are masked from env_psdata (pos = 12):

closed_1457_uparse, enterotype, esophagus, GlobalPatterns, kostic

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘distance’ for signature ‘"character", "missing"’

I ran through the dependency install steps, including running successfully the

https://raw.githubusercontent.com/joey711/shiny-phyloseq/master/install.R

Here is my sessionInfo()

sessionInfo() R version 3.2.2 (2015-08-14) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.10.5 (Yosemite)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages: [1] scales_0.3.0 RColorBrewer_1.1-2 png_0.1-7 [4] rmarkdown_0.8.1 markdown_0.7.7 genefilter_1.52.0 [7] gridExtra_2.0.0 networkD3_0.2.6 data.table_1.9.6 [10] ggplot2_1.0.1 phyloseq_1.14.0 BiocInstaller_1.20.0 [13] shinythemes_1.0.1 shiny_0.12.2

loaded via a namespace (and not attached): [1] Rcpp_0.12.1 ape_3.3 lattice_0.20-33 [4] Biostrings_2.38.0 digest_0.6.8 foreach_1.4.3 [7] biom_0.3.12 mime_0.4 R6_2.1.1 [10] plyr_1.8.3 chron_2.3-47 stats4_3.2.2 [13] RSQLite_1.0.0 httr_1.0.0 zlibbioc_1.16.0 [16] curl_0.9.3 annotate_1.48.0 vegan_2.3-1 [19] S4Vectors_0.8.0 Matrix_1.2-2 proto_0.3-10 [22] devtools_1.9.1 splines_3.2.2 stringr_1.0.0 [25] htmlwidgets_0.5 igraph_1.0.1 munsell_0.4.2 [28] httpuv_1.3.3 BiocGenerics_0.16.0 multtest_2.26.0 [31] mgcv_1.8-7 htmltools_0.2.6 IRanges_2.4.0 [34] codetools_0.2-14 XML_3.98-1.3 permute_0.8-4 [37] MASS_7.3-44 nlme_3.1-122 xtable_1.7-4 [40] gtable_0.1.2 DBI_0.3.1 magrittr_1.5 [43] stringi_0.5-5 XVector_0.10.0 reshape2_1.4.1 [46] iterators_1.0.8 tools_3.2.2 RJSONIO_1.3-0 [49] ade4_1.7-2 Biobase_2.30.0 parallel_3.2.2 [52] survival_2.38-3 AnnotationDbi_1.32.0 colorspace_1.2-6 [55] cluster_2.0.3 memoise_0.2.1

Any tips or advise for loving this. Thanks!

— Reply to this email directly or view it on GitHub https://github.com/joey711/shiny-phyloseq/issues/61.

Susan Holmes Professor, Statistics and BioX John Henry Fellow in Undergraduate Education Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

dejmail commented 8 years ago

I am also getting the exact same errors. I would gladly fix it if I knew how.

GiuSte commented 8 years ago

Hello folk! I am also getting the same error and I'd like to know if it'll be fixed or if there is a solution to use shiny -phyloseq. Please let me know if I have to leave the idea to worki with this tool. Thank you.

hackerzone85 commented 8 years ago

Hello Friends ! Here i got solution for this error. In file global.R i have replace the following line

distlist = as.list(unlist(phyloseq::distance("list"))

with the following line

distlist <- as.list(unlist(distanceMethodList))

As distanceMethodList , also conatins distance from vegan library, so i also add following line

library("vegan"); packageVersion("vegan")

just after line library("gridExtra"); packageVersion("gridExtra"). phyloseq::distanceMethodList having the list of distance method keys supported in function phyloseq::distance

bcpd commented 8 years ago

I'm also having this issue (on ubuntu 14.04). I would appreciate any suggestions as to how to modify the global.R file. Many thanks.

joey711 commented 8 years ago

The post by @hackerzone85 looks correct. The latest version of phyloseq (released October) includes a fix for "collisions" with other methods named distance, and part of that fixed introduced a new exported and documented object in the package named distanceMethodList.

The solution is just described by @hackerzone85 , rather than pull request, so I'll leave this open until I can implement the tweak to get up and working. In the mean time, the suggested workaround should suffice.

hackerzone85 commented 8 years ago

I did not get results for my own data upload from "Select biom file". After uploading my own biom file , still shows the results/graph of preloaded data. Any suggestion for this..?

bcpd commented 8 years ago

Thank you for your reply. I understand what the issue is. But I need help implementing the temporary fix. Thanks.

On Tue, Nov 24, 2015 at 6:06 PM, Paul J. McMurdie notifications@github.com wrote:

The post by @hackerzone85 https://github.com/hackerzone85 looks correct. The latest version of phyloseq (released October) includes a fix for "collisions" with other methods named distance, and part of that fixed introduced a new exported and documented object in the package named distanceMethodList.

The solution is just described by @hackerzone85 https://github.com/hackerzone85 , rather than pull request, so I'll leave this open until I can implement the tweak to get up and working. In the mean time, the suggested workaround should suffice.

— Reply to this email directly or view it on GitHub https://github.com/joey711/shiny-phyloseq/issues/61#issuecomment-159464375 .

slvrshot commented 8 years ago

Hello guys. I am very new to this and I was able to edit the global.R file by downloading the tar.gz to my desktop but I am unsure of how I should actually run all of the scripts, and in what order for this shiny-phyloseq package until it gets updated ( I have the same distance error stated above). Please help!!!

spholmes commented 8 years ago

Joey: Could you just make the two tweaks to Global.R ? I want to show shiny-phyloseq at a SMBE satellite meeting and I don't want to have 50 people who can't get this to work with the new versions of R/Biostrings. Thanks Susan

joey711 commented 8 years ago

Sure. I'm on the road right now. How soon do you need it?

spholmes commented 8 years ago

Joey, for my own purposes, I used the fix suggested above, ie use distlist <- as.list(unlist(distanceMethodList))

However, it would be nice if the current github version worked as well. There are other problems than this, but they only result in warnings, for instance Found more than one class "connection" in cache; using the first, from namespace 'BiocGenerics'

joey711 commented 8 years ago

I included the fix. You were correct about its origin (distance now S4 method in phyloseq).

Should work now. Let's make these warnings a separate issue and I'll close this one.

raw937 commented 6 years ago

I am having a similar issue with adonis Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘distance’ for signature ‘"phyloseq", "character"’

df = as(sample_data(filtered16s), "data.frame") d = distance(filtered16s, "unifrac", weighted = F) adonis(d ~ SoilType, df)