Patch a bug in the subseq and revcomplement methods. That patchs the bug in the option -c of obipcr

Former-commit-id: 7999b917d07545271036af6e66f53aea27fc6e7b
This commit is contained in:
2024-03-11 10:54:37 +01:00
parent 8a2bbd1c3b
commit f4d71d4a66
3 changed files with 17 additions and 2 deletions

View File

@@ -43,6 +43,10 @@ func nucComplement(n byte) byte {
// The function returns the reverse complemented BioSequence.
func (sequence *BioSequence) ReverseComplement(inplace bool) *BioSequence {
if sequence == nil {
return nil
}
if !inplace {
sequence = sequence.Copy()
}