Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using script on custom database #1

Open
javiercnav opened this issue Feb 6, 2019 · 1 comment
Open

using script on custom database #1

javiercnav opened this issue Feb 6, 2019 · 1 comment

Comments

@javiercnav
Copy link

Hi Joe, I am trying to use the script to assign taxonomy to some 18S sequences. For this, I have generated my own blast database from a blast search of first 10 hits for each of my sequences and tax file that connects my blast database sequences with their taxonomy.
My tax database has been curated to have 7 levels only k,p,c,o,f,g,s...

I tried to run the script and I get this message:
Traceback (most recent call last):
File "taxonomy_assignment_BLAST_V2.py", line 340, in
best_level_taxonomy, blast_percent = Assign_Taxonomy(current_query, current_best_hits)
File "taxonomy_assignment_BLAST_V2.py", line 288, in Assign_Taxonomy
s.add(j[i])
IndexError: list index out of range

Could it be that the script is not recognizing the categories in my tax file?

blast_output_custom_format.txt
log_file.txt

@PandengWang
Copy link

Hi, I encountered the same problem.
The solution is as follows:

taxonomy_categories = ['superkingdom', 'subkingdom', 'sub_subkingdom', 'kingdom', 'tmp1', 'tmp2', 'phylum', 'class', 'family', 'genus', 'species', 'tmp3', 'tmp4','tmp5', 'tmp6']
uncultured_cutoff_level = len(taxonomy_categories)
species_level = 14
family_level = 10
phylum_level = 7
taxonomy_to_grab = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]

Above codes should be changed according to you taxonomy file

taxonomy_categories = ['kingdom', 'phylum', 'class', 'order', 'family', 'genus', 'species']
uncultured_cutoff_level = len(taxonomy_categories)
species_level = 6
family_level = 5
phylum_level = 1
taxonomy_to_grab = [0,1,2,3,4,5,6]

Long time has passed. Hope this comment is still useful for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants