This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get taxid information in blast output (issue using a python program)

Hi all, I actually found a go programme in python to get taxid information in a diamond (blast) output. Here is it: https://github.com/peterthorpe5/public_scripts/tree/master/Diamond_BLAST_add_taxonomic_info

But I actually have an issue when I try to run this programme after having followed all the steps, here is my script;

source /panhome/me//miniconda3/bin/activate
export PYTHONPATH=$PYTHONPATH:/panhome/me/miniconda3/lib/python3.6/site-packages
diamond_tab_output=/pandata/me/LEPIWASP/blast_database/matches.m8
Diamond_blast_to_taxid=/pandata/me/LEPIWASP/blast_database/public_scripts-master/Diamond_BLAST_add_taxonomic_info/Diamond_blast_to_taxid.py

taxid=/pandata/me/LEPIWASP/blast_database/gi_taxid_prot.dmp

categories=/pandata/me/LEPIWASP/blast_database/categories.dmp

names=/pandata/me/LEPIWASP/blast_database/names.dmp

description=/pandata/me/LEPIWASP/blast_database/acc_to_des.tab

$Diamond_blast_to_taxid -i $diamond_tab_output -t $taxid -c $categories -n $names -d $description -o outfile_sp1.tab

and here is the error message : I

NFO: Starting testing: Sat May 12 20:50:59 2018
Traceback (most recent call last):
  File "/pandata/me/LEPIWASP/blast_database/public_scripts-master/Diamond_BLAST_add_taxonomic_info/Diamond_blast_to_taxid.py", line 1034, in <module>
    logger)
  File "/pandata/me/LEPIWASP/blast_database/public_scripts-master/Diamond_BLAST_add_taxonomic_info/Diamond_blast_to_taxid.py", line 465, in parse_diamond_tab
    acc_to_tax_id = assign_taxon_to_dic(acc_taxid_prot)
  File "/pandata/me/LEPIWASP/blast_database/public_scripts-master/Diamond_BLAST_add_taxonomic_info/Diamond_blast_to_taxid.py", line 285, in assign_taxon_to_dic
    acc, acc_version, tax_id, GI = line.rstrip("\n").split()
ValueError: not enough values to unpack (expected 4, got 2)

Does someone has an idea where is my issue?

blast python diamond

0 answers

No answers yet.

Log in to answer this question.