stemangiola / tidySummarizedExperiment

Brings SummarizedExperiment to the tidyverse
23 stars 6 forks source link

dplyr::arrange function? #62

Closed antagomir closed 2 years ago

antagomir commented 2 years ago

SE equivalent for dplyr::arrange seems to be missing. This would be a highly useful addition.

stemangiola commented 2 years ago

This function existed but I dropped it because arranging a SE object which is hierarchical is non-trivial, especially allowing arbitrary combinations on feature-wise sample-wise columns. Maybe we will think about a solution for simple cases.

For displaying data you can do

SE |> as_tibble() |> arrange()
antagomir commented 2 years ago

The tidySingleCellExperiment pkg seems to have arrange as well.

Cases where the se object would be arranged based on colData(se) fields in the same way as for simple data.frames are common. Serving this would be helpful for many but I can see the tension with a more generic solution.