This commit is contained in:
mercierc
2021-06-01 09:09:16 +12:00
parent 6b7b0e3bd1
commit 9eb833a0af

View File

@ -45,7 +45,7 @@ def addOptions(parser):
metavar="<TAXID_TAG>",
default=b"TAXID",
help="Name of the tag to store the found taxid "
"(default: 'TAXID'.")
"(default: 'TAXID').")
group.add_argument('-n', '--taxon-name-tag',
action="store",
@ -53,7 +53,7 @@ def addOptions(parser):
metavar="<SCIENTIFIC_NAME_TAG>",
default=b"SCIENTIFIC_NAME",
help="Name of the tag giving the scientific name of the taxon "
"(default: 'SCIENTIFIC_NAME'.")
"(default: 'SCIENTIFIC_NAME').")
group.add_argument('-g', '--try-genus-match',
action="store_true", dest="addtaxids:try_genus_match",
@ -174,6 +174,7 @@ def run(config):
taxid_column[i] = taxon.taxid
found_count+=1
elif try_genus: # try finding genus or other parent taxon from the first word
#print(i, o_view[i].id)
taxon_name_sp = taxon_name.split(b" ")
taxon = taxo.get_taxon_by_name(taxon_name_sp[0], res_anc)
if taxon is not None: