biocore / gneiss

compositional data analysis toolbox
https://biocore.github.io/gneiss/
BSD 3-Clause "New" or "Revised" License
55 stars 28 forks source link

phyloseq support #276

Open davidvilanova opened 5 years ago

davidvilanova commented 5 years ago

Hello, Would it be possible to have phyloseq support or an easy way of building a new gneiss object based on a phyloseq object.

Thanks

mortonjt commented 5 years ago

Hi @davidvilanova , that may require a substantial amount of work -- I can't currently envision near-term support for phyloseq compatibility.

There are two ways to currently go about this.

  1. Download the newick files and resulting model parameters in the qiime2 plugin and parse out those results using ape or another R package for parsing trees. You can also export the results from the ilr-transform provided in qiime2 - and import those transformed values into R.

  2. If you want to redo the ilr transform / statistical modeling to enable tightly coupled support with phyloseq, it maybe worth looking into the following packages. It should be possible, but will require a bit amount of software engineering to get the tree fully linked to the phyloseq objects.

https://github.com/jsilve24/philr https://github.com/reptalex/phylofactor https://cran.r-project.org/web/packages/compositions/index.html