Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GRangesEmpty added and major changes added. This newtype resolves man…
…y issues. - Added the GRangesEmpty newtype around `GRanges<R, ()>`. This was a major step forward. The reason for this type is that when the generic `GRanges<R, T>` object does not have a data container (i.e. `T = ()`, this *always* corresponds to the case where the range container `R` has ranges without indices. As such, working with the unwrapped "empty" `GRanges` object was a bit of a headache, since the developer would need to handle and link *two* types: `T = ()` and some sort of unindexed range. The newtype resolves this. - Added the `IntoGRangesRef` trait, which improves the ergonomics when writing functions that should work on both `GRanges` and `GRangesEmpty` objects. Also added `Into` methods for conversion from `GRangesEmpty` to `GRanges` objects. - With two different types now, it is possible to *properly* have the same method (without traits) for both `GRanges` and `GRangesEmpty` types. Thus, several methods like `from_iter_ranges_only()` and `push_range_with_data()` have been removed and replaced with unified method names `from_iter()` and `push_range` using the proper function for their type. - Added error for unsupported ranges format.
- Loading branch information