Add managment of the taxonomy alias politic

This commit is contained in:
Eric Coissac
2025-02-10 14:05:47 +01:00
parent e2563cd8df
commit 6a8061cc4f
16 changed files with 114 additions and 48 deletions

View File

@ -91,7 +91,7 @@ func loadNameTable(reader io.Reader, taxonomy *Taxonomy, onlysn bool) int {
if !onlysn || classname == "scientific name" {
n++
taxon, err := taxonomy.Taxon(taxid)
taxon, _, err := taxonomy.Taxon(taxid)
if err != nil {
log.Fatalf("%s: is unknown from the taxonomy", taxid)
@ -202,7 +202,7 @@ func LoadNCBITaxDump(directory string, onlysn bool) (*Taxonomy, error) {
n = loadMergedTable(buffered, taxonomy)
log.Printf("%d merged taxa read\n", n)
root, err := taxonomy.Taxon("1")
root, _, err := taxonomy.Taxon("1")
if err != nil {
log.Fatal("cannot find the root taxon (1) in the NCBI tax dump")