mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
Patch a bug in Subsequence and adds few unit tests.
Former-commit-id: caddc9ad6523e4ef02899bfe83cc8681ef674383
This commit is contained in:
@@ -111,6 +111,28 @@ func NewBioSequence(id string,
|
||||
return bs
|
||||
}
|
||||
|
||||
// NewBioSequenceWithQualities creates a new BioSequence object with the given id, sequence, definition, and qualities.
|
||||
//
|
||||
// Parameters:
|
||||
// - id: the id of the BioSequence.
|
||||
// - sequence: the sequence data of the BioSequence.
|
||||
// - definition: the definition of the BioSequence.
|
||||
// - qualities: the qualities data of the BioSequence.
|
||||
//
|
||||
// Returns:
|
||||
// - *BioSequence: a pointer to the newly created BioSequence object.
|
||||
func NewBioSequenceWithQualities(id string,
|
||||
sequence []byte,
|
||||
definition string,
|
||||
qualities []byte) *BioSequence {
|
||||
bs := NewEmptyBioSequence(0)
|
||||
bs.SetId(id)
|
||||
bs.SetSequence(sequence)
|
||||
bs.SetDefinition(definition)
|
||||
bs.SetQualities(qualities)
|
||||
return bs
|
||||
}
|
||||
|
||||
// Recycle recycles the BioSequence object.
|
||||
//
|
||||
// It decreases the count of in-memory sequences and increases the count of recycled sequences.
|
||||
|
||||
Reference in New Issue
Block a user