You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- posteriors of a Bayesian model fit stored in a data frame, where columns are parameters and rows are iterations. A wrapper function to extract the posterior exists for fits generated by [rstan](https://mc-stan.org/rstan) or [brms](https://paulbuerkner.com/brms) with the helper function extract_fit.R
24
+
18
25
```{r setup}
19
26
library(BayesVolcano)
20
27
```
28
+
```{r}
29
+
data("posterior")
30
+
head(posterior[,1:4])
31
+
```
32
+
33
+
- a data frame mapping parameter names to biological entities with at least a column named "parameter" and a column named "label". Additional columns can be provided that might be helpful for later visualization (can be categorical (here: group) or numerical (here:value))
34
+
35
+
```{r}
36
+
data("annotation_df")
37
+
head(annotation_df)
38
+
```
39
+
40
+
# Background
41
+
Bayesian models are used to estimate effect sizes (e.g., gene expression changes,
42
+
protein abundance differences, drug response effects) while accounting for uncertainty,
43
+
small sample sizes, and complex experimental designs.
44
+
However, Bayesian posteriors of models with many parameters are often difficult to interpret at a glance.
45
+
46
+
One way to quickly identify important biological changes based on frequentist analysis
47
+
are volcano plots (using fold-changes and p-values).
48
+
49
+
Bayesian volcano plots bring together the uncertainty aware power of Bayesian
50
+
models and the familiar visualization of volcano plots.
51
+
52
+
# Workflow
53
+
## Preparation of plotting dataframe
54
+
55
+
The prepare_volcano_df() function takes as input the posterior and the annotation
56
+
data frame. For every parameter listed in the annotation data frame the function
57
+
calculates one pi-value on basis of the following formula:
58
+
59
+
With *i* being one entity that was modeled, *param* the estimated parameter
60
+
and *t* the threshold for which to calculate the pi-value.
0 commit comments