microeco icon indicating copy to clipboard operation
microeco copied to clipboard

Core microbiome

Open apoosakkannu opened this issue 2 years ago • 5 comments

Hi, I wonder any possibility identify core microbiome using microeco object? Like filtering based on the prevalence and abundance? Pls let me know!

apoosakkannu avatar Feb 13 '23 06:02 apoosakkannu

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

ChiLiubio avatar Feb 13 '23 07:02 ChiLiubio

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: @.***>

apoosakkannu avatar Feb 14 '23 07:02 apoosakkannu

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)

ChiLiubio avatar Feb 14 '23 14:02 ChiLiubio

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__

apoosakkannu avatar Feb 16 '23 08:02 apoosakkannu

So how about removing those unclassified taxa after merging features into a specific level.

ChiLiubio avatar Feb 16 '23 08:02 ChiLiubio