You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While decontam functions isContaminant and isNotContaminant are made available for SummarizedExperiment object, is there adaptation for prune_taxa() function for SE object? In other words, I was able to identify the contaminants in the SE object but not able to remove them. One solution was to convert SE to phyloseq object, identify and remove contaminant sequences and then convert back to SE object, but that is not horribly convenient.
The text was updated successfully, but these errors were encountered:
library(TreeSummarizedExperiment)
# Toy data
tse <- makeTSE()
# Plot original tree
plot(rowTree(tse))
# "Find" contaminants (get just randomly which are "contaminated")
contaminant <- sample(c(TRUE, FALSE), nrow(tse), replace = TRUE)
# Prune tree
tse_sub <- subsetByLeaf(tse, rowLeaf = rowLinks(tse)[ contaminant , "nodeLab"])
# Plot the subsetted tree
plot(rowTree(tse_sub))
Perhaps to add example in OMA under subsection "Removing contaminated sequences" or something?
Unless I am mistaken, this example is showing how to keep contaminated sequences only. Perhaps showing how to keep non-contaminated sequences only would be more directly helpful?
While decontam functions isContaminant and isNotContaminant are made available for SummarizedExperiment object, is there adaptation for prune_taxa() function for SE object? In other words, I was able to identify the contaminants in the SE object but not able to remove them. One solution was to convert SE to phyloseq object, identify and remove contaminant sequences and then convert back to SE object, but that is not horribly convenient.
The text was updated successfully, but these errors were encountered: