stemangiola / tidySummarizedExperiment

Brings SummarizedExperiment to the tidyverse
23 stars 6 forks source link

Tidy operations with `tidySE` when `colData` and `rowData` share column names #76

Open stemangiola opened 1 year ago

eweine commented 1 year ago

Could you provide a reproducible example of this issue?

Thanks.

stemangiola commented 1 year ago

Could you provide a reproducible example of this issue?

Thanks.

Sure

devtools::install_github("stemangiola/tidybulk@dev")
library(tidybulk)
library(tidySummarizedExperiment)

tidybulk::se_mini |> select(days)

# Now we have days in the colData and days (covariate estimate) in the rowData
se = tidybulk::se_mini |> test_differential_abundance(~ days + (1 | condition), method = "glmmSeq_lme4", cores = 10)

# Here we see that .x and .y are added to days
se |> select(days.x, days.y)

# Here, it freaks out and just gives back rowData
se |> select(contains("days"))
eweine commented 1 year ago

Thanks! I'll try to fix the bug.

stemangiola commented 1 year ago

Thanks! I'll try to fix the bug.

Just to mention that this issue require a design proposal as the resolution of this behaviour requires some decisions and there are many ways to do it depending on the goals and priorities. :)

mikelove commented 3 months ago

mutate_features and mutate_samples are one workaround here.

https://github.com/stemangiola/tidySummarizedExperiment/pull/94