Question: Get taxid information in blast output (issue using a python program)
0
gravatar for Darill
11 months ago by
Darill20
Darill20 wrote:

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 diamond python • 398 views
ADD COMMENTlink modified 11 months ago • written 11 months ago by Darill20

see also: Taxonomy Of Blast Hits

ADD REPLYlink written 11 months ago by Pierre Lindenbaum119k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 645 users visited in the last hour