# Extracting representative sequences from table

**URL:** <https://forum.qiime2.org/t/extracting-representative-sequences-from-table/20781>\
**Category:** User Support\
**Tags:** export, metadata\
**Created:** [September 17, 2021, 1:55pm UTC](https://forum.qiime2.org/t/extracting-representative-sequences-from-table/20781 "2021-09-17T13:55:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkramer](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@bkramer](https://forum.qiime2.org/u/bkramer)\
**Post date:** [September 17, 2021, 1:55pm UTC](https://forum.qiime2.org/t/extracting-representative-sequences-from-table/20781/1 "2021-09-17T13:55:35Z")

</div>

Hello,

I have filtered my table.qza file containing all of my sequences based on those sequences found in a single sample using the qiime feature-table filter-samples command, but I was wondering if it was possible to extract those sequences as a rep-seqs file so that I can export it as a fasta file.

Any help would be greatly appreciated. Thank you!

Ben

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [September 20, 2021, 2:50pm UTC](https://forum.qiime2.org/t/extracting-representative-sequences-from-table/20781/2 "2021-09-20T14:50:08Z")

</div>



---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [September 21, 2021, 11:43pm UTC](https://forum.qiime2.org/t/extracting-representative-sequences-from-table/20781/4 "2021-09-21T23:43:19Z")

</div>

Hi @bkramer,

> [@bkramer](#):
>
> I have filtered my table.qza file containing all of my sequences based on those sequences found in a single sample using the qiime feature-table filter-samples command, but I was wondering if it was possible to extract those sequences as a rep-seqs file so that I can export it as a fasta file.

I first want to note that my suggestion here is going to be making the assumption that you have a `FeatureData[Sequence]` artifact (which is very common - but please let me know if that is not the case, because this recommendation won't be possible without it).

With that being said, if you do have a `FeatureData[Sequence]` artifact with the "complete" set of features in it, then you can filter that file down using your filtered table. More information on this method can be found by entering `qiime feature-table filter-seqs --help`, just for your reference.

From here, you can use the output file from the above command (which will also be a `FeatureData[Sequence]` artifact) as the input for `qiime tools export`, which will allow you to export this data in FASTA format. More information on the parameters for this command can be found by entering `qiime tools export --help`, or checking out [this tutorial](https://docs.qiime2.org/2021.8/tutorials/exporting/).

Cheers 🦎

---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [September 21, 2021, 11:43pm UTC](https://forum.qiime2.org/t/extracting-representative-sequences-from-table/20781/5 "2021-09-21T23:43:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [October 23, 2021, 5:43am UTC](https://forum.qiime2.org/t/extracting-representative-sequences-from-table/20781/6 "2021-10-23T05:43:31Z")

</div>

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