The issue is about 0 based and 1 based interval schemes.
conventional annotation of nucleaotide sequences uses a 1 based, closed interval scheme
but popular programming languages today use a 0 based, left-closed, right-open interval scheme
Solution: distinguish the 0 based and 1 based interval scheme by using a different variable
name for 1 based starts.
Example:
sequence = "aattccgga"
gb_start = 2
start = gb_start - 1 # this is optional, of course.
end = 5
The issue is about 0 based and 1 based interval schemes.
Example: sequence = "aattccgga" gb_start = 2 start = gb_start - 1 # this is optional, of course. end = 5