changing uclust parameters during tax assignment

58 views
Skip to first unread message

Colin Brislawn

unread,
Nov 18, 2015, 8:07:03 PM11/18/15
to Qiime 1 Forum
Good afternoon,

I have run the script parallel_assign_taxonomy_uclust.py and want to change the settings that uclust is passed.

One of the lines of my output file reads:
# uclust --input uclust_assign_tax/UCTA_7A16_/UCTA_7A16_.0.fasta --id 0.9 --rev --maxaccepts 3 --allhits --libonly --lib /people/bris469/bin/anaconda/envs/qiime-git/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta --uc /people/bris469/.qiime_tmp/UclustConsensusTaxonAssigner_B6xMr6.uc

I understand that I can change the --maxaccepts option using the qiime parameter --uclust_max_accepts.

How do I add additional parameters to uclust, like --nowordcountreject.

Thanks!
Colin

Jenya Kopylov

unread,
Nov 19, 2015, 10:02:40 AM11/19/15
to Qiime 1 Forum
Hi Colin,

Not sure it's possible to pass other parameters (that are not accessible via parallel_assign_taxonomy_uclust.py parameters) without modifying the code. I also don't see the option --nowordcountreject in the uclust API (see here), which should be added for building a command.

Perhaps others can add on if I'm missing something?

Jenya

Colin Brislawn

unread,
Nov 19, 2015, 1:21:15 PM11/19/15
to qiime...@googlegroups.com
Hello Jenya,

Thanks for helping me with this. It looks like the API does not include all the flags listed in the old uclust manual:

The good news is, that API does include the flag --exact, which does what I want! How do I pass --exact to uclust when running parallel_assign_taxonomy_uclust.py?

Colin

Jenya Kopylov

unread,
Nov 19, 2015, 5:39:23 PM11/19/15
to Qiime 1 Forum
Hi Colin,

Seems that the only options you can pass to uclust are those which are supported by parallel_assign_taxonomy_uclust.py. You can create an issue to support additional parameters if this is something you really want to see. Sorry can't be of more help ..

Colin Brislawn

unread,
Nov 19, 2015, 5:57:01 PM11/19/15
to Qiime 1 Forum
Oh that's too bad. 

Maybe Kyle or Greg comment on the possibility of adding this feature. I was hoping it would not be too hard as --exact is already provided in bfillings.

Colin

Colin Brislawn

unread,
Nov 19, 2015, 6:05:39 PM11/19/15
to Qiime 1 Forum
Hey, could I just add this into the command here?

Colin

Jenya Kopylov

unread,
Nov 19, 2015, 7:11:14 PM11/19/15
to Qiime 1 Forum
It shouldn't be too difficult to add. If you want to be able to pass the option via command line,
you'd want to modify /scripts/assign_taxonomy.py as well. Also, I'm not sure whether what
implications this will have on the algorithm, or parsing the output file, something to look into
and test to make sure you're obtaining correct results.

Colin Brislawn

unread,
Nov 19, 2015, 7:13:54 PM11/19/15
to Qiime 1 Forum
It will only change how intensively uclust searches for hits. The output will be the same and the interpretation will be almost identical.

I think I got it working (because uclust is now taking forever). Thanks for your help with this. 

Colin
 

Colin Brislawn

unread,
Nov 20, 2015, 12:56:04 PM11/20/15
to Qiime 1 Forum
Ok, I got it working.

In these lines of this file, you can add it like this:
        # Configure for consensus taxonomy assignment
        app.Parameters['--rev'].on()
        app.Parameters['--lib'].on(self.Params['reference_sequences_fp'])
        app.Parameters['--libonly'].on()
        app.Parameters['--allhits'].on()
        app.Parameters['--exact'].on()


The issue is that this take FOREVER. Setting --maxrejects 0 does NOT search everything; it searches everything that passed the word filter. Passing --exact or  --maxrejects 0 --nowordfilter will force uclust to align a divergent read with literally every item in the database, which is absurd. This seemed more reasonable before I tried it.

Thank you all for your help!
Colin


Jenya Kopylov

unread,
Nov 20, 2015, 4:53:18 PM11/20/15
to Qiime 1 Forum
Glad you got it working!
Reply all
Reply to author
Forward
0 new messages