Random sampling after DADA2

Hi!

This is my first time posting here.

I have completed the DADA2 processing of my sequencing data and generated a feature table. I want to perform random sampling to rarefy my samples to a depth of 10,000 reads each.

Could someone please confirm if I should use the rarefy command for this purpose?

Best regards,

Hi @sub3134 and welcome to the :qiime2: Forum!

If you are only interested in rarefying your samples to frequency n, qiime feature-table rarefy is what you are looking for.

But if you plan to perform diversity analyses within QIIME 2, maybe you find useful that core-metrics and core-metrics-phylogenetic already perform rarefaction prior to computing diversity metrics (option --p-sampling-depth). You will also obtain the rarefied table as one of the output files (--o-rarefied-table).¹

Best,

Sergio

--

¹ Edit 09/26: The q2-boots plugin is also a (new) good option. It is in beta release. See here for more info.

4 Likes

Thanks!

Could you please let me know if a command like the following would be appropriate?

qiime feature-table rarefy \
  --i-table table.qza \
  --p-sampling-depth 10000 \
  --o-rarefied-table rarefied-table.qza

Best regards

1 Like

Yes! That should work.

Remember that when you rarefy to frequency n, samples with frequency less than n will be ruled out.

Best,

Sergio

3 Likes