# Mismatched feature IDs

**URL:** <https://forum.qiime2.org/t/mismatched-feature-ids/7112>\
**Category:** User Support\
**Created:** [November 21, 2018, 2:53am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112 "2018-11-21T02:53:15Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![giant\_virus](https://forum.qiime2.org/user_avatar/forum.qiime2.org/giant_virus/32/3298_2.png) [@giant\_virus](https://forum.qiime2.org/u/giant_virus)\
**Post date:** [November 21, 2018, 2:53am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/1 "2018-11-21T02:53:15Z")

</div>

Dear qiime2 community!

I still have not figured out how to solve the problem of unmaching tree tips and sequence tables. Also discussed [here](https://forum.qiime2.org/t/plugin-error-from-diversity/1001)

The user with the same problem did not post the solution.

The error I get is the same is in the post:

> /usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.2/lib/python3.5/site-packages/sklearn/utils/validation.py:475: DataConversionWarning: Data with input dtype int64 was  
> converted to bool by check\_pairwise\_arrays.  
> warnings.warn(msg, DataConversionWarning)  
> Traceback (most recent call last):  
> File "/usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.2/lib/python3.5/site-packages/q2\_diversity/\_alpha/\_method.py", line 46, in alpha\_phylogenetic  
> tree=phylogeny)  
> File "/usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.2/lib/python3.5/site-packages/skbio/diversity/\_driver.py", line 170, in alpha\_diversity  
> counts, otu\_ids, tree, validate, single\_sample=False)  
> File "/usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.2/lib/python3.5/site-packages/skbio/diversity/alpha/\_faith\_pd.py", line 136, in \_setup\_faith\_pd  
> \_validate\_otu\_ids\_and\_tree(counts[0], otu\_ids, tree)  
> File "/usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.2/lib/python3.5/site-packages/skbio/diversity/\_util.py", line 106, in \_validate\_otu\_ids\_and\_tree  
> " ".join(missing\_tip\_names)))  
> skbio.tree.\_exception.MissingNodeError: All `otu_ids` must be present as tip names in `tree`. `otu_ids` not corresponding to tip names (n=23324): 4b0f96635e87ecb3e7903c0b4ab0bfb2abe2856a 5a299a483a1212f879ee358b2ec00495c256ef1f [omitting feature\_ids]

So after this command the feature\_ids have the same name:

> qiime vsearch dereplicate-sequences   
> --i-sequences OUT\_DIR/out4-qual-filter.qza   
> --o-dereplicated-table OUT\_DIR/out5-derep-table.qza   
> --o-dereplicated-sequences OUT\_DIR/out5-derep-sequences.qza

[I checked by exporting the files and manually checking some of the feature\_ids.]

Hence, somewhere during these commands the feature\_id's get changed:

> qiime alignment mafft   
> --i-sequences out5-derep-sequences.qza   
> --o-alignment out5-derep-sequences\_alignment\_mafft.qza   
> --p-n-threads 8  
> qiime alignment mask   
> --i-alignment out5-derep-sequences\_alignment\_mafft.qza   
> --o-masked-alignment out5-derep-sequences\_alignment\_masked.qza  
> qiime phylogeny fasttree   
> --i-alignment out5-derep-sequences\_alignment\_masked.qza   
> --o-tree out5-derep-sequences\_tree.qza  
> qiime phylogeny midpoint-root   
> --i-tree out5-derep-sequences\_tree.qza   
> --o-rooted-tree out5-derep-sequences\_rooted\_tree.qza  
> qiime tools export   
> out5-derep-sequences\_tree.qza   
> --output-dir ./

