> taxtable<-taxonomy$data %>% as_tibble() %>% separate(Taxon, sep="; ", c("Kingdom","Phylum","Class","Order","Family","Genus","Species")) #convert the table into a tabular split version Warning message: Expected 7 pieces. Missing pieces filled with `NA` in 3346 rows [1, 3, 4, 6, 7, 8, 9, 13, 14, 15, 16, 17, 18, 20, 21, 24, 26, 28, 29, 33, ...]. > taxtable # A tibble: 7,586 x 9 Feature.ID Kingdom Phylum Class Order Family Genus Species Confidence 1 813974d865eab4b7… d__Bacte… p__Proteob… c__Alphap… o__Rhizo… f__Xantho… g__uncul… NA 0.919 2 85f3cd13360f5f34… d__Bacte… p__Chlorof… c__AD3 o__AD3 f__AD3 g__AD3 s__uncultur… 0.951 3 838bb9b5798c1f63… d__Bacte… p__Proteob… c__Alphap… o__Rhizo… f__Xantho… NA NA 1.00 4 a1a01da03e654654… d__Bacte… p__Acidoba… c__Acidob… o__Acido… f__uncult… g__uncul… NA 0.962 5 1c5fee949789cba2… d__Bacte… p__Chlorof… c__AD3 o__AD3 f__AD3 g__AD3 s__uncultur… 0.979 6 57981b8ffeb14a19… d__Bacte… p__Proteob… c__Alphap… o__Rhizo… f__Xantho… g__uncul… NA 0.841 7 de1b2c49bf65b697… d__Bacte… p__Proteob… c__Alphap… o__Rhizo… f__Methyl… NA NA 1.00 8 fe48f11469c89193… d__Bacte… p__Proteob… c__Alphap… o__Rhizo… f__Xantho… g__uncul… NA 0.881 9 6e7604ec6f61c2fe… d__Bacte… p__Proteob… c__Alphap… o__Rhizo… f__Xantho… g__Brady… NA 0.786 10 de4ba4ccdcfa0a43… d__Bacte… p__Methylo… c__Methyl… o__Rokub… f__Rokuba… g__Rokub… s__uncultur… 1.00 # … with 7,576 more rows > physeq<-phyloseq( + otu_table(SVs$data, taxa_are_rows = T), + phy_tree(tree$data), + tax_table(as.data.frame(taxtable) %>% select(-Confidence) %>% column_to_rownames("Feature.ID") %>% as.matrix()), #moving the taxonomy to the way phyloseq wants it + sample_data(metadata %>% as.data.frame() %>% column_to_rownames("#SampleID")) + ) Error: `df` must be a data frame without row names in `column_to_rownames()`. Run `rlang::last_error()` to see where the error occurred. > rlang::last_error() `df` must be a data frame without row names in `column_to_rownames()`. Backtrace: 1. phyloseq::phyloseq(...) 2. base::as.data.frame(.) 10. tibble::column_to_rownames(., "#SampleID") Run `rlang::last_trace()` to see the full context. > rlang::last_trace() `df` must be a data frame without row names in `column_to_rownames()`. Backtrace: █ 1. ├─phyloseq::phyloseq(...) 2. ├─phyloseq::sample_data(metadata %>% as.data.frame() %>% column_to_rownames("#SampleID")) 3. └─metadata %>% as.data.frame() %>% column_to_rownames("#SampleID") 4. ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env)) 5. └─base::eval(quote(`_fseq`(`_lhs`)), env, env) 6. └─base::eval(quote(`_fseq`(`_lhs`)), env, env) 7. └─`_fseq`(`_lhs`) 8. └─magrittr::freduce(value, `_function_list`) 9. ├─base::withVisible(function_list[[k]](value)) 10. └─function_list[[k]](value) 11. └─tibble::column_to_rownames(., "#SampleID")