rarefy table with/without replacement default

Hi,

I am using the qiime2-2020.8 conda version and I have used the “qiime feature-table rarefy” plug-in to rarefy an ASV table:
qiime feature-table rarefy --i-table table3.qza --p-sampling-depth 5000 --o-rarefied-table table3-raref.qza

In the qiime2 docs I have read the following information about the rarefy plug-in (rarefy: Rarefy table — QIIME 2 2021.2.0 documentation):
--p-with-replacement / --p-no-with-replacement
Rarefy with replacement by sampling from the
multinomial distribution instead of rarefying without
replacement. [default: False]

I was wondering what is the meaning of default: False. Does it mean that rarefaction is conducted with replacement by default?

I would like to confirm this idea since my rarefied table has a minimum depth of 5,000 reads but not every sample has the same depth (as expected using rarefaction without replacement, I assume).

Cheers,
Pablo

1 Like

Hi @Pablo_V!

This means that the default is --p-no-with-replacement, which means that by default, no replacement is performed during the rarefy command. I pulled the relevant source code up here, in case you’re interested:

I do think this presentation of boolean parameters is a little bit confusing, especially with this parameters, I filed an issue here: Alternative boolean representation · Issue #257 · qiime2/q2cli · GitHub

:qiime2:

2 Likes

Hi @thermokarst,

Thank you for your reply.

So if the default of the rarefy plug-in is to rarefy without replacement, how come I have obtained a table with each sample having a different total sum of ASVs but all larger than 5,000? It seems to me that the table was rarefied with replacement, right? Is it possible that the Qiime2 version I used had a different default parameter?

In any case, I just want to confirm that the table I have was rarefied with replacement. Is that correct?

Cheers,
Pablo

Hi @Pablo_V, sorry for the slow response here.

I’m not sure - but we would need to see the commands run in order to comment more on it. Perhaps there was a typo in your command?

The default has not changed, since the parameter was introduced, so I don’t think that is it.

No, not if the command you ran is the same one that you shared above:

See there, you did not specify the parameter, so the default is used: --p-no-with-replacement.

I hope that helps!

:qiime2:

1 Like