# subsample, but not randomly subsample

**URL:** https://forum.qiime2.org/t/subsample-but-not-randomly-subsample/9489
**Category:** User Support
**Created:** [May 2, 2019, 3:36pm UTC](https://forum.qiime2.org/t/subsample-but-not-randomly-subsample/9489 "2019-05-02T15:36:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nmgduan](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nmgduan/32/5560_2.png) [@nmgduan](https://forum.qiime2.org/u/nmgduan)
#### Post date: [May 2, 2019, 3:36pm UTC](https://forum.qiime2.org/t/subsample-but-not-randomly-subsample/9489/1 "2019-05-02T15:36:06Z")

</div>

Dear developers,

I have two reactors labelled as A and B, and each was conducted in triplicate labelled α, β and γ, and sampled at three time points labelled as 1, 2 and 3. So I have 18 paired-end sequence data, A\_α\_1, A\_β\_1, A\_γ\_1 and so on, and the average amounts of reads in one sequence data are 50,000.

I want to compare the microbial composition between A\_1 and B\_1 by edgeR. So I imported the sequences A\_α\_1, A\_β\_1, A\_γ\_1 into A\_1.qza and imported the sequences B\_α\_1, B\_β\_1, B\_γ\_1 into B\_1.qza. And then the two .qza files were denoised by DADA2, so I got two `FeatureData[Sequence]` and two `FeatureTable[Frequency]` and the used these file to make comparison.

Nevertheless, the parameter `--p-n-reads-learn` in DADA2 shows higher and more reliable error model. So would it be better to import all 18 sequences data into one .qza file?

If so, how to subsample the `FeatureData[Sequence]` and `FeatureTable[Frequency]` of A\_1 and B\_1 to only make the comparison between A\_1 and B\_1?  
The `qiime feature-table subsample` would randomly pick samples.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [May 2, 2019, 6:17pm UTC](https://forum.qiime2.org/t/subsample-but-not-randomly-subsample/9489/2 "2019-05-02T18:17:56Z")

</div>

Hello @nmgduan,

Thanks for posting again on the Qiime 2 forums!

> So would it be better to import all 18 sequences data into one .qza file?

Yes! Importing all 18 samples into a single .qza file is the recommended way to do this.

> The `qiime feature-table subsample` would randomly pick samples.

❔ No... that command would randomly pick reads from samples.

* * *

I think some of these questions might be answered in the [tutorials](https://docs.qiime2.org/2019.1/tutorials/moving-pictures/). These tutorials would also help with words. For example, you mentioned "So I have 18 paired-end sequence data" and I would say "I have 18 samples." But I still knew what you meant 🙂

Colin

---

<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: [June 3, 2019, 12:17am UTC](https://forum.qiime2.org/t/subsample-but-not-randomly-subsample/9489/3 "2019-06-03T00:17:56Z")

</div>

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