# Cluster.split taxlevel

**URL:** <https://forum.mothur.org/t/cluster-split-taxlevel/22297>\
**Category:** Commands in mothur\
**Created:** [February 17, 2025, 10:10am UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297 "2025-02-17T10:10:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dporco](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@dporco](https://forum.mothur.org/u/dporco)\
**Post date:** [February 17, 2025, 10:10am UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/1 "2025-02-17T10:10:40Z")

</div>

Hello  
I don’t understand how taxonomy level (taxlevel option) is used to split distances file in the cluster.split command. Could somebody please explain it or send me somewhere I could get the explanation ?  
I made a small go at looking what happen when I change taxlevel from 6 to 7 with a small dataset using a species-level well curated database. The results I get is few more hits (reads iDed) for taxlevel=6 that I don’t get into the taxlevel=7, and much less the other way around (ie hits that I get in taxlevel=7 and that I don’t with taxlevel=6). I would have expected taxlevel=7 to perform better here.  
Thanks for your help!  
David

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 17, 2025, 3:26pm UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/2 "2025-02-17T15:26:19Z")

</div>

Hi David,

It takes your taxonomy strings and sends sequences to different groups based on the level with the levels separated by semi-colons. You would need each level to be represented for all of the sequences to get it to perform correctly. Do you have a minimum reproducible example that you could post that shows what you’re seeing? I could take a look at it and let you know what I see…

Pat

---

<div class="post-metadata">

