# mafft or fragment-insertion

**URL:** https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474
**Category:** Technical Support
**Created:** [November 16, 2020, 8:18pm UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474 "2020-11-16T20:18:25Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)
#### Post date: [November 16, 2020, 8:18pm UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474/1 "2020-11-16T20:18:25Z")

</div>

Hi all  
I read [Phylogeny tutorial](https://forum.qiime2.org/t/q2-phylogeny-community-tutorial/4455) but I didn't understand when its better to use mafft and when use fragment-insertion. its written there that fragment-insertion is good "if your reference phylogeny encompass neighboring relatives of which your sequences can be reliably inserted. Any sequences that do not match well enough to the reference are not inserted."  
so how can I know that?  
because I want to use diversity metrics and its needed to import phylogeny tree but I'm not sure which one is better for me while the results are different.  
Thank you

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [November 16, 2020, 8:54pm UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474/2 "2020-11-16T20:54:35Z")

</div>

Hi @mohsen_ej, it depends.

> [@mohsen\_ej](#):
>
> its written there that fragment-insertion is good “if your reference phylogeny encompass neighboring relatives of which your sequences can be reliably inserted. Any sequences that do not match well enough to the reference are not inserted.”  
> so how can I know that?

You'll simply need to read up, or investigate the contents of the files, to see what these reference files contain. There are two commonly used [reference sets](https://docs.qiime2.org/2020.8/data-resources/#sepp-reference-databases) for fragment-insertion (SEPP): GreenGenes & SILVA. SILVA is a much larger reference set and contains many more reference sequences, particularly ideal for environmental data sets. Whereas either of these reference files appear to do well for humans.

Generally speaking, many consider fragment-insertion to be ideal, as you are inserting your short sequence fragments into a curated reference phylogeny that is based on full length rRNA sequences. Whereas constructing a _de novo_ phylogeny from short reads can create some potential problems, depending on the gene and phylogeny tool you use. For more information on why that is, read the fragment insertion paper linked that [phylogeny tutorial](https://docs.qiime2.org/2020.8/tutorials/phylogeny/).

> [@mohsen\_ej](#):
>
> but I’m not sure which one is better for me while the results are different

I typically run both _de novo_ and fragment insertion approaches on my data. Sometimes they are quite different, other times they are not. I try to stick with fragment-insertion when possible (fragment insertion can require more resources to run). Otherwise, I often use IQ-TREE for _de novo_ phylogenetic reconstruction. But your mileage may vary. 🚙

But if you are using full-length rRNA sequence data you would be fine to use a _de novo_ approach.

-Mike

---

<div class="post-metadata">

### Author: ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)
#### Post date: [November 16, 2020, 9:09pm UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474/3 "2020-11-16T21:09:33Z")

</div>

Thanks for your prompt reply.  
I have run both of them before, but I do not know exactly which of the two is more appropriate for my data.  
I mean, how do I know which one worked better?  
Excuse me if my question is a beginner.

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [November 16, 2020, 9:16pm UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474/4 "2020-11-16T21:16:47Z")

</div>

> [@mohsen\_ej](#):
>
> but I do not know exactly which of the two is more appropriate for my data.

There is no easy answer to this, but for _short reads_, I suggested:

> [@SoilRotifer](#):
>
> Generally speaking, many consider fragment-insertion to be ideal, as you are inserting your short sequence fragments into a curated reference phylogeny that is based on full length rRNA sequences. Whereas constructing a _de novo_ phylogeny from short reads can create some potential problems

Again, read the [fragment insertion paper](https://doi.org/10.1128/mSystems.00021-18) and see if the logic outlined there makes sense to you. If it does, then go with that approach. 🙂

-Mike

---

<div class="post-metadata">

### Author: ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)
#### Post date: [November 16, 2020, 9:17pm UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474/5 "2020-11-16T21:17:28Z")

</div>

For Example you can see two bray-curtis plot which are made by tree.qza (fragment-insertion) and rooted-tree.qza (mafft) :

 ![M](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/1/12e3995b9cf18f171645a81594086c5b1e0a472b.jpeg) ![P](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/2/27aa7e3d83c87c85b7a6bb4c3c1b2ffbc3ce4f99.jpeg)

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [November 16, 2020, 9:22pm UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474/6 "2020-11-16T21:22:37Z")

</div>

Yeah, like I said:

> [@SoilRotifer](#):
>
> I typically run both _de novo_ and fragment insertion approaches on my data. Sometimes they are quite different, other times they are not. I try to stick with fragment-insertion when possible

In this case, these plots look identical, just flipped on `Axis 2`. _ProTip: you can invert any of the axes in the visualizer_. In this case I'd invert `Axis 2` to make it look more like the other PCoA plot. Also, this brings up another point: if your biological signal is very robust, it will not matter if you use _de novo_ or fragment insertion output. So, pick your favorite ❤. Seems like the variance along the axes is is better explained with the fragment insertion.

---

<div class="post-metadata">

### Author: ![mohsen\_ej](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@mohsen\_ej](https://forum.qiime2.org/u/mohsen_ej)
#### Post date: [November 16, 2020, 9:25pm UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474/7 "2020-11-16T21:25:15Z")

</div>

many thanks for your helpful information.

---

<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: [December 18, 2020, 3:25am UTC](https://forum.qiime2.org/t/mafft-or-fragment-insertion/17474/8 "2020-12-18T03:25:17Z")

</div>

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