# Two many ASV in my dataset

**URL:** <https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957>\
**Category:** User Support\
**Tags:** dada2, feature-table\
**Created:** [August 23, 2022, 7:21am UTC](https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957 "2022-08-23T07:21:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuZhang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yuzhang/32/11537_2.png) [@YuZhang](https://forum.qiime2.org/u/YuZhang)\
**Post date:** [August 23, 2022, 7:21am UTC](https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957/1 "2022-08-23T07:21:18Z")

</div>

Dear all,  
After processing the data with DADA2, I found that the number of sequences in the sample was 3W-40W

 ![f80f56d1334574bcae3ce1b2852f225](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/2/24a3521e3c7fdf3ecd9a08579adffe5f907c8c1f.jpeg)  
 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/a/a38330b2de4d35975101d7f574369f2a77372669.png)  
**But the sequencing company said it was normal.**  
Then I filter the dataset by bacteria

```auto
qiime taxa filter-table \
--i-table ../table-dada2-3.qza \
--i-taxonomy ../taxonomy-3.qza \
--p-include d__Bacteria \
--o-filtered-table Bacteria-dada2-table.qza \

# filter sequence
qiime taxa filter-seqs \
  --i-sequences ../rep-seq-dada2-3.qza \
  --i-taxonomy ../taxonomy-3.qza \
  --p-include d__Bacteria \
  --o-filtered-sequences Bacteria-sequences.qza \

qiime feature-table summarize \
  --i-table Bacteria-dada2-table.qza \
  --o-visualization Bacteria-dada2-table.qzv \
  --m-sample-metadata-file ../metadata_qiime2.txt

```

**Bacteria-dada2-table.qzv**  
**Results:**

 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/8/8a82c701bb0579d13cd5d18eca2afdfecb4524cb.png)  
 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/d/d3fa6d4f93f9d7536e97fef9284626136e1a4b6d.png)

Align to tree

```auto
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences Bacteria-sequences.qza \
--p-n-threads auto \
--o-alignment aligned-Bacteria-rep-seqs.qza \
--o-masked-alignment masked-aligned-Bacteria-rep-seqs.qza \
--o-tree Bacteria-unrooted-tree.qza \
--o-rooted-tree Bacteria-rooted-tree.qza

```

 ![d51d591cf24f4d442fdf9eed605e35e](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/9/9c37c62f2c3e5731c3c50a3cc603a0e9b33f8aa7.jpeg)  
According to the search, this error may be due to too many ASVs.

**So, what do I need to do with my data after DADA2?**  
**Rarefaction or filter out the lower frequence before rarefaction to reduce the ASV number?**

---

<div class="post-metadata">

**Author:** ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)\
**Post date:** [August 23, 2022, 7:28am UTC](https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957/2 "2022-08-23T07:28:56Z")

</div>

Filtering out features with low overall counts sounds like a good idea to reduce memory requirements for the job.  
So, you can filter features with counts less than a certain threshold (50,100 or other numbers), filter sequences based on filtered feature table and then align sequences. In my experience it will decrease memory requirements and speed up the process.

---

<div class="post-metadata">

**Author:** ![YuZhang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yuzhang/32/11537_2.png) [@YuZhang](https://forum.qiime2.org/u/YuZhang)\
**Post date:** [August 23, 2022, 7:31am UTC](https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957/4 "2022-08-23T07:31:11Z")

</div>

Do I need rarefaction after filtering？

---

<div class="post-metadata">

**Author:** ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)\
**Post date:** [August 23, 2022, 7:32am UTC](https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957/5 "2022-08-23T07:32:36Z")

</div>

Not necessarily. For core-metrics, one need to rarefy the data, but it is already implemented in the plugin. You don't need to rarefy for other plugins unless it is specified in the plugin options.

---

<div class="post-metadata">

**Author:** ![YuZhang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yuzhang/32/11537_2.png) [@YuZhang](https://forum.qiime2.org/u/YuZhang)\
**Post date:** [August 23, 2022, 7:37am UTC](https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957/6 "2022-08-23T07:37:29Z")

</div>

How do I determine the filter criteria?

 ![1661240143121](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/b/b1f2c898e519ec8a2a8acf1a73c972ef29108626.png)  
According this figure？My goal is to study bacteria. Do I need to filter the data into bacteria and then filter out the low quality?

---

<div class="post-metadata">

**Author:** ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)\
**Post date:** [August 23, 2022, 7:41am UTC](https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957/7 "2022-08-23T07:41:05Z")

</div>

I would do it in that order.  
Usually for bacteria I filter out all features with absolute counts less than 50, but you also can filter based on relative abundances (like less than 1%, 0.1%) and prevalence.

---

<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 23, 2022, 1:41pm UTC](https://forum.qiime2.org/t/two-many-asv-in-my-dataset/23957/8 "2022-09-23T13:41:06Z")

</div>

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