# ID Mismatch when running core-metrics

**URL:** https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266
**Category:** User Support
**Created:** [September 29, 2018, 3:27am UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266 "2018-09-29T03:27:44Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![nan\_wang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nan_wang/32/13534_2.png) [@nan\_wang](https://forum.qiime2.org/u/nan_wang)
#### Post date: [September 29, 2018, 3:27am UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/1 "2018-09-29T03:27:44Z")

</div>

actually, I imported data via the method from this post [Mafft 'returned non-zero exit status 1' ERROR - #5 by Purrsia\_Felidae](https://forum.qiime2.org/t/mafft-returned-non-zero-exit-status-1-error/5320/5)

namely, I construct unrooted tree in qiime1 with code  
"pick\_de\_novo\_otus.py -i split\_library\_output/seqs.fna -o otus",

then I imported the unrooted-tree in qiime2  
#import unrooted tree (phylogenetic tree)  
qiime tools import \

--input-path unrooted-tree.tre \

--output-path unrooted-tree.qza \

--type 'Phylogeny[Unrooted]'

# unrooted to rooted

qiime phylogeny midpoint-root \

--i-tree unrooted-tree.qza \

--o-rooted-tree rooted-tree.qza

but I when I tried to generate core metrics files, it reports like this

 ![05](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/c/cb2c799ed0d8c0143759c6e9741ebb4aa5f2b7cc.png)

actually, when I work on qiime1, my computer run out of battery once. Is that the reason for this error? otherwise, I have no idea what is going on....and what to do next...do you have any idea about that? Thank you in advance!

sincerely,  
nan

---

<div class="post-metadata">

### Author: ![nan\_wang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nan_wang/32/13534_2.png) [@nan\_wang](https://forum.qiime2.org/u/nan_wang)
#### Post date: [September 29, 2018, 3:39am UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/2 "2018-09-29T03:39:43Z")

</div>

I think I'd better to fully introduce my condition.

My data are PGM data. detailed information is here [Demultiplex joined reads sequences](https://forum.qiime2.org/t/demultiplex-joined-reads-sequences/6146)

then my work route is as follow:

- download and setup qiime1 as tutorial

- validate mapping file “sample-mapping.txt”

- demux and quality control the "full-files" (not the pr-file because little sequence pass the filter)  
split\_libraries.py -m sample-mapping.txt -f full.fasta -q full.qual -b 8 -o split\_library\_output”

- construct unrooted tree with code “  
pick\_de\_novo\_otus.py -i split\_library\_output/seqs.fna -o otus"

- enter q2:

- import data

#import sequences  
qiime tools import \

--input-path seqs.fna \

--output-path seqs.qza \

--type 'SampleData[Sequences]’

#import FeatureTable

qiime vsearch dereplicate-sequences

--i-sequences seqs.qza \

--o-dereplicated-table table.qza \

--o-dereplicated-sequences rep-seqs.qza

#import unrooted tree (phylogenetic tree)

qiime tools import \

--input-path unrooted-tree.tre \

--output-path unrooted-tree.qza \

--type 'Phylogeny[Unrooted]'

# unrooted to rooted

qiime phylogeny midpoint-root \

--i-tree unrooted-tree.qza \

--o-rooted-tree rooted-tree.qza

#generate core metrics: sampling depth could vary. Here 50000 was chosen since the least counts are 6XXX, 3XXXX, 6XXXX, 7xxxx, and chinese version tutorial indicates that usually 30000/50000 are suitable depth.

#generate core metrics

qiime diversity core-metrics-phylogenetic --i-phylogeny rooted-tree.qza --i-table table.qza --p-sampling-depth 50000 --m-metadata-file sample-metadata.txt --output-dir core-metrics-results

Did I do any thing wrong?

---

<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: [October 2, 2018, 3:40am UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/3 "2018-10-02T03:40:51Z")

</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: [October 2, 2018, 3:45am UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/4 "2018-10-02T03:45:41Z")

</div>

Hello @nan_wang!

There error you presented [above](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266) in the screenshot (when running `diversity core-metrics-phylogenetic` indicates that the features in your phylogenetic tree do not match the features in your feature table. Please run [`feature-table summarize`](https://docs.qiime2.org/2018.8/plugins/available/feature-table/summarize/) on you table, and [`feature-table tabulate-seqs`](https://docs.qiime2.org/2018.8/plugins/available/feature-table/tabulate-seqs/) on the `FeatureData[Sequence]` that was used to create your tree (this would be the file used to create `unrooted-tree.tre`, if you don't have it, then take a look at the `unrooted-tree.tre` file directly. Your feature IDs need to be consistent across those two bits of data --- this is how QIIME 2 associates feature frequencies to tips of the tree, through the feature ID.

Keep us posted!

---

<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: [October 2, 2018, 3:45am UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/5 "2018-10-02T03:45:43Z")

</div>



---

<div class="post-metadata">

### Author: ![nan\_wang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nan_wang/32/13534_2.png) [@nan\_wang](https://forum.qiime2.org/u/nan_wang)
#### Post date: [October 2, 2018, 1:24pm UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/6 "2018-10-02T13:24:48Z")

</div>

Thank your for your reply. But viewing trees is a problem - I imported the rep\_set.tre file directly from qiime1, and it cannot be viewed. So I imported the files that generated .tre file into qiime2, but their types are FeatureData[AlignedSequence], thus they cannot be view via [`feature-table tabulate-seqs`](https://docs.qiime2.org/2018.8/plugins/available/feature-table/tabulate-seqs/)...Is there any other way to view the unrooted tree?

Thank you very much.  
Sincerely,  
NAN

---

<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: [October 2, 2018, 1:46pm UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/7 "2018-10-02T13:46:09Z")

</div>

Hi @nan_wang,

Try using [iTOL](https://itol.embl.de/) to view your phylogenetic tree. As well, as I mentioned above, you can just open the text file that you imported into QIIME 2 directly and ready the IDs there, too.

---

<div class="post-metadata">

### Author: ![nan\_wang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nan_wang/32/13534_2.png) [@nan\_wang](https://forum.qiime2.org/u/nan_wang)
#### Post date: [October 2, 2018, 3:12pm UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/8 "2018-10-02T15:12:13Z")

</div>

thank you for your early reply.  
I read the two files but I didn't find anything wrong... I attached the sequence data and the sequence-feature.txt to this post. Could you please help me to find why they didn't work together?  
Thanks again.  
[feature-frequency-detail.txt](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/7/7180b6deb9b696ce61a01aa74bf14f43a156c701.txt) (1014.8 KB)  
[seqs\_rep\_set\_aligned\_pfiltered.txt.zip](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/2/242d94e42a10d8a45547c2dd7fdfc70b69f98208.zip) (2.8 MB)

---

<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: [October 2, 2018, 4:51pm UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/9 "2018-10-02T16:51:03Z")

</div>

Hey hey @nan_wang! Thanks for sending those files, but those don't match up with the error message you posted above. One of the artifacts implicated in the error above has hashes for feature IDs, and I don't see those in either file. For example:

```auto
$ ag 409c6bf feature-frequency-detail.txt

$ ag 409c6bf seqs_rep_set_aligned_pfiltered.txt

```

No hits, but according to your error above, at least one of those files has a feature with that ID.

---

<div class="post-metadata">

### Author: ![nan\_wang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nan_wang/32/13534_2.png) [@nan\_wang](https://forum.qiime2.org/u/nan_wang)
#### Post date: [October 2, 2018, 8:29pm UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/10 "2018-10-02T20:29:53Z")

</div>

Oh sorry! I tried several times after the initial post, so something is different from the initial posts but I guess it's the same problem.

Actually, after 9.29's post, I tried several methods.

First, I thought maybe it is because the table and the tree were generated in different softwares that they didn't match, so I imported the table generated by qiime1(the table I sent to you) and use it. it has no significant difference from the one generated in qiime2 except it has much less features than q2-generated table.

Then, I imported every file generated in QI to Q2 then continue the pipeline:  
namely, 1) I imported aligned sequences in Q1 to Q2. then masked it, constructed unrooted tree, then got rooted tree.  
2)I imported the filtered sequences(the seqs\_rep\_set\_aligned\_pfiltered file I sent to you ), which is equal to the masked sequences, to Q2, then construct the unrooted-tree...  
and I also 3)imported the unrooted-tree file...

but all of the four solutions returned the same error "......not corresponding to tip names (n= numbers\_of\_features): (all feature IDs)"

I really have no idea why it happens...

---

<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: [October 2, 2018, 9:18pm UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/11 "2018-10-02T21:18:45Z")

</div>

Please send the artifacts and one of us will take a look. You can send to me in a DM if you want.

---

<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: [October 4, 2018, 2:08pm UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/14 "2018-10-04T14:08:00Z")

</div>

> [@nan\_wang](#):
>
> all feature IDs

This is not quite correct --- it is only some of them (2307 out of 65,028).

My first question is --- why are these features present in your table, but absent from your tree? It looks like you prepared these data outside of QIIME 2, so you will need to double-check why this is the case.

So, assuming that it is _okay_ to have missing features, how about we just drop those features from the feature table?

You can provide your rep seqs as metadata to `feature-table filter-features`, or, you can create a new feature metadata file with a list of the features to remove from your feature table. Once the table is filtered try `core-metrics-phylogenetic` again.

:qiime2: 🦖

---

<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: [October 4, 2018, 2:08pm UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/15 "2018-10-04T14:08:03Z")

</div>



---

<div class="post-metadata">

### Author: ![nan\_wang](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nan_wang/32/13534_2.png) [@nan\_wang](https://forum.qiime2.org/u/nan_wang)
#### Post date: [October 8, 2018, 4:19am UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/16 "2018-10-08T04:19:01Z")

</div>

That works! Thank you soooooo much!

---

<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: [November 8, 2018, 10:19am UTC](https://forum.qiime2.org/t/id-mismatch-when-running-core-metrics/6266/17 "2018-11-08T10:19:02Z")

</div>

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