# Passing multiple reference factors in Maaslin2 version 1.16.0

**URL:** <https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035>\
**Category:** MaAsLin\
**Created:** [May 13, 2024, 12:07am UTC](https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035 "2024-05-13T00:07:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![renu\_pal](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@renu\_pal](https://forum.biobakery.org/u/renu_pal)\
**Post date:** [May 13, 2024, 12:07am UTC](https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035/1 "2024-05-13T00:07:05Z")

</div>

During the version update of Maaslin2 to 1.16.0 for Galaxy platform, I tried passing two reference factors ( for site and diagnosis) separated by a semi-colon (as mentioned in the tutorials) for a test case where no fixed\_effects were provided ( default : ALL). But I keep on getting the following error.

```auto
Job in error state.. tool_id: maaslin2, exit_code: 1, stderr: Error in relevel.factor(metadata[, i], ref = ref) : 
  'ref' must be an existing level
Calls: Maaslin2 -> relevel -> relevel.factor
Execution halted

```

If I just give reference for site, it gives error asking for reference of diagnosis factor. Please let me know how I can resolve this issue. Also, is there a way to just skip/disable reference altogether, I mean if the user does not give any reference then instead of throwing an error , it should just accept default alphabetical order as was the case in previous versions. But unfortunately it seems that it is mandatory to pass a reference. Would love any suggestion on this.

Please find attached the metadata and feature file I am testing on .  
[HMP2\_taxonomy.tsv](https://forum.biobakery.org/uploads/short-url/1Y24xRs3M7tE7enIStxwFRqyfY3.tsv) (487.4 KB)  
[HMP2\_metadata.tsv](https://forum.biobakery.org/uploads/short-url/70WJSBkUoQRtWsA6sQkuHvUDDlc.tsv) (106.3 KB)

---

<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:** [May 29, 2024, 8:51pm UTC](https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035/2 "2024-05-29T20:51:14Z")

</div>

Hi there,

Sorry for the delay. In galaxy all reference fields should be operated by a comma. So in this case if you wanted to include site you would input:

```auto
diagnosis,nonIBD,site,Emory

```

Sorry for the confusion.

Thanks,  
Jacob Nearing

---

<div class="post-metadata">

**Author:** ![renu\_pal](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@renu\_pal](https://forum.biobakery.org/u/renu_pal)\
**Post date:** [May 30, 2024, 9:22pm UTC](https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035/3 "2024-05-30T21:22:11Z")

</div>

Thanks for the reply @nearinj . I also wanted to know whether reference is optional or not?

---

<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:** [May 30, 2024, 9:41pm UTC](https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035/4 "2024-05-30T21:41:20Z")

</div>

References are required for categorical variables that have more then 2 levels.

Thanks,  
Jacob Nearing

---

<div class="post-metadata">

**Author:** ![renu\_pal](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@renu\_pal](https://forum.biobakery.org/u/renu_pal)\
**Post date:** [May 30, 2024, 9:59pm UTC](https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035/5 "2024-05-30T21:59:18Z")

</div>

So does that mean that default value ,i.e, NA (as mentioned in tutorials ) applies only to categorical variables with less than 2 levels.

---

<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:** [May 31, 2024, 8:00pm UTC](https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035/6 "2024-05-31T20:00:42Z")

</div>

Hi @renu_pal,

Thanks for pointing this out. That instruction was left over from a previous version of MaAsLin2. In the current available version you must specify a reference if the variable has more than 2 levels.

thanks,  
Jacob Nearing

---

<div class="post-metadata">

**Author:** ![renu\_pal](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@renu\_pal](https://forum.biobakery.org/u/renu_pal)\
**Post date:** [May 31, 2024, 10:20pm UTC](https://forum.biobakery.org/t/passing-multiple-reference-factors-in-maaslin2-version-1-16-0/7035/7 "2024-05-31T22:20:40Z")

</div>

Thanks for clearing everything @nearinj
