Thank you for this tool. I'm trying to import my data by this package, everything was fine except to the point where I use qza_to_phyloseq() function
> # Creating a phyloseq object from QIIME artifacts
> mydata <- qza_to_phyloseq("QIIME2_format/taxonomy_forward_t240.qza", "QIIME2_format/rooted-tree.qza", "QIIME2_format/taxonomy-fw240-gg-97-otus.qza", "QIIME2_w16w28_wo-M418_phyloseq.tsv")
Show Traceback
Rerun with Debug
Error in validObject(.Object) : invalid class “otu_table” object:
Non-numeric matrix provided as OTU table.
Abundance is expected to be numeric.
> 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 in validObject(.Object) : invalid class “otu_table” object:
Non-numeric matrix provided as OTU table.
Abundance is expected to be numeric.
Is there something missing to convert the otu table to matrix or numeric value?
SVs<-read_qza("QIIME2_format/taxonomy_forward_t240.qza")
names(SVs)
[1] "uuid" "type" "format" "contents" "version" "data" "provenance"
SVs$uuid
[1] "a820de29-0c92-46dd-b795-821535c53afa"
SVs$data[1:5,1:5] #show the first 5 samples and features
Error in [.data.frame(SVs$data, 1:5, 1:5) : undefined columns selected
Metadata import
metadata <- read_tsv("QIIME2_w16w28_wo-M418_phyloseq.tsv")
Parsed with column specification:
cols(
.default = col_character()
)
See spec(...) for full column specifications.
Import feature-table
SVs<-read_qza("QIIME2_format/taxonomy_forward_t240.qza")
names(SVs)
[1] "uuid" "type" "format" "contents" "version" "data" "provenance"
SVs$uuid
[1] "a820de29-0c92-46dd-b795-821535c53afa"
SVs$data[1:5,1:5] #show the first 5 samples and features
Error in [.data.frame(SVs$data, 1:5, 1:5) : undefined columns selected
You might notice the error with SVs$data[1:5,1:5]
I hope I can find way to import my data to Phyloseq to do the downstream analysis.