How to get separate sequence fasta file for each sample from feature table after dada2 filtering

Hi
Which plugin and which script should i use to get sequence fasta files for each sample after dada2 denoising and filtering? I have my Feature table.qza and qzv in hand and i can see how many sequences per sample i have after filtering (see attached file).
Now i would like to have separate fatsa files per sample with all dada2-passed sequences within it?


I did search in the forum for that but nothing found.
Any comments PLZ?

Hi @sajjad.sarikhan,
I think this is the first time I’ve seen this request! Unfortunately, the q2-dada2 output is as you already have, a feature table, representative-sequences, and stats summary. As far as I know there is no way to retain individual fasta files. You might be able to hack something in R using the native version of dada2, but you’ll want to ask this question on the dada2 Forum.
Is there a particular reason you need these files individually, rather than say just using the feature-table? Just wondering perhaps what you are looking to do can be done without the individual fasta files.

Hello Mehrbod
Thank you for your comment! Actually, i didn’t have qiime2 database corresponding to my samples So stopped before training feature classifier and doing taxonomy analysis in qiime2. Instead i wanted to have fasta file for each sample to be able to align and merge the same sequences at each sample to obtain the features for each sample , and compare them to the related database and create its phylogenetic tree.
Thanks

Hi @sajjad.sarikhan,

Sorry but I'm not sure I quite understand still what you are trying to do.
When you say "qiime2 database correspondong to my samples", what exactly are you referring to?
If your end goal is to have a separate feature-table, phylogenetic tree, representative-sequences.. etc for each sample instead of the normal combined approach, you can achieve this using a combination of some of the available filtering methods after creating the combined version of said files.

For example, you can use filter-samples to retain only say Sample1 from your combined feature-table. This would leave you with a second feature-table which only has Sample1. Now, if you wanted the representative-sequences of Sample1 alone too, you could use that second feature-table and the filter-seqs action to filter and retain only rep-seqs for that sample from your combined rep-seqs file. Using the newly developed rep-seqs file then you can create a new phylogenetic tree for Sample1 alone using the standard tree-building tools within qiime2 phylogeny.

This of course still doesn't provide you with your original inquiry of separate fasta files per sample after dada2, but perhaps it does get you where you want? And my apologies in advance if I misinterpreted your intentions completely. :woozy_face:

If I'm way off, perhaps an example of what you want may help us get you there.

Hi Mehrbod
I am working on identification of Phytophthora species in my samples and there is not any ITS database in Qiime2 (UNITE is for fungal ITS). So i couldn’t pass “training feature classifier” and “taxonomy analysis” steps. Because, developing new database files for qiime2 are very time consuming, Instead, i wanted to have fasta file for each sample and then go ahead with standard phylogeny tools.
I think the filtering methods you mentioned will help me to get what i want.
Thank you

1 Like

@sajjad.sarikhan,
I am also rather confused by the protocol you describe. I already provided support for you in a separate topic last week regarding how you could use the taxonomy classifiers in QIIME 2 with your custom database. I would recommend that approach — at the very least the classify-consensus-vsearch method should perform similarly to standard phylogeny tools and it will be much less labor intensive.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.