Beta diversity in metaphlan 4.2.4 doesn't work becuase of rbiom upgrade?

Hello!

I’m using metphlan 4.2.4 to profile long reads and things are going well, but I’m trying to use the provided tool to calculate beta diversity and get the error “beta.div’ is not an exported object from ‘namespace:rbiom’”. I used conda for install and so I have rbiom 3.1.0 which doesn’t seem to use the beta.div function any more.

I’m working around this by replacing the code in the calculate_diversity.R script with the newer function bdiv_matrix, here’s an example:

if (opt$diversity == "beta"){
  
  # Bray-Curtis
  if (opt$metric == "bray-curtis"){
    mat <- rbiom::bdiv_matrix(as.matrix(mpa_table), bdiv="bray-curtis", weighted=TRUE)
  }
  

--Ilana

1 Like

Thank you @Irc47, I have updated the code on github so that this change will be included in the next release.