gauravsk / ranacapa

R package for downstream analysis for anacapa eDNA pipeline
https://f1000research.com/articles/7-1734/v1
GNU General Public License v3.0
22 stars 11 forks source link

check if this is an issue in the app #13

Closed gauravsk closed 6 years ago

gauravsk commented 6 years ago

From Sabrina:

Hey! so this may have been fixed already ( i cant tell because I dont see a scripted version of ranacapa on your or the anacapa github)…. the one that I have has a small bug in the beta diversity calculations…. it does not recalculate the distance matrix when switching to the bray method of analysis…. it was an easy fix by just adding

d <- distance(physeq_obj_rare, method=dissimMethod)
sampledf <- data.frame(sample_data(physeq_obj_rare))
veganComm <- vegan_otu(physeq_obj_rare)
ord <- ordinate(physeq_obj_rare, method = "MDS", distance = d)

after

dissimMethod = "bray"

so it was using the jaccard distance matrix for both the bray and jaccard analyses and therefore giving the same results for both

gauravsk commented 6 years ago

This line needs to get updated to take input$dissimMethod I think:

    pairwise.adonis(veganComm,getElement(sdf, input$var),sim.method = 'jaccard')