mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
First commit
This commit is contained in:
19
pkg/obiseq/join.go
Normal file
19
pkg/obiseq/join.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package obiseq
|
||||
|
||||
import "git.metabarcoding.org/lecasofts/go/oa2/pkg/goutils"
|
||||
|
||||
func (sequence BioSequence) Join(seq2 BioSequence, copy_annot bool) (BioSequence, error) {
|
||||
|
||||
new_seq := MakeEmptyBioSequence()
|
||||
new_seq.SetId(sequence.Id())
|
||||
new_seq.SetDefinition(sequence.Definition())
|
||||
|
||||
new_seq.Write(sequence.Sequence())
|
||||
new_seq.Write(seq2.Sequence())
|
||||
|
||||
if copy_annot {
|
||||
goutils.CopyMap(new_seq.Annotations(), sequence.Annotations())
|
||||
}
|
||||
|
||||
return new_seq, nil
|
||||
}
|
||||
Reference in New Issue
Block a user