jeffsocal / tidyproteomics

An S3 data object and framework for common quantitative proteomic analyses
https://jeffsocal.github.io/tidyproteomics/
MIT License
36 stars 5 forks source link

Comparisons for multiple groups #12

Closed tywang-tw closed 1 year ago

tywang-tw commented 1 year ago

Hi Jeff,

I'd like to run the expression analysis for multiple comparisons such as the list below.

pairs <- list( c("exp1", "ctrl"), c("exp2", "ctrl"), c("exp3", "ctrl"), c("exp4", "ctrl"), ...)

Can you include some augments for this request? Thanks.

jeffsocal commented 1 year ago

Thank you for the suggestion. I created an option to allow for "pairs" exactly as you had pointed out for both expression() and enrichment(). This will first validate your pairs against the data to ensure those sample names exist, then it will iterate through each pair, saving the data back into the original data object. This is available in the v1.6.1 release.

data |> expression(.pairs = pairs) |> enrichment(pairs = pairs, .term = 'biological_process)