From ed28d3fb5bd0830378b8bd498037669229b04cc2 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Mon, 7 Jul 2025 15:35:26 +0200 Subject: [PATCH] Adds a --u-to-t option --- pkg/obioptions/version.go | 2 +- pkg/obitools/obiconvert/options.go | 9 +++++++++ pkg/obitools/obiconvert/sequence_reader.go | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/obioptions/version.go b/pkg/obioptions/version.go index b451e4a..605ac73 100644 --- a/pkg/obioptions/version.go +++ b/pkg/obioptions/version.go @@ -8,7 +8,7 @@ import ( // corresponds to the last commit, and not the one when the file will be // commited -var _Commit = "235a7e2" +var _Commit = "43b2855" var _Version = "Release 4.4.0" // Version returns the version of the obitools package. diff --git a/pkg/obitools/obiconvert/options.go b/pkg/obitools/obiconvert/options.go index 47b0a98..3776bdf 100644 --- a/pkg/obitools/obiconvert/options.go +++ b/pkg/obitools/obiconvert/options.go @@ -40,6 +40,8 @@ var __paired_file_name__ = "" var __full_file_batch__ = false +var __U_to_T = false + func InputOptionSet(options *getoptions.GetOpt) { // options.IntVar(&__skipped_entries__, "skip", __skipped_entries__, // options.Description("The N first sequence records of the file are discarded from the analysis and not reported to the output file.")) @@ -74,6 +76,9 @@ func InputOptionSet(options *getoptions.GetOpt) { options.Description("When several input files are provided, "+ "indicates that there is no order among them.")) + options.BoolVar(&__U_to_T, "u-to-t", __U_to_T, + options.Description("Convert Uracil to Thymine.")) + } func OutputModeOptionSet(options *getoptions.GetOpt, compressed bool) { @@ -239,6 +244,10 @@ func CLIPairedFileName() string { return __paired_file_name__ } +func CLIUtoT() bool { + return __U_to_T +} + func SetFullFileBatch() { __full_file_batch__ = true } diff --git a/pkg/obitools/obiconvert/sequence_reader.go b/pkg/obitools/obiconvert/sequence_reader.go index 48b8306..bc2759c 100644 --- a/pkg/obitools/obiconvert/sequence_reader.go +++ b/pkg/obitools/obiconvert/sequence_reader.go @@ -112,6 +112,7 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) { opts = append(opts, obiformats.OptionsBatchSize(obidefault.BatchSize())) opts = append(opts, obiformats.OptionsFullFileBatch(FullFileBatch())) + opts = append(opts, obiformats.OptionsUtoT(CLIUtoT())) if len(filenames) == 0 { log.Printf("Reading sequences from stdin in %s\n", CLIInputFormat())