achillesrasquinha/16SMaRT

Handoff to Phyloseq object has incompatible names

furbeck opened this issue · 3 comments

Description

With test files in R, and libraries
library(ggplot2)
library(vegan) # ecological diversity analysis
library(dplyr)
library(scales) # scale functions for vizualizations
library(grid)
library(reshape2) # data manipulation package
library(cowplot)
library(phyloseq)

The following fails to make a phyloseq object (mothur_data object, in this case). Comment out the treefile and it works again.

sharedfile = "fullmerge.shared"
mothurlist = "fullmerge.list"
taxfile = "fullmerge.cons.taxonomy"
treefile <- "fullmerge.phylip.tre" 
mapfile = "DataListingsMeatandEnvONLY.xlsx - MappingFile.csv"

# Import mothur data
mothur_data <- import_mothur(mothur_shared_file = sharedfile,
                             mothur_list_file = mothurlist,
                             mothur_tree_file = treefile,
                             mothur_constaxonomy_file = taxfile)

I think one of two things are happening:

  1. I am using the wrong files; will try again with the outputs from my new run on HCC and maybe fix my own problem.
  2. The names in the .tre are still things like "ERR34564342.233" instead of "Otu1" like in the .shared and .cons.taxomony files, so they do not match and Phyloseq can't organize itself. To make them match, I think I might be able to use a .list file as an additional output? I am not sure. Either way I would guess the garbled SRA names are the culprit.

Screenshot

No response

Console errors

Error message as follows:
Error in validObject(.Object) : invalid class “phyloseq” object: Component taxa/OTU names do not match. Taxa indices are critical to analysis. Try taxa_names()

@furbeck I successfully had the tree file patched with the latest list file however there seems to be OTU duplicates within it, care to comment?

@furbeck - Kindly take a look at these files output.zip

Fixed using ggtree. Closing.