tidyomics / genomics-todos

0 stars 0 forks source link

`plyranges`: provide convenience function `add_num_overlaps` which combines `mutate` and `count_overlaps` #13

Closed mikelove closed 6 months ago

mikelove commented 10 months ago

See discussion on #tidiness_in_bioc

E.g. from @stemangiola

x |>
  left_join(y, by = join_by(chromosome, overlaps(x_lower, x_upper, y_lower, y_upper))) |>
  count(chr, x_lower, x_upper, name = "number_of_overlaps")

https://stackoverflow.com/questions/76404727/the-usage-of-the-key-word-within-and-overlaps-in-join-by

mikelove commented 6 months ago

I'm rethinking if this is needed. Only if we want to drop all use of %>%, but there are plenty of use cases beyond this one.