mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-11-09 17:24:41 +00:00
Introduce primer pair searching functionality
This change introduces the `obiprimers` command-line tool and a complete search pipeline for identifying primer pairs. It includes new data structures for pair evaluation, comprehensive search configuration options, and detailed CSV output handling for results.
This commit is contained in:
1 parent
1ab512ab5c
commit
c156f11947
9 files changed
+655
-6
No files matched your search
@@ -0,0 +1,41 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obidefault"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obioptions"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obiconvert"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obicsv"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obitools/obiprimers"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
)
|
||||
|
||||
func main() {
|
||||
optionParser := obioptions.GenerateOptionParser(
|
||||
"obiprimers",
|
||||
"designs the primer pairs amplifying a set of example sequences and evaluates the DNA barcode they delimit",
|
||||
obiprimers.OptionSet)
|
||||
|
||||
_, args := optionParser(os.Args)
|
||||
|
||||
if !obidefault.HasSelectedTaxonomy() {
|
||||
log.Fatal("you must indicate a taxonomy using the -t or --taxonomy option")
|
||||
}
|
||||
|
||||
sequences, err := obiconvert.CLIReadBioSequences(args...)
|
||||
if err != nil {
|
||||
log.Fatalf("Cannot open the sequence files: %v", err)
|
||||
}
|
||||
|
||||
pairs, err := obiprimers.CLIPrimerPairs(sequences)
|
||||
if err != nil {
|
||||
log.Fatalf("%v", err)
|
||||
}
|
||||
|
||||
obicsv.CLICSVWriter(obiprimers.PairsToCSVIterator(pairs), true)
|
||||
|
||||
obiutils.WaitForLastPipe()
|
||||
}
|
||||
Reference in new issue
Block a user