leffj / mctoolsr

Microbial community analysis tools in R
http://leffj.github.io/mctoolsr/
20 stars 8 forks source link

Mantel functionality #7

Closed tobinhammer closed 9 years ago

tobinhammer commented 9 years ago

Both plotting distances as well as calculating correlations. Would be useful to correlate subsets of the distance matrix against one another, and also to correlate the distance matrix against metadata in the mapping file. For the latter I suppose a new DM would have to be calculated for the metadata.

leffj commented 9 years ago

This is currently possible by using filter_data() to get a subset of the data and calc_dm() on each subset. Then you can run a Mantel test from the vegan package. You can calculate a DM from the metadata by using dist() or vegdist() on the metadata (ie. input$map_loaded) variable.