Taxon name + percentage hit

Hi,

i’m attempting to assign my reads something like " Taxon_name (nn%) " to show how distant the reads are to the match.

my current plan is to take the outputs from:

  1. readname 2 taxonid → get the id as assigned by the LCA
  2. readname 2 taxonmatches → use the id to get the highest match % among hits
  3. taxonid list + taxonname list → reassign taxon name

i can probably do this with some R gymnastics, but i wonder if theres an obvious solution ive missed. basically i want columns:
Read Name | Taxon name | highest perc hit

EDIT: seems i cannot do this simply. there is an inconsistency with taxids in the IDList, and taxids in matches. basically the IDlist and Names are missing some entries.
I will have to find a way to collect taxon names from taxids elsewhere perhaps.

thoughts?
thanks.