I have run my analysis for 35 samples together (35 samples in one metadata).
I now have a representative sequences (qzv) file that can be converted to FASTA sequences, but these include sequences for all samples, combined together.
How can I extract FASTA representative sequences (OTU / ASV sequences) per biological sample from this file?
I found the following:
But it's a long time ago, and the links it points to have changed.
it's slow (so possibly consider writing a for-loop) but check out qiime feature-table filter-seqs and then export (qiime tools export/qiime tools extract), which should give you the per-sample fasta files you want.
I was able to run the commands that you suggested, but I realized by default they exported the FASTA by creating a new directory, not as a file with the name I gave. So I tried the options given here:
Usage: qiime tools export [OPTIONS]
Exporting extracts (and optionally transforms) data stored inside an
Artifact or Visualization. Note that Visualizations cannot be transformed
with --output-format
Options:
--input-path ARTIFACT/VISUALIZATION
Path to file that should be exported [required] --output-path PATH Path to file or directory where data should be
** exported to [required]**
--output-format TEXT Format which the data should be exported as. This
option cannot be used with Visualizations
--help Show this message and exit.
This command gives me an option to save output as file, but I couldn't get it work... I've tried it many times.
I also tried "fasta", ".fasta", ".txt" and so on for the option " --output-format ", but it also didn't work...
You need to use DNAFASTAFormat as your output format. (I think this is linked to the input/output format tied to semantic types. You can also specify the sample name in the output path.