BioJulia / Bio.jl

[DEPRECATED] Bioinformatics and Computational Biology Infrastructure for Julia
http://biojulia.dev
MIT License
261 stars 65 forks source link

alternate name for `intersect` method? #470

Closed phaverty closed 7 years ago

phaverty commented 7 years ago

For a pair of IntervalCollections, intersect returns an iterator over all of the matches. I would expect it to subset the first collection to the elements present in the second. How about something like findoverlaps instead? It might also be nice to have a intersect method that does return the intersection too.

bicycle1885 commented 7 years ago

Agreed. Now the name is renamed as eachoverlap and intersect will be deprecated. findoverlaps is a good name but I think starting it with each is consistent with other iterator functions in the standard library (e.g. eachline).

phaverty commented 7 years ago

I like eachoverlap for the iterator too. findoverlaps sounds more like something that would return the whole list at once, like findin (which we probably don't want.) Thanks!

bicycle1885 commented 7 years ago

JFYI, https://github.com/BioJulia/GenomicFeatures.jl is already registered and eachoverlap is available.