mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
Adds a reader for NGS filter files and change some API for the apat library
This commit is contained in:
1
pkg/obitools/obimultiplex/options.go
Normal file
1
pkg/obitools/obimultiplex/options.go
Normal file
@@ -0,0 +1 @@
|
||||
package obimultiplex
|
||||
@@ -10,12 +10,18 @@ import (
|
||||
// obiseq.BioSequenceBatch containing the selected amplicon sequences.
|
||||
func PCR(iterator obiseq.IBioSequenceBatch) (obiseq.IBioSequenceBatch, error) {
|
||||
|
||||
forward := ForwardPrimer()
|
||||
reverse := ReversePrimer()
|
||||
opts := make([]obiapat.WithOption, 0, 10)
|
||||
|
||||
opts = append(opts, obiapat.OptionForwardError(AllowedMismatch()),
|
||||
obiapat.OptionReverseError(AllowedMismatch()))
|
||||
opts = append(opts,
|
||||
obiapat.OptionForwardPrimer(
|
||||
ForwardPrimer(),
|
||||
AllowedMismatch(),
|
||||
),
|
||||
obiapat.OptionReversePrimer(
|
||||
ReversePrimer(),
|
||||
AllowedMismatch(),
|
||||
),
|
||||
)
|
||||
|
||||
if MinLength() > 0 {
|
||||
opts = append(opts, obiapat.OptionMinLength(MinLength()))
|
||||
@@ -29,7 +35,7 @@ func PCR(iterator obiseq.IBioSequenceBatch) (obiseq.IBioSequenceBatch, error) {
|
||||
opts = append(opts, obiapat.OptionCircular(Circular()))
|
||||
}
|
||||
|
||||
worker := obiapat.PCRSliceWorker(forward, reverse, opts...)
|
||||
worker := obiapat.PCRSliceWorker(opts...)
|
||||
|
||||
return iterator.MakeISliceWorker(worker), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user