joey711 / phyloseq

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:
http://joey711.github.io/phyloseq/
567 stars 187 forks source link

ASV reduction/pruning in phyloseq object #1680

Open camcecc opened 1 year ago

camcecc commented 1 year ago

Hi all, I had more than65k ASV sequences in my dataset and cut them down to the first 10k in the dada2 pipeline before creating the tree alignment = AlignSeqs(ASVs.nochim[1:1000], anchor=NA, processors=30) or else it was killing my machine. Now I have an issue in downsizing all the other objects I created for the phyloseq objects - otu_table, taxa_table, as they don't match with the tree sequences anymore. "Simple" downsizing of the seqtab.nochim and the taxa object didn't work (errors about the taxa/OTU not matching anymore, no matter what I did), so I created the phyloseq object with the original 65k ASVs version and now I want to match the ps with the tree, so I can add it to the object and proceed with my analysis. Is there a way to prune ASVs from the phyloseq object and then safely add the tree? Thank you!

samd1993 commented 11 months ago

are you able to use qiime2 at all? I have this issue all the time with large datasets and qiime2 actually has built in functions to prune your table to match your ASVs and vice versa so that you can then make a tree that matches your table