**Author:** ![dporco](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@dporco](https://forum.mothur.org/u/dporco)\
**Post date:** [February 18, 2025, 9:56am UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/3 "2025-02-18T09:56:58Z")

</div>

Hi Pat  
Thanks for your answer. So it first groups seqs according to the taxlevel option, and then makes clusters at the chosen cutoff into each of these ?

Here is the shape of my ref library, all levels are populated - in fact I take a wider dataset and I go for a small taxonomic part with a custom library.  
MNHNL145207 Eukaryota;Annelida\_6340;Clitellata\_42113;Haplotaxida\_6382;Lumbricidae\_6392;Aporrectodea;A\_caliginosa\_L2;  
MNHNL146587 Eukaryota;Annelida\_6340;Clitellata\_42113;Haplotaxida\_6382;Lumbricidae\_6392;Aporrectodea;A\_caliginosa\_L3;  
MNHNL146567

Here are the command lines I use to get there (maybe the issue originates from here)

classify.seqs(fasta=mergedfastaunique, count=mergedfastacount\_table, cutoff=90, reference=lumbref.fas, taxonomy=lumb5.txt)

cluster.split(fasta=current, count=current, taxonomy=current, taxlevel=6, cutoff=0.03, runsensspec=f, processors=32)

make.shared(list=current, count=current, label=0.03)

classify.otu(list=current, count=current, taxonomy=current, label=0.03)

merge.otus(constaxonomy=current, list=current)

Here is the a table of the few discrepancies I get between the two taxlevel (bottom rows are just different with count):

| taxlevel=6 | | | | | taxlevel=7 | | | | |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| sample\_id | otu | count | genus | taxon | sample\_id | otu | count | genus | taxon |
| | | | | | HS\_D\_M\_9\_6 | Otu050790 | 1 | Lumbricus | L\_rubellus\_L2 |
| HS\_Esc\_M\_10\_4 | Otu002940 | 19 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| HS\_H\_M\_10\_4 | Otu013040 | 1 | Aporrectodea | A\_caliginosa\_L2 | | | | | |
| | | | | | HS\_H\_M\_6\_14 | Otu050790 | 1 | Lumbricus | L\_rubellus\_L2 |
| HS\_H\_M\_7\_26 | Otu002940 | 2 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| HS\_W\_M\_7\_12 | Otu053147 | 1 | Octolasion | Octolasion\_sp.\_BIOUG32056\_A02\_2474609 | | | | | |
| M\_BE\_M\_5\_3 | Otu072321 | 2 | Aporrectodea | A\_icterica | | | | | |
| M\_BI\_M\_10\_4 | Otu002940 | 86 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| M\_BI\_M\_6\_28 | Otu002940 | 1 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| M\_BI\_M\_8\_24 | Otu013040 | 1 | Aporrectodea | A\_caliginosa\_L2 | | | | | |
| M\_E\_M\_7\_26 | Otu002940 | 1 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| M\_H\_M\_6\_14 | Otu013040 | 3 | Aporrectodea | A\_caliginosa\_L2 | | | | | |
| M\_H\_M\_6\_28 | Otu002940 | 1 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| M\_H\_M\_9\_20 | Otu020357 | 1 | Aporrectodea | Aporrectodea\_unclassified | | | | | |
| M\_HER\_M\_5\_3 | Otu002940 | 1 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| O\_A\_M\_10\_4 | Otu020357 | 1 | Aporrectodea | Aporrectodea\_unclassified | | | | | |
| O\_A\_M\_6\_28 | Otu053147 | 1 | Octolasion | Octolasion\_sp.\_BIOUG32056\_A02\_2474609 | | | | | |
| O\_G\_M\_6\_14 | Otu002940 | 1 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| O\_HAM\_M\_5\_17 | Otu002940 | 1 | Lumbricus | L\_rubellus\_LP1 | | | | | |
| | | | | | O\_HAM\_M\_9\_6 | Otu050790 | 1 | Lumbricus | L\_rubellus\_L2 |
| | | | | | O\_HE\_M\_7\_12 | Otu014656 | 1 | Aporrectodea | A\_caliginosa\_L2 |
| O\_HE\_M\_9\_20 | Otu020357 | 1 | Aporrectodea | Aporrectodea\_unclassified | | | | | |
| O\_HO\_M\_5\_3 | Otu020357 | 2 | Aporrectodea | Aporrectodea\_unclassified | | | | | |
| O\_HO\_M\_7\_26 | Otu021795 | 1 | Dendrobaena | Dendrobaena\_unclassified | | | | | |
| O\_HU\_M\_6\_14 | Otu053316 | 4 | Lumbricus | L\_rubellus\_L2 | | | | | |
| O\_V\_M\_8\_23 | Otu021795 | 1 | Dendrobaena | Dendrobaena\_unclassified | | | | | |
| O\_V\_M\_8\_9 | Otu020357 | 1 | Aporrectodea | Aporrectodea\_unclassified | | | | | |
| O\_V\_M\_8\_9 | Otu021795 | 1 | Dendrobaena | Dendrobaena\_unclassified | | | | | |
| M\_H\_M\_7\_26 | Otu002940 | 30 | Lumbricus | L\_rubellus\_LP1 | M\_H\_M\_7\_26 | Otu003061 | 28 | Lumbricus | L\_rubellus\_LP1 |
| M\_HER\_M\_9\_20 | Otu020357 | 10 | Aporrectodea | Aporrectodea\_unclassified | M\_HER\_M\_9\_20 | Otu023121 | 8 | Aporrectodea | Aporrectodea\_unclassified |
| O\_G\_M\_8\_9 | Otu013040 | 25 | Aporrectodea | A\_caliginosa\_L2 | O\_G\_M\_8\_9 | Otu014656 | 21 | Aporrectodea | A\_caliginosa\_L2 |
| O\_HAC\_M\_5\_3 | Otu013040 | 9 | Aporrectodea | A\_caliginosa\_L2 | O\_HAC\_M\_5\_3 | Otu014656 | 4 | Aporrectodea | A\_caliginosa\_L2 |
| O\_HAU\_M\_8\_9 | Otu002940 | 24 | Lumbricus | L\_rubellus\_LP1 | O\_HAU\_M\_8\_9 | Otu003061 | 21 | Lumbricus | L\_rubellus\_LP1 |
| O\_HAU\_M\_9\_20 | Otu013040 | 8 | Aporrectodea | A\_caliginosa\_L2 | O\_HAU\_M\_9\_20 | Otu014656 | 7 | Aporrectodea | A\_caliginosa\_L2 |
| O\_HE\_M\_6\_14 | Otu002940 | 40 | Lumbricus | L\_rubellus\_LP1 | O\_HE\_M\_6\_14 | Otu003061 | 38 | Lumbricus | L\_rubellus\_LP1 |

David

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 18, 2025, 8:58pm UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/4 "2025-02-18T20:58:05Z")

