mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 08:40:26 +00:00
Adds the command obimultiplex
This commit is contained in:
@@ -61,11 +61,13 @@ func (sequence *BioSequence) Recycle() {
|
||||
|
||||
pseq := sequence.sequence
|
||||
|
||||
RecycleSlice(pseq.sequence)
|
||||
RecycleSlice(pseq.feature)
|
||||
RecycleSlice(pseq.feature)
|
||||
if pseq != nil {
|
||||
RecycleSlice(pseq.sequence)
|
||||
RecycleSlice(pseq.feature)
|
||||
RecycleSlice(pseq.feature)
|
||||
|
||||
RecycleAnnotation(pseq.annotations)
|
||||
RecycleAnnotation(pseq.annotations)
|
||||
}
|
||||
|
||||
sequence.sequence = nil
|
||||
}
|
||||
@@ -132,9 +134,14 @@ func (s BioSequence) HasAnnotation() bool {
|
||||
}
|
||||
|
||||
func (s BioSequence) Annotations() Annotation {
|
||||
if s.sequence == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if s.sequence.annotations == nil {
|
||||
s.sequence.annotations = GetAnnotation()
|
||||
}
|
||||
|
||||
return s.sequence.annotations
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,12 @@ var BioSequenceAnnotationPool = sync.Pool{
|
||||
}
|
||||
|
||||
func RecycleAnnotation(a Annotation) {
|
||||
for k := range a {
|
||||
delete(a, k)
|
||||
if a != nil {
|
||||
for k := range a {
|
||||
delete(a, k)
|
||||
}
|
||||
BioSequenceAnnotationPool.Put(&(a))
|
||||
}
|
||||
BioSequenceAnnotationPool.Put(&(a))
|
||||
}
|
||||
|
||||
func GetAnnotation(values ...Annotation) Annotation {
|
||||
|
||||
Reference in New Issue
Block a user