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

@ -333,6 +333,9 @@ func _Pcr(seq ApatSequence,
annot["reverse_primer"] = reverse.String()
match, _ = seq.pointer.reference.Subsequence(rm[0], rm[1], opt.pointer.circular)
if match == nil {
log.Fatalf("error in extracting sequence from reference: %d:%d (%v)\n", rm[0], rm[1], opt.pointer.circular)
}
match = match.ReverseComplement(true)
annot["reverse_match"] = match.String()
match.Recycle()