Skip to content

Commit 78ea287

Browse files
committed
now retrieves data for all models and combines into one master table
1 parent e326850 commit 78ea287

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

manuscript/figure4ExVivoResults.Rmd

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,29 @@ print(plot)
6666
Full model predictions are stored on synapse as parquet files. Individual
6767
datasets can be downloaded via `getModelPredictionData` in
6868
`coderdataResultsFunctions.R` (sources during the setup process).
69-
```{r lgbm data import}
7069

71-
lgbm_all_preds <- getModelPredictionData(dset = "lgbm")
70+
Here we download data from all models, subset to only MPNST target predictions
71+
and combine the individual subsets into one master table.
72+
```{r predictions data import}
7273
73-
```
74+
tgt = 'mpnst'
7475
75-
```{r subsetting data}
76-
query <- lgbm_all_preds |>
77-
dplyr::filter(target == 'mpnst')
76+
all_preds <- do.call(
77+
rbind,
78+
lapply(
79+
models,
80+
function(mdl) getModelPredictionData(dset = mdl) |>
81+
dplyr::filter(target == tgt) |>
82+
collect()
83+
)
84+
)
7885
79-
mpnst_response_data <- query |> collect()
8086
```
8187

88+
8289
```{r}
83-
options(repr.plot.width = 5, repr.plot.height = 15)
84-
plot <- ggplot(mpnst_response_data, aes(x=auc_true, y=auc_pred)) + geom_point() + geom_smooth(method=lm) + facet_grid(source ~ .)
85-
ggsave('mpnst_auc_plot.pdf', plot, dpi=300, width=5, height=20)
90+
plot <- ggplot(all_preds, aes(x=auc_true, y=auc_pred)) + geom_point() + geom_smooth(method=lm) + facet_grid(source ~ model)
91+
print(plot)
92+
ggsave('mpnst_auc_plot.pdf', plot, dpi=300, width=20, height=20)
8693
```
8794

0 commit comments

Comments
 (0)