# Question regarding how min\_prevalence and min\_abundance work in Maaslin2

**URL:** <https://forum.biobakery.org/t/question-regarding-how-min-prevalence-and-min-abundance-work-in-maaslin2/7160>\
**Category:** MaAsLin\
**Created:** [June 14, 2024, 12:56pm UTC](https://forum.biobakery.org/t/question-regarding-how-min-prevalence-and-min-abundance-work-in-maaslin2/7160 "2024-06-14T12:56:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamardigrade](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/tamardigrade/32/2891_2.png) [@tamardigrade](https://forum.biobakery.org/u/tamardigrade)\
**Post date:** [June 14, 2024, 12:56pm UTC](https://forum.biobakery.org/t/question-regarding-how-min-prevalence-and-min-abundance-work-in-maaslin2/7160/1 "2024-06-14T12:56:09Z")

</div>

Hi,

I had some questions about min\_abundance and min\_prevalence filtering before I run Maaslin2 (in R) on my data set.

I will give some details about my dataset first: I am planning on using relative abundance values for genera, calculated from normalized read counts, as opposed to using the read counts themselves, for my ‘input\_data’.

Here is the code chunk:

Hrare\_noFL\_fit = Maaslin2(input\_data = genus\_rel\_abundH.rarefied\_noFL\_4maaslin,  
input\_metadata = H.rarefied\_noFL\_sampledata,  
analysis\_method = “CPLM”,  
normalization = “NONE”,  
output = “Hrare\_noFL\_fit\_output”,  
fixed\_effects = “Loc”,  
reference = c(“Loc,CA”))

1. If one feature (in my case, genus) is below the min\_abundance level in one sample, is that feature excluded for all other samples where it otherwise does exceed the min\_abundance level?

2. “If both min\_prevalence and min\_abundance are specified in the Maaslin2 function, would a feature be excluded, for all other samples, if it does not meet: (i) both the min\_prevalence and min\_abundance levels, or (ii) either the min\_prevalence or min\_abundance levels?”

Thanks and please let me know if you need any more info,  
Tammy 🙂

---

<div class="post-metadata">

**Author:** ![tamardigrade](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/tamardigrade/32/2891_2.png) [@tamardigrade](https://forum.biobakery.org/u/tamardigrade)\
**Post date:** [June 14, 2024, 6:00pm UTC](https://forum.biobakery.org/t/question-regarding-how-min-prevalence-and-min-abundance-work-in-maaslin2/7160/2 "2024-06-14T18:00:43Z")

</div>

An additional question: If I am using relative abundance for my input data, does Maaslin expect the values to be in percentage form (10, as in 10%) or in a fractional form (0.1, as in 10/100=0.1)?

---

<div class="post-metadata">

**Author:** ![nearinj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/nearinj/32/2135_2.png) [@nearinj](https://forum.biobakery.org/u/nearinj)\
**Post date:** [June 24, 2024, 8:04pm UTC](https://forum.biobakery.org/t/question-regarding-how-min-prevalence-and-min-abundance-work-in-maaslin2/7160/3 "2024-06-24T20:04:06Z")

</div>

Hello @tamardigrade

The `min_abundance` filter drops bugs that don’t have enough samples above the specified value in the unnormalized input data.

The min abundance and min prevalence checks occur before normalization so it will use whatever type of data you use as the input.

Thanks,  
Jacob Nearing
