Patch a bug in obitag when some reference sequences have taxid absent from the taxonomy

This commit is contained in:
Eric Coissac
2025-03-27 16:45:02 +01:00
parent 2d52322876
commit 03b5ce9397
5 changed files with 27 additions and 11 deletions

View File

@ -27,7 +27,7 @@ type Taxon struct {
// Returns:
// - A formatted string representing the Taxon in the form "taxonomy_code:taxon_id [scientific_name]".
func (taxon *Taxon) String() string {
if taxon == nil {
if taxon == nil || taxon.Node == nil {
return "NA"
}
return taxon.Node.String(taxon.Taxonomy.code)