mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Adds the command obimultiplex
This commit is contained in:
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obipcr"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obimultiplex"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -24,11 +24,11 @@ func main() {
|
||||
// trace.Start(ftrace)
|
||||
// defer trace.Stop()
|
||||
|
||||
optionParser := obioptions.GenerateOptionParser(obipcr.OptionSet)
|
||||
optionParser := obioptions.GenerateOptionParser(obimultiplex.OptionSet)
|
||||
|
||||
_, args, _ := optionParser(os.Args)
|
||||
|
||||
sequences, _ := obiconvert.ReadBioSequencesBatch(args...)
|
||||
amplicons, _ := obipcr.PCR(sequences)
|
||||
amplicons, _ := obimultiplex.IExtractBarcodeBatches(sequences)
|
||||
obiconvert.WriteBioSequencesBatch(amplicons, true)
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ func main() {
|
||||
obipairing.MinOverlap(),
|
||||
obipairing.MinIdentity(),
|
||||
obipairing.WithStats(),
|
||||
obioptions.ParallelWorkers(),
|
||||
obioptions.CLIParallelWorkers(),
|
||||
)
|
||||
obiconvert.WriteBioSequencesBatch(paired, true)
|
||||
}
|
||||
|
@ -52,7 +52,18 @@ func main() {
|
||||
|
||||
file, _ := os.Open("sample/wolf_diet_ngsfilter.txt")
|
||||
xxx, _ := obiformats.ReadNGSFilter(file)
|
||||
xxx.Compile(2)
|
||||
fmt.Printf("%v\n==================\n", xxx)
|
||||
|
||||
fmt.Println(xxx)
|
||||
for pp, m := range xxx {
|
||||
fmt.Printf("%v %v\n", pp, *m)
|
||||
}
|
||||
|
||||
seqfile, _ := obiformats.ReadFastSeqFromFile("xxxx.fastq")
|
||||
|
||||
for seqfile.Next() {
|
||||
seq := seqfile.Get()
|
||||
barcode, _ := xxx.ExtractBarcode(seq, true)
|
||||
fmt.Println(obiformats.FormatFasta(barcode, obiformats.FormatFastSeqOBIHeader))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user