mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Xprize update
Former-commit-id: d38919a897961e4d40da3b844057c3fb94fdb6d7
This commit is contained in:
@ -66,3 +66,27 @@ func (taxonomy *Taxonomy) SetPath(sequence *obiseq.BioSequence) string {
|
||||
|
||||
return tpath
|
||||
}
|
||||
|
||||
func (taxonomy *Taxonomy) SetScientificName(sequence *obiseq.BioSequence) string {
|
||||
taxid, err := taxonomy.Taxon(sequence.Taxid())
|
||||
|
||||
if err != nil {
|
||||
log.Fatalf("Taxid %d not defined in the current taxonomy", sequence.Taxid())
|
||||
}
|
||||
|
||||
sequence.SetAttribute("scienctific_name", taxid.ScientificName())
|
||||
|
||||
return taxid.ScientificName()
|
||||
}
|
||||
|
||||
func (taxonomy *Taxonomy) SetTaxonomicRank(sequence *obiseq.BioSequence) string {
|
||||
taxid, err := taxonomy.Taxon(sequence.Taxid())
|
||||
|
||||
if err != nil {
|
||||
log.Fatalf("Taxid %d not defined in the current taxonomy", sequence.Taxid())
|
||||
}
|
||||
|
||||
sequence.SetAttribute("taxonomic_rank", taxid.Rank())
|
||||
|
||||
return taxid.Rank()
|
||||
}
|
||||
|
Reference in New Issue
Block a user