# Optimal --p-n parameter for demux summarize

**URL:** <https://forum.qiime2.org/t/optimal-p-n-parameter-for-demux-summarize/21076>\
**Category:** User Support\
**Tags:** demux, summarize\
**Created:** [October 15, 2021, 4:23pm UTC](https://forum.qiime2.org/t/optimal-p-n-parameter-for-demux-summarize/21076 "2021-10-15T16:23:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaehyun.kim](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jaehyun.kim/32/14060_2.png) [@jaehyun.kim](https://forum.qiime2.org/u/jaehyun.kim)\
**Post date:** [October 15, 2021, 4:23pm UTC](https://forum.qiime2.org/t/optimal-p-n-parameter-for-demux-summarize/21076/1 "2021-10-15T16:23:41Z")

</div>

Hi all,

I wonder if there's an optimal --p-n parameter value for demux summarize.  
According to the document, the default value is 10000.  
(--p-n parameter description: The number of sequences that should be selected at random for quality score plots)

I wonder why the default value is a fixed number rather than proportional to the number of sequences.  
If the total number of sequences is 100000, then the default value 10000 is about 10% of the total sequences.  
However, what if the total number of sequences is 1000000? Then, the default value 10000 is only about 1%.  
I'd appreciate it if you could let me know the optimal proportion for --p-n parameter.

Sincerely,

---

<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:** [October 15, 2021, 9:27pm UTC](https://forum.qiime2.org/t/optimal-p-n-parameter-for-demux-summarize/21076/2 "2021-10-15T21:27:31Z")

</div>

Good question!

This choice is a trade off between faster summary, and a more complete summary. If you pass a number larger than the reads in your largest sample, you get this message:

> A subsample value was provided that is greater than the amount of sequences across all samples for the %s reads. The plot was generated using all available sequences.

> [@jaehyun.kim](#):
>
> the optimal proportion for --p-n parameter

If you want to use all your data to make these summaries, you could!  
(But would be somewhat slower, and give you statistically comparable results to using a random sampling.)  
You get to choose what is 'optimal' for you! 😺

---

<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:** [November 16, 2021, 3:27am UTC](https://forum.qiime2.org/t/optimal-p-n-parameter-for-demux-summarize/21076/3 "2021-11-16T03:27:32Z")

</div>

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