mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-13 18:50:26 +00:00
Add the -D (--delta) option to obipcr
Former-commit-id: 753079807faaddb23e03fd6350125bfa67f98c7f
This commit is contained in:
@@ -17,6 +17,7 @@ var _AllowedMismatch = 0
|
||||
var _MinimumLength = 0
|
||||
var _MaximumLength = -1
|
||||
var _Fragmented = false
|
||||
var _Delta = -1
|
||||
|
||||
// PCROptionSet defines every options related to a simulated PCR.
|
||||
//
|
||||
@@ -54,6 +55,9 @@ func PCROptionSet(options *getoptions.GetOpt) {
|
||||
options.Alias("L"),
|
||||
options.Required("You must indicate the maximum size of the amplicon (excluded primer length)"),
|
||||
options.Description("Maximum length of the barcode (primers excluded)."))
|
||||
options.IntVar(&_Delta, "delta", -1,
|
||||
options.Alias("D"),
|
||||
options.Description("Lenght of the sequence fragment to be added to the barcode extremities."))
|
||||
}
|
||||
|
||||
// OptionSet adds to the basic option set every options declared for
|
||||
@@ -119,3 +123,11 @@ func CLIMaxLength() int {
|
||||
func CLIFragmented() bool {
|
||||
return _Fragmented
|
||||
}
|
||||
|
||||
func CLIWithExtension() bool {
|
||||
return _Delta >= 0
|
||||
}
|
||||
|
||||
func CLIExtension() int {
|
||||
return _Delta
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ func CLIPCR(iterator obiiter.IBioSequence) (obiiter.IBioSequence, error) {
|
||||
opts = append(opts, obiapat.OptionMinLength(CLIMinLength()))
|
||||
}
|
||||
|
||||
if CLIWithExtension() {
|
||||
opts = append(opts, obiapat.OptionWithExtension(CLIExtension()))
|
||||
}
|
||||
|
||||
opts = append(opts, obiapat.OptionMaxLength(CLIMaxLength()))
|
||||
|
||||
if CLICircular() {
|
||||
|
||||
Reference in New Issue
Block a user