phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
I suspect there is a simple solution to this question but I have struggled to figure it out, and have not found exactly what I'm looking for after some searching.
I want to filter out ASVs from each sample in my phyloseq object that do not meet a relative abundance threshold, i.e. for each sample in my object, remove all ASVs that individually make up <1% of the total reads in that sample. It would also be helpful to record or display what proportion of each sample this filtered-out group of ASVs makes up (e.g., do all the ASVs removed by this filtering comprise 5% of total sample reads? 10%? etc.).
I have tried some of the examples using genefilter_sample and filterfun_sample but I must be overlooking something.
Thanks in advance for any suggestions or examples to follow.
Hello,
I suspect there is a simple solution to this question but I have struggled to figure it out, and have not found exactly what I'm looking for after some searching.
I want to filter out ASVs from each sample in my phyloseq object that do not meet a relative abundance threshold, i.e. for each sample in my object, remove all ASVs that individually make up <1% of the total reads in that sample. It would also be helpful to record or display what proportion of each sample this filtered-out group of ASVs makes up (e.g., do all the ASVs removed by this filtering comprise 5% of total sample reads? 10%? etc.).
I have tried some of the examples using genefilter_sample and filterfun_sample but I must be overlooking something.
Thanks in advance for any suggestions or examples to follow.