Open MCK-sketch opened 1 year ago
Hi again,
I am opening this thread as a have a similar issue when following this part of the tutorial but using my own data.
I used IdTaxa taxonomic classification method classifying against the silva v138 database and then with Pr2 v5 and then with pr2 v14. I checked the output taxa object from DECIPHER and there is taxonomy assigned for the ASVs.
When I use the code block in the tutorial that allows you to use IdTaxa as a drop-in replacement for assignTaxonomy, I have a problem with the pr2 taxonomy when converting the idtaxa output taxa class object to a matrix analogous to the output from assignTaxonomy (silva worked fine). One thing i notices is that IdTaxa output when using silva has as a list with three elements (taxon, confidence, rank) but the IdTaxa output when using pr2 only had two elements (taxon, confidence).
The problem I have is that every element in the matrix ends up as NA.
This is what I tried:
ids <- ids_pr2v5 # rename file ranks <- c("domain", "supergroup","division","subdivision","class","order","family","genus","species") # ranks of interest
taxid <- t(sapply(ids, function(x) { m <- match(ranks, x$rank) taxa <- x$taxon[m] taxa[startsWith(taxa, "unclassified_")] <- NA taxa }))
colnames(taxid) <- ranks; rownames(taxid) <- getSequences(seqtab.nochim)
Hi, I used IdTaxa to create a taxonomy table, but I am having trouble using it to create a phyloseq object. I get the error
Error in access(object, "tax_table", errorIfNULL) : tax_table slot is empty.
The output from idtaxa looks good in that it seems to have taxonomy assigned to sequences. Can someone let me know how I can fix this?
Thanks,