This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Phyloseq Weighted Unifrac Ordination Error

Hello masters of R,

Please help me here. I've been using phyloseq package, and I love it. But only recently, I got an error about node_depth_edgelength when ordinating my phyloseq object with weighted PCoA. It didnt happen when I did unweighted PCoA ordination.

Here is just a short workflow that I used:

........................................................................................................................................................................................................................................................................................................................

BIOM = 'Fig2biom.biom'
TREE = 'OTU.tre'
OTU = 'OTU.fasta'

library(ggplot2)
library(plyr)
library(phyloseq)

PHYSEQ = import_biom(BIOM,treefilename = TREE, refseqfilename = OTU)

ORD_W = ordinate(PHYSEQ, "PCoA", "unifrac", weighted = TRUE)
ORD_UW = ordinate(PHYSEQ, "PCoA", "unifrac", weighted = F)

plot_ordination(PHYSEQ, ORD_W, color = "Location1", shape = "Location1") +
  geom_point(size = 7) +
  scale_colour_manual(values = c("#FF0033","#000066","#00CC33","#660099","#FF9900","#FFFF33","#996600","#FF66CC","#33FF99","#CC99FF","#CC0066","#99CC33","#FFCC00","#009999","#666666","#FF6666","#00FFCC","#006633","#FF6633","#99CCFF")) +
  scale_shape_manual(values = c(15,15,15,15,15,15,15,15,15,16,16,16,17,17,17,17,17,18,18,18))

plot_ordination(PHYSEQ, ORD_UW, color = "Location1", shape = "Location1") +
  geom_point(size = 7) +
  scale_colour_manual(values = c("#FF0033","#000066","#00CC33","#660099","#FF9900","#FFFF33","#996600","#FF66CC","#33FF99","#CC99FF","#CC0066","#99CC33","#FFCC00","#009999","#666666","#FF6666","#00FFCC","#006633","#FF6633","#99CCFF")) +
  scale_shape_manual(values = c(15,15,15,15,15,15,15,15,15,16,16,16,17,17,17,17,17,18,18,18))

........................................................................................................................................................................................................................................................................................................................

Here is the error message that I got:

........................................................................................................................................................................................................................................................................................................................

Error in .C(ape:::node_depth_edgelength, PACKAGE = "ape", as.integer(Ntip),  : 
  Incorrect number of arguments (7), expecting 5 for 'node_depth_edgelength'

........................................................................................................................................................................................................................................................................................................................

I tried to read the documentation, but I am hopelessly new to R. Please help me

phyloseq unifrac ape ordination pcoa

0 answers

No answers yet.

Log in to answer this question.