mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-11-10 01:24:41 +00:00
Implement advanced primer search filtering and reference handling
This update introduces new configuration options for pair selection, including multi-match filtering, circularity settings, and reference site validation. It also enhances the search functionality to correctly identify and track repeated sequences and reference locations, improving the accuracy of primer pair identification.
This commit is contained in:
1 parent
c156f11947
commit
57c2517b24
15 files changed
+2041
-9
No files matched your search
@@ -106,3 +106,18 @@ func LoadCorpus(seqs obiiter.IBioSequence, sel Selection) (*Corpus, error) {
|
||||
}
|
||||
return c, nil
|
||||
}
|
||||
|
||||
// IndexOfExample returns the index of the example sequence with the given
|
||||
// identifier. It is an error if there is none, or if the sequence is a
|
||||
// counterexample.
|
||||
func (c *Corpus) IndexOfExample(id string) (int, error) {
|
||||
for i, s := range c.Seqs {
|
||||
if s.Id() == id {
|
||||
if c.Roles[i] != Example {
|
||||
return -1, fmt.Errorf("obiprimer: reference sequence %q is a counterexample, it must be an example", id)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
}
|
||||
return -1, fmt.Errorf("obiprimer: reference sequence %q is not among the selected example sequences", id)
|
||||
}
|
||||
Reference in new issue
Block a user