Error during assign taxonomy (ValueError: too many values to unpack)

75 views
Skip to first unread message

Shi Ming Tan

unread,
May 16, 2016, 1:51:21 AM5/16/16
to Qiime 1 Forum
Hello there,

I am currently trying to use the assign_taxonomy.py script with the blast method, and the SILVA 123 database as options (-t -r).

Unfortunately, I always receive an error message when I choose -m blast as my method or using the default u clust
tanshiming@S620100019205:~/Documents/sheath_fluid_contamination$ assign_taxonomy.py -i representative_10.06.fasta -t tax_slv_ssu_123.txt -r SILVA_123_SSURef_Nr99_parse.fasta -o taxonomy_contamination_10.06
Traceback (most recent call last):
  File "/usr/local/bin/assign_taxonomy.py", line 417, in <module>
    main()
  File "/usr/local/bin/assign_taxonomy.py", line 386, in main
    taxon_assigner = taxon_assigner_constructor(params)
  File "/usr/local/lib/python2.7/dist-packages/qiime/assign_taxonomy.py", line 1234, in __init__
    self.id_to_taxonomy = self._parse_id_to_taxonomy_file(id_to_taxonomy_f)
  File "/usr/local/lib/python2.7/dist-packages/qiime/assign_taxonomy.py", line 117, in _parse_id_to_taxonomy_file
    identifier, taxonomy = map(strip, line.split('\t'))
ValueError: too many values to unpack

Is there something I am doing wrong over here?

Thank you
Shi Ming

TonyWalters

unread,
May 16, 2016, 6:20:30 AM5/16/16
to Qiime 1 Forum
Shi, I'm not sure why you're not using the 123 database that you downloaded already, but if you make your own database, the formatting for the taxonomy mapping file is particular, i.e., you only can have a single tab in the file between the sequence identifier and the taxonomy strings. See:
http://qiime.org/documentation/file_formats.html#id-to-taxonomy-map

Shi Ming Tan

unread,
May 16, 2016, 10:00:52 PM5/16/16
to Qiime 1 Forum
Dear Tony,

I am using the default SILVA 123 taxonomy file which I have downloaded from the SILVA website. I am not trying to create my own database here.

Attached are the input that I use for the assign_taxonomy.py.

Could you advice if I am doing anything wrong over here?

Thank You.
Shi Ming
representative_10.06.fasta
tax_slv_ssu_123.txt

TonyWalters

unread,
May 16, 2016, 10:13:29 PM5/16/16
to Qiime 1 Forum
I would suggest going back to the QIIME compatible database that you downloaded before-you can use blast assignments with that. Formatting and troubleshooting the taxonomy mapping files (i.e. making your own database) is a lot of work and time, and unless you're willing to learn how to write code, it's not something I would suggest.

The data you already downloaded from https://www.dropbox.com/s/ndkfgyy2n4yd0b4/SILVA123_QIIME_release.zip?dl=0 has representative sequences and taxonomy mapping files that you can use with assign_taxonomy.py. 

Shi Ming Tan

unread,
May 16, 2016, 10:34:32 PM5/16/16
to Qiime 1 Forum
Dear Tony,

Thanks for the dropbox.

I will just like to know more about this data, I assume you have downloaded it from SILVA and did some conversion to make it compatible with qiime? What did you do exactly?

I assume you did the silva to rdp conversion? Link: https://github.com/mikerobeson/Misc_Code/tree/master/SILVA_to_RDP

Was my assumption correct?

Best regards
Shi Ming

TonyWalters

unread,
May 17, 2016, 7:04:28 AM5/17/16
to Qiime 1 Forum
Yes, the files were downloaded and converted via multiple scripts. The files downloaded/conversions/etc are described in the Silva_123_notes.txt file.

Shi Ming Tan

unread,
May 18, 2016, 5:48:06 AM5/18/16
to Qiime 1 Forum
Thanks Tony!
Reply all
Reply to author
Forward
0 new messages