Implement __getitem__ in ReferenceSequence
It would be nice to implement the things like
# What is the reference base at position 12345?
ts.reference_sequence[12345]
# What are the bases between position a and b?
ts.reference_sequence[a:b]
etc. Assuming the slices are reasonably small, this can be done efficiently by implementing the __getitem__ method, and either accessing the data via numpy arrays, or just implementing in the Python C layer.
In the future, we can implement the data fetching methodology from URLs in the background to implement these queries.
In general, I guess what we want to to present a str-like API, so that we generally regard the ts.reference_sequence instance as a unicode string, with some extra methods that let us figure out where it came from, etc.
One odd thing then though would be that __str__ would not return the string itself, but a useful summary.
It would actually be very helpful not to return the string. At the moment, when I have a whole chromosome reference sequence, if I print it to screen it can stall my python REPL / notebook cell. It would be preferable to show a truncated string.