# Create a FeatureID table with count frequency data for each sample

**URL:** https://forum.qiime2.org/t/create-a-featureid-table-with-count-frequency-data-for-each-sample/31141
**Category:** User Support
**Created:** [August 14, 2024, 5:37pm UTC](https://forum.qiime2.org/t/create-a-featureid-table-with-count-frequency-data-for-each-sample/31141 "2024-08-14T17:37:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hdoris](https://forum.qiime2.org/user_avatar/forum.qiime2.org/hdoris/32/9767_2.png) [@hdoris](https://forum.qiime2.org/u/hdoris)
#### Post date: [August 14, 2024, 5:37pm UTC](https://forum.qiime2.org/t/create-a-featureid-table-with-count-frequency-data-for-each-sample/31141/1 "2024-08-14T17:37:40Z")

</div>

Hey Team-

I have searched through the forums and I can find a few that are almost what I need but not exactly what I am looking for. I would like to create a table that has the list of FeatureIDs and then the corresponding frequency's of each sample. I would want it to look something like this ( **FrequencyID\_count\_table.txt** ).  
[FeatureID\_count\_table.txt](https://forum.qiime2.org/uploads/short-url/5IccwEVOKZbXqPouS8t7OlNTOyW.txt) (669 Bytes)  
I would then want a corresponding list of all those same FeatureIDs and their fasta sequences. Something that looks like this ( **FeatureID\_fasta\_seq.txt** ).  
[FeatureID\_fasta\_seq.txt](https://forum.qiime2.org/uploads/short-url/4jCraBnuJTyGvq8n6B4FDAVXsIJ.txt) (1.5 KB)  
So far I have been able to create the fasta seq file. I am attaching the file I have created ( **8\_denoise\_dada2\_seq\_visfile.qzv** ).  
[8\_denoise\_dada2\_seq\_visfile.qzv](https://forum.qiime2.org/uploads/short-url/6baTkQ0Bzn1PRW4A2DAHXiGIjzF.qzv) (508.0 KB)  
I am able to also create a FeatureID table that has frequency data for each of the FeatureIDs but not for the indvidual samples ( **FeatureID\_frequency.txt** ).  
If I classify the sequences I am able to create a Taxonomy Bar chart that has frequencys for each individual sample ( **18\_Unfiltered\_taxa\_bar\_plot.qzv** ).  
[18\_Unfiltered\_taxa\_bar\_plot.qzv](https://forum.qiime2.org/uploads/short-url/5KKMm8mANHruoh7XDJiQJX6KyIR.qzv) (615.6 KB)  
But then when I try to work backwards and match it to the FeatureID taxonomy ( **16\_Unfiltered\_ASV\_taxonomy\_visfile.qzv** ) classification there are more FeatureIDs originally listed than are in the bar chart so it does not exactly correspond.  
[16\_Unfiltered\_ASV\_taxonomy\_visfile.qzv](https://forum.qiime2.org/uploads/short-url/kn193EdKAZcALHYaooNq9npjudD.qzv) (1.4 MB)

So what I am trying to do is just create a list of the FeatureIDs and the count table for each of the sample listed.

I am currently using Qiime2 version 2024.5.

The commands I am running are:

qiime tools import --type EMPPairedEndSequences --input-path directory\_name --output-path 1\_output\_seqs.qza

qiime demux emp-paired --i-seqs 1\_output\_seqs.qza --m-barcodes-file metadata.tsv --m-barcodes-column BarcodeSequence --p-rev-comp-barcodes --p-rev-comp-mapping-barcodes --o-per-sample-sequences 2\_demux\_output\_file.qza --o-error-correction-details 3\_correction\_output\_file.qza

qiime demux summarize --i-data 2\_demux\_output\_file.qza --o-visualization 4\_demux\_output\_visfile.qzv

qiime dada2 denoise-paired --i-demultiplexed-seqs 2\_demux\_output\_file.qza --p-trim-left-f 0 --p-trim-left-r 0 --p-trunc-len-f 151 --p-trunc-len-r 151 --o-representative-sequences 5\_denoise\_dada2\_seq\_file.qza --o-table 6\_denoise\_dada2\_table.qza --o-denoising-stats 7\_denoise\_stats\_dada2\_file.qza

qiime feature-table tabulate-seqs --i-data 5\_denoise\_dada2\_seq\_file.qza --o-visualization 8\_denoise\_dada2\_seq\_visfile.qzv

qiime feature-classifier classify-sklearn --i-reads 5\_denoise\_dada2\_seq\_file.qza --i-classifier ../../../Classifier\_files/Classifiers\_Silva138.1/16S/silva-138.1-ssu-nr99-515f-806r-classifier.qza --o-classification 14\_Unfiltered\_ASV\_taxonomy.qza

qiime metadata tabulate --m-input-file 14\_Unfiltered\_ASV\_taxonomy.qza --o-visualization 16\_Unfiltered\_ASV\_taxonomy\_visfile.qzv

qiime taxa barplot --i-table 6\_denoise\_dada2\_table.qza --i-taxonomy 14\_Unfiltered\_ASV\_taxonomy.qza --m-metadata-file metadata.tsv --o-visualization 18\_Unfiltered\_taxa\_bar\_plot.qzv

I am guessing this is an easy command that I am missing. Any advice would be super helpful. Thanks!

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [August 14, 2024, 6:21pm UTC](https://forum.qiime2.org/t/create-a-featureid-table-with-count-frequency-data-for-each-sample/31141/2 "2024-08-14T18:21:09Z")

</div>

Hi @hdoris,

You can try the approach of this post:

> [@How to build an OTU table](https://forum.qiime2.org/t/how-to-build-an-otu-table/26900/2):
>
> Hi @neocat, This is intended. If you work through the tutorials again, you'll notice that the feature-table (i.e. the counts table) is kept as a separate file from the taxonomy. I suggest reading through the qiime2 [overview](https://docs.qiime2.org/2023.5/tutorials/overview/), for more details. If you'd like to take a quick look at an old-style QIIME 1 like table, you can run the following commands: qiime feature-table transpose \ --i-table table.qza \ --o-transposed-feature-table table-transposed.qza qiime metadata tabulate \ -…

Then simply add `--m-imput-files 5_denoise_dada2_seq_file.qza` to that command.

This should give you a tab delimited feature table with the feature ID, taxonomy, and sequence. Then you can tabulate (make a QZV) and then click on the export button. Which will provide a text file that you can open in a spread sheet.

Is this what you are looking for?

-Mike

---

<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: [September 15, 2024, 12:21am UTC](https://forum.qiime2.org/t/create-a-featureid-table-with-count-frequency-data-for-each-sample/31141/3 "2024-09-15T00:21:20Z")

</div>

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