This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Help with this error code for tool subset_taxa; Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent

I am having trouble subseting my phyloseq data set (.biom) by a specific taxa at any Rank.

I load .biom data into R using library phyloseq.

Data2020 <- import_biom("XXX")

mapfile2020 <- import_qiime_sample_data("XXX")

tree <- read_tree("XXX")

mydata <- merge_phyloseq(Data2020, mapfile2020, tree)

colnames(tax_table(mydata)) <- c("Kingdom", "Phylum", "Class", "Order", "Family",  "Genus", "Species")

ps <- mydata

ps1 <- subset_taxa(ps, Phylum != "NA")

Subset to the data I want.

WRB_data <- subset_samples(ps1, Site=="WRB")

Then Try to Subset by a taxa.

WRB_data2 <- subset_taxa(WRB_data, Phylum=="Acidobacteria")

Always results in this error. Please Help!?

Error in dimnames(x) <- dn :    length of 'dimnames' [1] not equal to array extent
phyloseq biom subset_taxa error in dimnames(x)

0 answers

No answers yet.

Log in to answer this question.