microeco
microeco copied to clipboard
Core microbiome
Hi, I wonder any possibility identify core microbiome using microeco object? Like filtering based on the prevalence and abundance? Pls let me know!
Hi. Here is an example based on microeco v0.14.0. Please make sure microeco has been updated to v0.14.0.
library(microeco)
data(dataset)
# copy the dataset or use your dataset
core1 <- clone(dataset)
# define core microbiome, here relative abundance > 0.001; occurrence frequency > 50%
core1$filter_taxa(rel_abund = 0.001, freq = 0.5)
# then the features in d1 can be viewed as core features
Thank you so much. Excellent. I just want add another possibility of doing the core microbiome analysis for the different taxa level. For example at phylum level. Could you give me an idea how to do it?
On Mon, Feb 13, 2023 at 9:48 AM Chi Liu @.***> wrote:
Hi. Here is an example based on microeco v0.14.0. Please make sure microeco has been updated to v0.14.0.
library(microeco) data(dataset)
copy the dataset or use your dataset
core1 <- clone(dataset)
define core microbiome, here relative abundance > 0.001; occurrence frequency > 50%
core1$filter_taxa(rel_abund = 0.001, freq = 0.5)
then the features in d1 can be viewed as core features
— Reply to this email directly, view it on GitHub https://github.com/ChiLiubio/microeco/issues/182#issuecomment-1427488132, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMC3WZTWAG5M2ZTCQLIRYBTWXHRNXANCNFSM6AAAAAAUZ3PDEQ . You are receiving this because you authored the thread.Message ID: @.***>
You can use merge_taxa function to first merge your raw features to phylum level.
library(microeco)
data(dataset)
# copy the dataset or use your dataset
core1 <- dataset$merge_taxa("Phylum")
# each OTU in core1 means a phylum, see core1$tax_table
core1$filter_taxa(rel_abund = 0.001, freq = 0.5)
Thanks. There is small problem with merging at different taxa level. It is taking in to consideration of prefix when they particularly present in some frequency eventhough they are unclassified at that level.
for example, like following, | f__Mycoplasmataceae | g__Mycoplasma | s__Malacoplasma muris | f__Ruminococcaceae | g__Paludicola | s__ | f__Erwiniaceae | g__Erwinia | s__Erwinia aphidicola | f__Erwiniaceae | g__Erwinia | s__Erwinia persicina | f__Bacillaceae | g__Bacillus | s__
So how about removing those unclassified taxa after merging features into a specific level.