Skip to content

Commit

Permalink
Merge pull request #562 from Ecogenomics/issue_561
Browse files Browse the repository at this point in the history
fix(Issue561): resolved issue with Unclassified assignments breaking …
  • Loading branch information
donovan-h-parks authored Nov 22, 2023
2 parents db28f9c + 0a7ff4a commit 445b740
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/gtdb_to_ncbi_majority_vote.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,11 @@ def ncbi_majority_vote(self,
remaining_gids = set(gtdbtk_assignments) - processed_gids
for gid in remaining_gids:
gtdb_taxa = gtdbtk_assignments[gid]

gtdb_sp_rid = gtdb_sp_to_rid[gtdb_taxa[SPECIES_IDX]]
ncbi_mv = ncbi_sp_classification[gtdb_sp_rid]
if gtdb_taxa[0].startswith('Unclassified'):
ncbi_mv = gtdb_taxa
else:
gtdb_sp_rid = gtdb_sp_to_rid[gtdb_taxa[SPECIES_IDX]]
ncbi_mv = ncbi_sp_classification[gtdb_sp_rid]

fout.write('{}\t{}\t{}\n'.format(
gid,
Expand Down

0 comments on commit 445b740

Please sign in to comment.