# Maaslin2 error in min(x\[x \> 0\])/2

**URL:** <https://forum.biobakery.org/t/maaslin2-error-in-min-x-x-0-2/5552>\
**Category:** MaAsLin\
**Created:** [June 27, 2023, 6:16pm UTC](https://forum.biobakery.org/t/maaslin2-error-in-min-x-x-0-2/5552 "2023-06-27T18:16:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsidhu](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@gsidhu](https://forum.biobakery.org/u/gsidhu)\
**Post date:** [June 27, 2023, 6:16pm UTC](https://forum.biobakery.org/t/maaslin2-error-in-min-x-x-0-2/5552/1 "2023-06-27T18:16:18Z")

</div>

I am trying to analyze humann3 out pathabundance.tsv (this file was generated by joining 12 tables, not-normalized). I have 12 samples assigned to two phenotypes - resitant and suscpetible. I want to determine which pathways are more abundant in each phenotype.

fit\_data = Maaslin2(input\_data = input\_data1,

- 

```
                input_metadata = input_metadata, 

```

- 

```
                min_prevalence = 0,

```

- 

```
                normalization = "NONE",

```

- 

```
                output = "demo_output", 

```

- 

```
                fixed_effects = c("Phenotype"),

```

- 

```
                reference = c("Phenotype"))

```

[1] “Warning: Deleting existing log file: demo\_output/maaslin2.log”  
2023-06-27 13:56:08.499039 INFO::Writing function arguments to log file  
2023-06-27 13:56:08.523632 INFO::Verifying options selected are valid  
2023-06-27 13:56:08.526767 INFO::Determining format of input files  
2023-06-27 13:56:08.52901 INFO::Input format is data samples as rows and metadata samples as rows  
2023-06-27 13:56:08.562235 INFO::Formula for fixed effects: expr ~ Phenotype  
2023-06-27 13:56:08.564818 INFO::Filter data based on min abundance and min prevalence  
2023-06-27 13:56:08.56735 INFO::Total samples in data: 12  
2023-06-27 13:56:08.569697 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000  
2023-06-27 13:56:08.624171 INFO::Total filtered features: 0  
2023-06-27 13:56:08.626819 INFO::Filtered feature names from abundance and prevalence filtering:  
2023-06-27 13:56:08.694874 INFO::Total filtered features with variance filtering: 0  
2023-06-27 13:56:08.697451 INFO::Filtered feature names from variance filtering:  
2023-06-27 13:56:08.699565 INFO::Running selected normalization method: NONE  
2023-06-27 13:56:08.702124 INFO::Applying z-score to standardize continuous metadata  
2023-06-27 13:56:08.715661 INFO::Running selected transform method: LOG  
Error in min(x[x \> 0])/2 : non-numeric argument to binary operator

I would appreciate if you could help me troubleshoot this.

Thanks

Gurjit

---

<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 28, 2023, 10:02pm UTC](https://forum.biobakery.org/t/maaslin2-error-in-min-x-x-0-2/5552/2 "2023-06-28T22:02:36Z")

</div>

Hi @gsidhu ,

It looks like you are not specifying the reference group right for your fixed effect “Phenotype”. I would suggest taking a look at how to do this in the user manual:

> **[GitHub - biobakery/Maaslin2: MaAsLin2: Microbiome Multivariate Association...](https://github.com/biobakery/Maaslin2)**
>
> MaAsLin2: Microbiome Multivariate Association with Linear Models - GitHub - biobakery/Maaslin2: MaAsLin2: Microbiome Multivariate Association with Linear Models

Cheers,  
Jacob
