joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
579 stars 188 forks source link

plot_tree questions about displaying abundance #434

Open silargi opened 9 years ago

silargi commented 9 years ago

Hello! I'm giving phyloseq a try for the first time. I'm interested in the plot_tree function in particular. I've imported my biom out table, rep seqs, and phylo tree that I generated with Qiime. I'm interested in plotting the tree displaying dots that are proportional to TOTAL otu abundance. I understand from what I read that I can use "merge_samples" to this effect, as it sums the out abundance for all the samples. However, I can't figure out which value to pass to the "group" argument.

I "cheated" by importing a fake out table with only 1 column for the total abundance and I got the type of plot I want with plot_tree(myData, size = "abundance", label.tips = "taxa_names") Now I see that the size of the dot is in log scale and that i can change that by passing a different sizebase, for example as: plot_tree(myData, size = "abundance", label.tips = "taxa_names", sizebase = 2) I'd like to know if it is possible at all to display the dots not in log scale.

Thank you!

spholmes commented 9 years ago

You might find it easier to start with Shiny-phyloseq and use the transformations proposed in the panel, just to get the hang of how it works, then I'd do some examples with the data in the package already like the GlobalPatterns, then try your data.... Let us know, good luck Susan

On Wed, Feb 18, 2015 at 10:35 AM, silargi notifications@github.com wrote:

Hello! I'm giving phyloseq a try for the first time. I'm interested in the plot_tree function in particular. I've imported my biom out table, rep seqs, and phylo tree that I generated with Qiime. I'm interested in plotting the tree displaying dots that are proportional to TOTAL otu abundance. I understand from what I read that I can use "merge_samples" to this effect, as it sums the out abundance for all the samples. However, I can't figure out which value to pass to the "group" argument.

I "cheated" by importing a fake out table with only 1 column for the total abundance and I got the type of plot I want with

plot_tree(myData, size = "abundance", label.tips = "taxa_names") Now I see that the size of the dot is in log scale and that i can change that by passing a different sizebase, for example as: plot_tree(myData, size = "abundance", label.tips = "taxa_names", sizebase = 2) I'd like to know if it is possible at all to display the dots not in log scale.

Thank you!

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

Susan Holmes Professor, Statistics and BioX Director, MCS Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

silargi commented 9 years ago

Dear Susan, Thank you for the advice. So far it hasn't been easier. I tried to install Shiny-phyloseq but encountered an error. I installed the latest version of R. Then followed the instructions and typed the commands: install.packages("shiny") (No problem here) shiny::runGitHub("shiny-phyloseq","joey711") Downloading https://github.com/joey711/shiny-phyloseq/archive/master.tar.gz Loading required package: shiny Note: the specification for S3 class “AsIs” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “connection” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “file” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “pipe” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “textConnection” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. data.table 1.9.2 For help type: help("data.table") Error in library("d3Network") : there is no package called ‘d3Network’

I don't low what to do about that. Any help? Thank you!

silargi commented 9 years ago

I should maybe clarify that I'm running R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" on Platform: x86_64-apple-darwin10.8.0 (64-bit)

spholmes commented 9 years ago

The only error that is meaningful here is: Error in library("d3Network") : there is no package called ‘d3Network’

the others are standard warnings we all get, but this shows that there is something wrong with the downloads to CRAN, are you using RStudio and have you installed through the install packages tab, also which mirror is it looking at?

Thanks, it would be better to give us more of the output so we can debug where your errors are coming from, Susan

On Thu, Feb 19, 2015 at 5:46 AM, silargi notifications@github.com wrote:

Dear Susan, Thank you for the advice. So far it hasn't been easier. I tried to install Shiny-phyloseq but encountered an error. I installed the latest version of R. Then followed the instructions and typed the commands: install.packages("shiny") (No problem here) shiny::runGitHub("shiny-phyloseq","joey711") Downloading https://github.com/joey711/shiny-phyloseq/archive/master.tar.gz Loading required package: shiny Note: the specification for S3 class “AsIs” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “connection” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “file” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “pipe” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “textConnection” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. data.table 1.9.2 For help type: help("data.table") Error in library("d3Network") : there is no package called ‘d3Network’

I don't low what to do about that. Any help? Thank you!

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

Susan Holmes Professor, Statistics and BioX Director, MCS Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

silargi commented 9 years ago

