# running uchime-ref after deblur -- general questions and parameters

**URL:** https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504
**Category:** User Support
**Tags:** chimera, vsearch, deblur
**Created:** [August 19, 2021, 9:09pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504 "2021-08-19T21:09:56Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![anna-schrecengost](https://forum.qiime2.org/user_avatar/forum.qiime2.org/anna-schrecengost/32/10398_2.png) [@anna-schrecengost](https://forum.qiime2.org/u/anna-schrecengost)
#### Post date: [August 19, 2021, 9:09pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/1 "2021-08-19T21:09:56Z")

</div>

Hi, I want to try using `qiime vsearch uchime-ref` on my ASVs that I've obtained after running Deblur. This is because I've noticed there are still a lot of chimeras in my dataset. On a side note -- has anyone else had this issue with chimeras and Deblur, and what did you do about it?

Anyway, the developer of usearch recommends [trying both -mode high\_confidence and -mode balanced](https://www.drive5.com/usearch/manual/otu_qc_chimeras.html) in this case. I am wondering what the equivalent parameters are for `qiime vsearch uchime-ref`? I suspect it is setting the value of `--pminh`, but not sure what I should set that to for this case ( mode high\_confidence having a high false negative rate and mode balanced trying to balance false pos and negative).

I'd appreciate any insight, 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: [August 23, 2021, 2:30pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/2 "2021-08-23T14:30:43Z")

</div>

Hi @anna-schrecengost!

> [@anna-schrecengost](#):
>
> On a side note -- has anyone else had this issue with chimeras and Deblur, and what did you do about it?

cc @wasade - any thoughts on this?

> [@anna-schrecengost](#):
>
> the developer of usearch

Hmm, that's a tricky one - q2-vsearch is built with `vsearch`, a wholly different software package from `usearch`. I just had a read through the `vsearch` support forum and came across this, which is a little useful, but doesn't seem to get to the root of your question:

[https://groups.google.com/g/vsearch-forum/c/ffrrHqy4QM0/m/r0gMx3U2DwAJ](https://groups.google.com/g/vsearch-forum/c/ffrrHqy4QM0/m/r0gMx3U2DwAJ)

> The cluster\_otus command in USEARCH performs clustering and chimera detection simultaneously. VSEARCH does not include the cluster\_otus command. The cluster\_fast, cluster\_size and cluster\_smallmem commands in VSEARCH performs clustering only. It is therefore highly recommended to perform chimera detection with uchime\_denovo or uchime\_ref using VSEARCH. - Torbjørn

I had a quick read through the following thread, and it might help provide some guidance for you - let me know!

[https://groups.google.com/g/vsearch-forum/c/kh8UZuJlT6g/m/1oLffmiqAgAJ](https://groups.google.com/g/vsearch-forum/c/kh8UZuJlT6g/m/1oLffmiqAgAJ)

:qiime2:

---

<div class="post-metadata">

### Author: ![wasade](https://forum.qiime2.org/user_avatar/forum.qiime2.org/wasade/32/2317_2.png) [@wasade](https://forum.qiime2.org/u/wasade)
#### Post date: [August 23, 2021, 3:25pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/3 "2021-08-23T15:25:55Z")

</div>

Hi @anna-schrecengost,

Deblur uses VSEARCH internally to filter chimeras. Here is the exact [command](https://github.com/biocore/deblur/blob/4b4badccdbac8fe9d8f8b3f1349f3700e31b5d7b/deblur/workflow.py#L532-L570).

Chimera checking and filtering is an unsolved problem though.

All the best,  
Daniel

---

<div class="post-metadata">

### Author: ![anna-schrecengost](https://forum.qiime2.org/user_avatar/forum.qiime2.org/anna-schrecengost/32/10398_2.png) [@anna-schrecengost](https://forum.qiime2.org/u/anna-schrecengost)
#### Post date: [August 23, 2021, 3:40pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/4 "2021-08-23T15:40:21Z")

</div>

Hi @thermokarst, thank you for these resources! And oops, I did not realize how different vsearch is from usearch

---

<div class="post-metadata">

### Author: ![anna-schrecengost](https://forum.qiime2.org/user_avatar/forum.qiime2.org/anna-schrecengost/32/10398_2.png) [@anna-schrecengost](https://forum.qiime2.org/u/anna-schrecengost)
#### Post date: [August 23, 2021, 3:50pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/5 "2021-08-23T15:50:55Z")

</div>

Hi @wasade, thank you for your reply! I don't think I provided enough context in my post. I understand that Deblur removes chimeras with a denovo method (which is an implemnation of uchime\_denovo, is that right?). But I have lots of chimeras still present in my data after running deblur, which has really been messing with the phylogeny I'm trying to build. I read in the [deblur paper](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5340863/) that "After applying Deblur, only reads likely to have been presented to the sequencer are retained. However, it is possible that the reads would still contain chimeras originating from PCR.", which could possibly be what's happening with my data? I would like to see if doing further chimera filtering would improve my phylogeny

---

<div class="post-metadata">

### Author: ![wasade](https://forum.qiime2.org/user_avatar/forum.qiime2.org/wasade/32/2317_2.png) [@wasade](https://forum.qiime2.org/u/wasade)
#### Post date: [August 23, 2021, 4:48pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/6 "2021-08-23T16:48:09Z")

</div>

Thanks, @anna-schrecengost. What method is being used to indicate a high presence of chimeras in the data, and a disrupted phylogeny? If this isn't being used, I recommend considering fragment-insertion as the backbone will be fixed.

Aggressive chimera filtering likely will remove real data, and the agreement among the algorithms isn't great. Is there an indication that the presence of chimeras disrupts the biological conclusions being derived from the data?

Best,  
Daniel

---

<div class="post-metadata">

### Author: ![anna-schrecengost](https://forum.qiime2.org/user_avatar/forum.qiime2.org/anna-schrecengost/32/10398_2.png) [@anna-schrecengost](https://forum.qiime2.org/u/anna-schrecengost)
#### Post date: [August 23, 2021, 8:54pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/7 "2021-08-23T20:54:09Z")

</div>

Thank you @wasade - I did not know about the dangers of filtering chimeras with different algorithms. I know there are some other things going on that are likely affecting my data, and although this should probably be a put in different topic, I'll give you some context:

I can tell there is something weird happening with my data just by inspecting the phylogeny. Basically, I am working on a meta-analysis of 18S rRNA gene sequencing studies, focused on anaerobic ciliates. I processed ~20 studies (which involved both the V4 and V9 regions) and now am using fragment-insertion to construct a phylogeny. I constructed a ciliate reference tree for this (which after clustering at 97% similarity came out to be ~2000 mostly nearly full-length sequences). After inserting my ASVs into the reference tree with fragment-insertion, I expected only sequences assigned to ciliates and unassigned sequences in the tree, or at least for the non-ciliate sequences to fall within the outgroup. However I found many taxonomically assinged non-ciliate sequenes inserted into my ciliate tree. I BLASTed a dozen of those and they were likely chimeras (50% query coverage to unrelated organisms).

So I know something is disrupting the biological conclusions that I can derive from the data, and I meant to test whether it might be the chimeras by filtering them out more. However, I am realizing there are many other factors that may have left me with an ugly tree, for example:

- the default % identity threshold that fragment-insertion uses is prettly low for my purposes, so I should utilize `exclude-seqs` at a higher threshold before running the insertion tree
- I think the reference tree itself needs some work. There are two very long-branching outgroup sequences that I need to remove, and also I didn't manage to re-root the tree before going ahead and running sepp, which I am now thinking is likely a big problem (I followed [these steps](https://github.com/smirarab/sepp/tree/master/sepp-package/buildref) to build the tree). so I am re-running a new tree right now to fix these issues
- it's always possible that the taxonomic annotations are wrong and these sequences are actually ciliate sequences (I used `classify-sklearn`). but, it's hard to know if I can trust this

Sorry for the rambling and not including more context with my original post. This forum has been very helpful for a newcomer like myself and I appreciate your help!

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [August 24, 2021, 4:33pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/8 "2021-08-24T16:33:25Z")

</div>



---

<div class="post-metadata">

### Author: ![wasade](https://forum.qiime2.org/user_avatar/forum.qiime2.org/wasade/32/2317_2.png) [@wasade](https://forum.qiime2.org/u/wasade)
#### Post date: [August 25, 2021, 12:00am UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/9 "2021-08-25T00:00:38Z")

</div>

Hi @anna-schrecengost,

This is really cool!!! I agree with the exploration of the upstream pieces first. Getting a reference constructed can be painful, and as you're encountering, sometimes the data are wonky. If you're able, rooting the tree would be valuable. What types of sequences are being used for an outgroup? Long branches should be suspect. It may be useful to examine the alignment of suspect sequences relative to highly trusted ones to see if a breakpoint can be spotted. Bad chimeras can create a lot of problems. A breakpoint 2nt in from 5' probably won't be that bad though (and detecting that would be not fun).

Once rooted, you can take the taxonomy for your reference sequences, and decorate it on to the tree ([GitHub - biocore/tax2tree: Automated taxonomy decoration onto a tree](https://github.com/biocore/tax2tree)). The result can be visualized and explored with Empress ([GitHub - biocore/empress: A fast and scalable phylogenetic tree viewer for microbiome data analysis](https://github.com/biocore/empress)). It may help with the overall QC process. And, the resulting taxonomy from decoration can be used for classification of short reads either where they place or with classify-sklearn

It is _possible_ that some of the input data to the reference are problematic. For Greengenes, we ended up dropping any sequence with \> 1% non-ATGC, anything \< 1200nt, and anything where the % variation relative to a "core" set of trusted sequences was \>10%. We found a lot of not great data in Genbank when trolling for records. For chimeras, we compared against isolates IIRC using uchime-ref, and only considered chimeras if bridging class-level or higher.

Best,  
Daniel

---

<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: [August 25, 2021, 1:11am UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/10 "2021-08-25T01:11:59Z")

</div>



---

<div class="post-metadata">

### Author: ![anna-schrecengost](https://forum.qiime2.org/user_avatar/forum.qiime2.org/anna-schrecengost/32/10398_2.png) [@anna-schrecengost](https://forum.qiime2.org/u/anna-schrecengost)
#### Post date: [August 25, 2021, 4:39pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/11 "2021-08-25T16:39:07Z")

</div>

Thank you @wasade!!

In regards to the reference/outgroup sequences: For the reference sequences I used all the ciliate sequences from PR2 (which has been integrated with [Euk-Ref/ Euk-Ref Ciliophora](https://pubmed.ncbi.nlm.nih.gov/29727060/), so it should already be [manually curated](https://pr2-database.org/eukref/pipeline_overview/), similar to how you described, except that their bp threshold is lower (500 bp)). I also used full-length 18S sequences from my lab as well as from some collaborators. The reference tree looks like a nice standard ciliate tree except for the funky outgroup sequences. For those I used a couple hundred sequences of apicomplexans and dinoflagellates also from the PR2 database. Perhaps this is too many sequences and that combined with the tree being unrooted caused some of my problems? I am trying now with only 5 full-length, high quality outgroup sequences. I am curious about your thoughts on the ideal number of outgroup sequences for this application of fragment-insertion?

Thank you for pointing me toward tax2tree! And I have been using Empress, it's really great! It's really nice that I can easily visualize the q2 assigned taxonomy and metadata in the tree as well.

> And, the resulting taxonomy from decoration can be used for classification of short reads either where they place or with classify-sklearn

When you write this, do you mean that I could either assign taxonomy based on where they place in the phylogenetic tree, or also by using the decorated taxonomy as a reference databse in classify-sklearn? Also, tax2tree decorates the tree with Greengenes taxonomy, is that correct? I am interested in decorating the tree with our curated taxonomy (especially with the underrepresented anaerobic ciliates, many of these sequences have not been published yet). I have a tab-separated .txt file with the reference sequences IDs and their taxonomy but have been having trouble figuring out how to use that to automatically annotate the tree. I know this is possible in [iTOL](https://itol.embl.de/) but have been curious if there are other options because I find it a bit hard to use.

Thank you!  
Anna

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [August 25, 2021, 10:22pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/12 "2021-08-25T22:22:42Z")

</div>



---

<div class="post-metadata">

### Author: ![wasade](https://forum.qiime2.org/user_avatar/forum.qiime2.org/wasade/32/2317_2.png) [@wasade](https://forum.qiime2.org/u/wasade)
#### Post date: [September 13, 2021, 6:13pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/14 "2021-09-13T18:13:09Z")

</div>

Hi @anna-schrecengost,

It's my understanding that there are a lot of open questions with outgroups. For Greengenes, we just used all of the sequences that we could objectively define as Archaea for the outgroup (in that case, IIRC we used the ssu-align model association).

That's wonderful to hear tax2tree + empress worked well 🙂

Tax2tree can decorate using any input taxonomy, and the taxonomy does not need to be complete. Just needs some tip name -\> lineage information. The lineage information needs to be well formed such that a) taxonomic rank prefixes are included (eg "d\_\_Eukarya; p\_\_Chordata; ...etc"), b) for the records included, all must have the same number of taxonomic levels and c) there cannot be any gaps in the ranks (eg "d\_\_Eukarya; p\_\_; c\_\_Mammalia")

The names are placed on the internal nodes of the tree. If that tree is subsequently used for fragment insertion, the internal nodes will remain named, so you can pull off the lineage of the placed fragments by just walking the ancestors. I believe the fragment insertion plugin supports this already under the `classify-otus-experimental` but I haven't used it specifically; it's definitely possible via the `skbio.TreeNode` API though via the `.ancestors` method.

Does that help? Sorry for the delayed reply, busy few weeks.

All the best,  
Daniel

---

<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: [September 13, 2021, 10:18pm UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/16 "2021-09-13T22:18:29Z")

</div>



---

<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: [October 15, 2021, 4:18am UTC](https://forum.qiime2.org/t/running-uchime-ref-after-deblur-general-questions-and-parameters/20504/17 "2021-10-15T04:18:43Z")

</div>

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