</div>

It looks like these are consensus taxonomies for each OTU. `cluster.split` uses the output from `classify.seqs` not the consensus taxonomies. I wonder if this is part of the problem.

Pat

---

<div class="post-metadata">

**Author:** ![dporco](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@dporco](https://forum.mothur.org/u/dporco)\
**Post date:** [February 20, 2025, 10:43am UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/5 "2025-02-20T10:43:40Z")

</div>

Hi Pat

I ran analyses with taxlevel 6 and 7 comparing results when using concensus taxonomy ouputs from classify.otu and merge.otus. For both taxlevels, ouput from classify.otu performs way better with a lot more hits (ie species occurences in sites). So indeed there was a concensus taxonomy issue, when using merge.otus. Why do I loose that much hits merging OTUs with the same taxonomy ? Did I make a mistake when I used it ?

Thanks for your help  
David

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 20, 2025, 1:59pm UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/6 "2025-02-20T13:59:51Z")

</div>

To be honest, you might be the first person to ever use merge.otus and I’m not really sure what it does 🙃

Please use cluster.split as described in the MiSeq SOP. That is how we intend it to be used.

Pat

---

<div class="post-metadata">

**Author:** ![dporco](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@dporco](https://forum.mothur.org/u/dporco)\
**Post date:** [February 21, 2025, 8:34am UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/7 "2025-02-21T08:34:44Z")

</div>

ok 🙂, it is supposed to “combine OTUs based on taxonomic assignment.” I see Sarah Westcott implemented it, I’ll try to contact her. I probably used it badly.  
My goal was, for big datasets, to reduce the size of the file stitching the shared and taxonomy files for downstream analyses. It allowed to run them on a regular machine instead of a server with lots of ram.

One last question on the taxlevel thing (doing it according to the SOP, no merging): comparing concensus taxonomy from taxlevel 6 and 7, level 7 performs mostly better but in a few cases I have matches in level 6 that I don’t in 7. Any idea why ?

Thanks  
David

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 21, 2025, 2:19pm UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/8 "2025-02-21T14:19:10Z")

</div>

What do you mean by performs “mostly better”? If you still have questions about the algorithm, I’d encourage you to check out the papers describing the method and its performance:

[https://journals.asm.org/doi/10.1128/mspheredirect.00073-17](https://journals.asm.org/doi/10.1128/mspheredirect.00073-17)  
[https://journals.asm.org/doi/10.1128/aem.02810-10](https://journals.asm.org/doi/10.1128/aem.02810-10)

If you want to combine OTUs by taxonomy, then you’d be better off using the phylotype command to create phylotype-based OTUs. There wouldn’t be any need to go through the de novo OTU generation process.

Pat

---

<div class="post-metadata">

**Author:** ![dporco](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@dporco](https://forum.mothur.org/u/dporco)\
**Post date:** [February 24, 2025, 10:23am UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/9 "2025-02-24T10:23:44Z")

</div>

I meant that I generally obtain more OTUs matches among sites with taxlevel=7 than with 6. But, in a few cases, I obtain matches in 6 that I don’t get in 7 which I find puzzling .  
Thanks for the papers and also the phylotype advice, I’ll give it a go.  
David

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/system/32/2_2.png) [@system](https://forum.mothur.org/u/system)\
**Post date:** [March 6, 2025, 10:23am UTC](https://forum.mothur.org/t/cluster-split-taxlevel/22297/10 "2025-03-06T10:23:51Z")

</div>

Closed on March 6, 2025, 10:23am UTC

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