I used R through my Terminal app. I tried a couple of different mirrors, USA (MD) and USA (WA 1). The output that I copied was all I got I'm afraid. Thank you!

spholmes commented 9 years ago

I am afraid that using it through the terminal is the problem as it is not finding the shiny material at RStudio. If you can't use Rstudio then forget about the Shiny-APp and just follow the instructions here:

http://joey711.github.io/phyloseq-demo/phyloseq-demo.html

Using R on a Mac is much much easier through the simple mac installs and RStudio I don't quite understand why you are using the linux setup here?

Susan

On Fri, Feb 20, 2015 at 8:32 AM, silargi notifications@github.com wrote:

I used R through my Terminal app. I tried a couple of different mirrors, USA (MD) and USA (WA 1). The output that I copied was all I got I'm afraid. Thank you!

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

Susan Holmes Professor, Statistics and BioX Director, MCS Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

silargi commented 9 years ago

Thank you Susan. I can use RStudio, I will update it to the latest version and try that way. I'm not an avid R user, so for the few simple things I've done with R in the past the Terminal App has worked just fine.

silargi commented 9 years ago

I've updated RStudio and followed the commands to run Shiny. I'm getting the same warnings and errors, see below. Going back to my original question, is there a transformation I could try to be able to display the size of the dot not on logarithmic scale when I run plot_tree? Thanks, Silvia

install.packages("shiny") trying URL 'http://cran.rstudio.com/bin/macosx/contrib/3.1/shiny_0.11.1.tgz' Content type 'application/x-gzip' length 1584079 bytes (1.5 Mb)

opened URL

downloaded 1.5 Mb

shiny::runGitHub("shiny-phyloseq","joey711") Downloading https://github.com/joey711/shiny-phyloseq/archive/master.tar.gz Loading required package: shiny Note: the specification for S3 class “AsIs” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “connection” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “file” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “pipe” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “textConnection” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. data.table 1.9.2 For help type: help("data.table") Error in library("d3Network") : there is no package called ‘d3Network’

spholmes commented 9 years ago

Hi Sylvia There seems to be a problem with your mirror: please go to http://cran.r-project.org/web/packages/d3Network/ and download the binaries relevant for your OS.

Then you will be able to use the transform choices when you plot the tree.

susan

On Tue, Feb 24, 2015 at 9:48 AM, silargi notifications@github.com wrote:

I've updated RStudio and followed the commands to run Shiny. I'm getting the same warnings and errors, see below. Going back to my original question, is there a transformation I could try to be able to display the size of the dot not on logarithmic scale when I run plot_tree? Thanks, Silvia

install.packages("shiny") trying URL ' http://cran.rstudio.com/bin/macosx/contrib/3.1/shiny_0.11.1.tgz' Content type 'application/x-gzip' length 1584079 bytes (1.5 Mb) opened URL

downloaded 1.5 Mb

shiny::runGitHub("shiny-phyloseq","joey711") Downloading https://github.com/joey711/shiny-phyloseq/archive/master.tar.gz Loading required package: shiny Note: the specification for S3 class “AsIs” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “connection” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “file” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “pipe” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. Note: the specification for S3 class “textConnection” in package ‘BiocGenerics’ seems equivalent to one from package ‘RJSONIO’: not turning on duplicate class definitions for this class. data.table 1.9.2 For help type: help("data.table") Error in library("d3Network") : there is no package called ‘d3Network’

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

Susan Holmes Professor, Statistics and BioX Director, MCS Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

silargi commented 9 years ago

Thank you Susan. I've downloaded the package d3Network_0.5.2.1.tgz for OS X Snow Leopard (I'm running mountain lion), but I'm afraid I don't know what to do with it. Would it be possible to get some instructions?

spholmes commented 9 years ago

Silvia

You just need the install.packages command, for instance if you use the Packages tab in Rstudio, there is an install icon, click on that and change the default CRAN choice in the input to Package Archive file and then enter the location of your downloaded file and it will install then try starting Shiny-Phyloseq again, you should use the online documentation from there,

Best of luck Susan

On Wed, Feb 25, 2015 at 10:05 AM, silargi notifications@github.com wrote:

Thank you Susan. I've downloaded the package d3Network_0.5.2.1.tgz for OS X Snow Leopard (I'm running mountain lion), but I'm afraid I don't know what to do with it. Would it be possible to get some instructions?

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

Susan Holmes Professor, Statistics and BioX Director, MCS Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/