Question: Phyloseq Weighted Unifrac Ordination Error
0
gravatar for mzmd4
2.7 years ago by
mzmd40
mzmd40 wrote:

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

ADD COMMENTlink modified 2.7 years ago by Kevin Blighe65k • written 2.7 years ago by mzmd40

Can you take a look here, where the issue was reported by somebody else: https://github.com/joey711/phyloseq/issues/829

There also appears to be a solution provided.

ADD REPLYlink written 2.7 years ago by Kevin Blighe65k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1997 users visited in the last hour