I played around with my data and used the tools [`feature-table summarize`](https://docs.qiime2.org/2017.7/plugins/available/feature-table/summarize/) (the third tab, ‘Feature Detail’) and [`feature-table tabulate-seqs`](https://docs.qiime2.org/2017.7/plugins/available/feature-table/tabulate_seqs/) to visualize the names of my feature\_ids. I then exported my tree and viewed it in MEGA. There I found why the tips do not match.

The tips of the tree are all changed the same way:  
_e0330553235196aa25c184cd0b1a1f8284706dd3_  
becomes  
_e0330553235196aa25c184cd0b1a1f8284706dd3 UU3micro-18S-12\_S14\_L001\_132201_

_UU3micro-18S-12\_S14\_L001_ is the name of one of the fasta files I used and \__132201_ is also added. It is not reads. 🤷‍♂️

The problem is this that I do not know where the fasta-filename is added and why. I used mafft and fasttree outside of the pipeline, they never added names to the sequences. I think this is the only reason that I cannot get the _qiime diversity core-metrics-phylogenetic_ command to run.

I also tried the command recommended in the [moving pictures tutorial](https://docs.qiime2.org/2018.11/tutorials/moving-pictures/):

> qiime phylogeny align-to-tree-mafft-fasttree

but I get this error (I should update my qiime version...):

> Error: QIIME 2 plugin 'phylogeny' has no action 'align-to-tree-mafft-fasttree'.

So thanks for your help so far! I am struggling to export mafft data so until I figure this out I cannot know where it is changed and why. There is also the possibility that the exporting changes the tip names and the error lies somewhere else.

I will also post the solution if I can find it and update my Qiime2 version (its from February)!

Flo

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 21, 2018, 4:56am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/2 "2018-11-21T04:56:37Z")

</div>

Hey there @giant_virus!

> [@giant\_virus](#):
>
> The tips of the tree are all changed the same way:  
> _e0330553235196aa25c184cd0b1a1f8284706dd3_  
> becomes  
> _e0330553235196aa25c184cd0b1a1f8284706dd3 UU3micro-18S-12\_S14\_L001\_132201_

This is _bizarre_. There is _nothing_ in any of the QIIME 2 plugins that I know of that would do this to your Feature IDs.

> [@giant\_virus](#):
>
> The problem is this that I do not know where the fasta-filename is added and why

That makes 2 of us!

> [@giant\_virus](#):
>
> Error: QIIME 2 plugin ‘phylogeny’ has no action ‘align-to-tree-mafft-fasttree’.

You need 2018.8 or later for this pipeline.

> [@giant\_virus](#):
>
> I will also post the solution if I can find it and update my Qiime2 version (its from February)!

We can't really provide support for old versions of QIIME 2 --- any chance you can upgrade and try again? If not, can you please send me a DM with the files you are working with, I would like to take a closer look.

Thanks! 🦖 :qiime2:

---

<div class="post-metadata">

**Author:** ![giant\_virus](https://forum.qiime2.org/user_avatar/forum.qiime2.org/giant_virus/32/3298_2.png) [@giant\_virus](https://forum.qiime2.org/u/giant_virus)\
**Post date:** [November 21, 2018, 2:02pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/3 "2018-11-21T14:02:41Z")

</div>

First of all, sorry for posting in the old thread, I was not sure if I should create a new one.

I contacted the techincal staff of our computer system, they will update qiime2, I will let you know if it fixed the problem!

Again thanks for the quick reply!

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 21, 2018, 2:19pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/4 "2018-11-21T14:19:03Z")

</div>



---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 21, 2018, 2:21pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/5 "2018-11-21T14:21:05Z")

</div>

> [@giant\_virus](#):
>
> sorry for posting in the old thread

No need to apologize at all --- it is super simple for us to split topics up. The reason we do that is to try and make things easier to search for on the forum.

> [@giant\_virus](#):
>
> I will let you know if it fixed the problem!

👍

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 21, 2018, 2:21pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/6 "2018-11-21T14:21:08Z")

</div>



---

<div class="post-metadata">

**Author:** ![giant\_virus](https://forum.qiime2.org/user_avatar/forum.qiime2.org/giant_virus/32/3298_2.png) [@giant\_virus](https://forum.qiime2.org/u/giant_virus)\
**Post date:** [November 22, 2018, 9:33am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/7 "2018-11-22T09:33:51Z")

</div>

Good evening!  
I just finished updating my pipeline to the November release of qiime2! To be sure I repeated every step of the analysis to completely flush out all the files that were generated using the February release.

My pipeline looks like this:

1. qiime tools import
2. qiime cutadapt trim-paired
3. qiime vsearch join-pairs
4. qiime quality-filter q-score-joined
5. qiime vsearch dereplicate-sequences
6. importing silva as reference...
7. qiime vsearch uchime-ref
8. qiime feature-classifier classify-consensus-vsearch

Then I used:

1. qiime feature-table filter-features and qiime taxa barplot  
I checked if the annotation work \> it did very well! However I do not understand the filtering well. I am still trying to understand it using the docs and this [answer](https://forum.qiime2.org/t/valueerror-feature-ids-found-in-the-table-are-missing-from-the-taxonomy/5232).
2. qiime feature-table summarize and qiime feature-table tabulate-seqs  
I have nice results, worked like a charm.
3. qiime phylogeny align-to-tree-mafft-fasttree  
I get my rooted, unrooted tree and also the alingment and masked alignment.

However when I call:

qiime diversity core-metrics-phylogenetic   
--i-table out5-derep- **filtered\_table**.qza   
--i-phylogeny out5-derep-seq\_ **rooted-tree**.qza   
--p-sampling-depth 50000 \ (checked this with the exported table)  
--m-metadata-file metadata\_sheet.tsv   
--p-n-jobs 16   
--output-dir core-metrics-phylogenetic-output

Now I get the same error as earlier. I export the rooted tree (qiime tools export) and again the feature\_ids were appended with the filenames. So at some point I must have made a mistake.

I will try to figure it out on my own, but I am thankful for every hint I can get! The update did not change the problem I have. I think that I made a mistake somewhere.

Thank you!

P.S.: Here is the errorlog:

> /usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/utils/validation.py:475  
> : DataConversionWarning: Data with input dtype float64 was converted to bool by check\_pairwise\_arrays.  
> warnings.warn(msg, DataConversionWarning)  
> Traceback (most recent call last):  
> File "/usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.11/lib/python3.5/site-packages/q2\_diversity/\_alpha/\_me  
> thod.py", line 46, in alpha\_phylogenetic  
> tree=phylogeny)  
> File "/usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.11/lib/python3.5/site-packages/skbio/diversity/_driver  
> .py", line 170, in alpha\_diversity  
> counts, otu\_ids, tree, validate, single\_sample=False)  
> File "/usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.11/lib/python3.5/site-packages/skbio/diversity/alpha/_  
> faith\_pd.py", line 136, in \_setup\_faith\_pd  
> \_validate\_otu\_ids\_and\_tree(counts[0], otu\_ids, tree)  
> File "/usr/appli/freeware/miniconda/3.6/envs/qiime2-2018.11/lib/python3.5/site-packages/skbio/diversity/\_util.p  
> y", line 104, in \_validate\_otu\_ids\_and\_tree  
> " ".join(missing\_tip\_names)))  
> skbio.tree.\_exception.MissingNodeError: All `otu_ids` must be present as tip names in `tree`. `otu_ids` not  
> corresponding to tip names (n=20624): c4446b4a7ecb9ecca5747fe65dd9c941f21c4a37 [and another20.000 features]

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [November 22, 2018, 2:08pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/8 "2018-11-22T14:08:28Z")

</div>



---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 27, 2018, 3:48am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/9 "2018-11-27T03:48:39Z")

</div>

Can you please share

`out5-derep-filtered_table.qza`

and

`out5-derep-seq_rooted-tree.qza`

❓

This would really help lock down _exactly_ what is going on here by letting us just look at the decentralized provenance. If you don't want to share here feel free to send links to me in a direct message. Thanks! 🦖

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 27, 2018, 3:48am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/10 "2018-11-27T03:48:43Z")

</div>



---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [November 28, 2018, 4:26am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/11 "2018-11-28T04:26:54Z")

</div>

Thanks for sending along these data, that certainly helps! Provenance looks fine from this end. I am suspicious of `vsearch` though --- can you run the `feature-table tabulate-seqs` command on the `FeatureData[Sequence]` artifact returned from `vsearch dereplicate-sequences`? What do the Feature IDs looks like there?

---

<div class="post-metadata">

**Author:** ![giant\_virus](https://forum.qiime2.org/user_avatar/forum.qiime2.org/giant_virus/32/3298_2.png) [@giant\_virus](https://forum.qiime2.org/u/giant_virus)\
**Post date:** [December 4, 2018, 3:07am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/12 "2018-12-04T03:07:58Z")

</div>

Hello and sorry for the long wait,  
I think the feature IDs look okay.  
I used this command to generate the visualization below.

> qiime feature-table tabulate-seqs --i-data out5-derep-sequences.qza --o-visualization out5-derep-sequences-vis.qzv

Here is a screenshot of the visualization:

 ![out5-derep-sequences-vis](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/9/9dd2acf6143bd77aa451836dac3b6d5eec453502.png)

out5-derep-sequences.qza was generated using vsearche's dereplicate sequences.  
I hope this helps, thank you for your help!

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [December 4, 2018, 2:33pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/13 "2018-12-04T14:33:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [December 4, 2018, 5:43pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/14 "2018-12-04T17:43:47Z")

</div>

> [@giant\_virus](#):
>
> Hello and sorry for the long wait,

No worries, thanks for following up!

> [@giant\_virus](#):
>
> I think the feature IDs look okay.

I agree, they look perfectly normal.

Hmmm, I am out of ideas. I have been unable to reproduce the weird feature ID issue you are showing. For example, just look at the [Moving Pictures tree](https://docs.qiime2.org/2018.11/tutorials/moving-pictures/#generate-a-tree-for-phylogenetic-diversity-analyses), it is totally fine!

Is it possible that you have a different version of mafft or fasttree in your PATH somewhere? One way to check is to start a new terminal with no conda env active, then run:

```bash
env 

```

Copy-and-paste the "before" results of that command.

Then, activate your QIIME 2 environment, and rerun:

```bash
env

```

Copy-and-paste the "after" results, then we can compare them.

Thanks!

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [December 4, 2018, 5:43pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/15 "2018-12-04T17:43:56Z")

</div>



---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [December 4, 2018, 6:05pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/16 "2018-12-04T18:05:28Z")

</div>

Oh hey @giant_virus, can you also send the QZV for the screenshot above? `out5-derep-sequences-vis.qzv`

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [December 5, 2018, 4:35am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/17 "2018-12-05T04:35:29Z")

</div>

Thanks for sending the viz in a DM! Okay, guess what? Even though the _viz_ looks okay, if I pull out the FASTA file from within:

```auto
>3cafeb270ab9f7183bbc2e7c24b7cc1ffb2f196c UU3micro-18S-12_S14_L001_404900
CCTGAAAGCCGGTAATGACTTTCTCGCGTCAAACCGCGAAAAGCCAGGCGTGACCGAACTCCTCAGCGGACTCCAGTACGAAGTGATCCACATGGGTGACGGAGCCAAACCCTGGCCCACCAGCAAAGTGACCTGCCATTACCAT
>bbfdbd5a45738494ef2a3fc5f95a878bfb9f8475 UU3micro-18S-12_S14_L001_404902
ATAACAGGTCTGTGATGCCCTTAGATGTTCTGGGCCGCACGCGCGCTACACTGACTGGTTCATCGAGCTTACAACCTTGACCGAGAGGTCTGGGTAATCTTTTTAAAGCCAGTCGTGATGGGGATAGATTATTGCAATTTTTAATCTTCAACGAGGAATTCCTAGTAGACGCAGGTCATCAACCTGCATCGATTACGTCCCTGCCCTTTGTACACGCCGCCCGTCGCTACTACCGATTGAATGGCTTAGTGAGCCCTCTGGACTGGTGCACGGCGTTGGAAACTTCGCCGCGCGTTCAGGAAGGAGGTCAAACTTGATCATTTAGAGGAAGTAAAAGTCGTAACAAGGTTTCC
>bc69f76bfcb0deac1cb364f08edd54725d7d47d1 UU3micro-18S-12_S14_L001_404918
ATAACAGGTCTGTGATGCCCTTAGATGTTTTGGGCTGCACGCGTGCTACACTGGTTTAATTAACGAGCTGCTGGTCTTGTTTGAAAGCGTGGGGTAAACTTTAATGTAAATCGTGATTGGGGTGGATTGTTGCAATTATTGATCTTGAACGAGGAATTCCTAGTACGCCGAAGTCATCAGCTTGGGCTGACTACGTCCCTGCCCTTTGTACACACCGCCCGTCGCTCCTACCGATTGAGTAATCCGGTGAAATGCTTGGCTTGGCACAGTGGTCATAAATGAGTGTTGTGCAACAAGTGCTTTGAACCTTGTTACTTAGAGGAAGGAGAAGTCGTAACAAGGTTTCT

```

Ah hah! `vsearch`, you scoundrel 🏴‍☠️ ! Okay, so the [main issue](https://github.com/qiime2/q2-vsearch/issues/57) appears to be that `dereplicate-sequences` is modifying the feature IDs. [Secondly](https://github.com/qiime2/q2-feature-table/issues/196), the `tabulate-seqs` viz should show _the entire_ feature ID, not just the first word found in it.

Okay - workarounds...

You could [cluster de novo](https://docs.qiime2.org/2018.11/plugins/available/vsearch/cluster-features-de-novo/) at 100%. This will keep your Features more or less the same (for example, I ran this as a check on the dereplicated outputs for the [Moving Pictures tutorial dataset](https://docs.qiime2.org/2018.11/tutorials/moving-pictures/), I started with 229143 features, after clustering, 229137).

If that is not acceptable for you, your other options are to choose a different pipeline (e.g. DADA2), or, clean up your feature IDs in some kind of external script or tool.

Thanks for working with us on this one! :qiime2: 🦖

---

<div class="post-metadata">

**Author:** ![giant\_virus](https://forum.qiime2.org/user_avatar/forum.qiime2.org/giant_virus/32/3298_2.png) [@giant\_virus](https://forum.qiime2.org/u/giant_virus)\
**Post date:** [December 5, 2018, 6:31am UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/18 "2018-12-05T06:31:09Z")

</div>

I just went through the moving pictures tutorial and the tree does not show appended feature id names.  
So I actually started doing exactly what you recommended! Thanks a lot man, I will just not use vsearch and continue!😄😄

Thanks for all the time you put into helping me! I hope the Qiime2 team can also benefit from this Odyssey!

edit: I could have pulled the fasta file too! I was not paying enough attention, next time I will try to not rely on the implemented visualization (especially when a mod tells me that the behavior of the software is weird!). Thank you again!

---

<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:** [January 5, 2019, 12:31pm UTC](https://forum.qiime2.org/t/mismatched-feature-ids/7112/19 "2019-01-05T12:31:13Z")

</div>

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