Description of feature
I find myself writing start_new, end_new = (start+end)//2-2114//2, (start+end)//2+2114//2 a lot to resize individual regions on the fly. Having something in crested.utils that can take any input ('chr:start-end', 'chr:start-end:strand', (chr, start, end), (chr, start, end, strand)) and a new size and just give you the resized version would be very nice.
I know there's a larger resizing function somewhere for an entire list of regions (but I think it's a submodule utils file somewhere), so that's perhaps worth cleaning up and making more general too? I believe we also just run some on-the-fly apply functions in certain places, so ideally that should all be packaged in one larger vectorized function. But I guess that's a separate subissue.
Description of feature
I find myself writing
start_new, end_new = (start+end)//2-2114//2, (start+end)//2+2114//2a lot to resize individual regions on the fly. Having something incrested.utilsthat can take any input ('chr:start-end','chr:start-end:strand',(chr, start, end),(chr, start, end, strand)) and a new size and just give you the resized version would be very nice.I know there's a larger resizing function somewhere for an entire list of regions (but I think it's a submodule utils file somewhere), so that's perhaps worth cleaning up and making more general too? I believe we also just run some on-the-fly apply functions in certain places, so ideally that should all be packaged in one larger vectorized function. But I guess that's a separate subissue.