Add the --number option to obiannotate

This commit is contained in:
Eric Coissac
2025-04-22 18:35:51 +02:00
parent a57cfda675
commit c0ecaf90ab
5 changed files with 78 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ var _cut = ""
var _taxonomicPath = false
var _withRank = false
var _withScientificName = false
var _withNumbering = false
func SequenceAnnotationOptionSet(options *getoptions.GetOpt) {
// options.BoolVar(&_addRank, "seq-rank", _addRank,
@@ -46,6 +47,10 @@ func SequenceAnnotationOptionSet(options *getoptions.GetOpt) {
options.Description("Adds attribute with seq_length as a key and sequence length as a value."),
)
options.BoolVar(&_withNumbering, "number", _withNumbering,
options.Description("Adds an attribute with seq_number as a key and an ordinal number starting from 1 as a value."),
)
options.StringVar(&_ahoCorazick, "aho-corasick", _ahoCorazick,
options.Description("Adds an aho-corasick attribut with the count of matches of the provided patterns."))
@@ -203,6 +208,10 @@ func CLIHasSetLengthFlag() bool {
return _setSeqLength
}
func CLIHasSetNumberFlag() bool {
return _withNumbering
}
func CLIHasClearAllFlag() bool {
return _clearAll
}