Skip to content

Commit 2ccb358

Browse files
Merge pull request #31 from jaclyn-taroni/kappa-summary
Add Kappa summary tables
2 parents af204c1 + 98b9c44 commit 2ccb358

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

3-plot_subtype_kappa.R

100644100755
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
source(file.path("util", "color_blind_friendly_palette.R"))
88

9+
`%>%` <- dplyr::`%>%`
910
library(ggplot2)
1011
library(data.table)
1112

@@ -77,3 +78,13 @@ for (cls in cls.methods) {
7778
theme(axis.text.x = element_text(angle = 45, vjust = 0.5))
7879
ggsave(plot.nm, plot = last_plot(), height = 3.5, width = 15)
7980
}
81+
82+
# get summary data.frame + write to file
83+
summary.df <-
84+
kappa.master.df %>%
85+
dplyr::group_by(Classifier, Normalization, Platform, Perc.seq) %>%
86+
dplyr::summarise(Median = median(Kappa),
87+
Mean = mean(Kappa),
88+
SD = sd(Kappa))
89+
readr::write_tsv(summary.df,
90+
file.path("results", "BRCA_train_3_models_summary_table.tsv"))

6-plot_recon_error_kappa.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ for (norm in norm.methods) {
8080
theme(axis.text.x=element_text(angle = 45, vjust = 0.5))
8181
ggsave(plot.nm, plot = last_plot(), height = 8.5, width = 11)
8282
}
83+
84+
# get summary data.frame + write to file
85+
kappa.summary.df <-
86+
kappa.master.df %>%
87+
dplyr::group_by(Classifier, Normalization, Platform, Perc.seq) %>%
88+
dplyr::summarise(Median = median(Kappa),
89+
Mean = mean(Kappa),
90+
SD = sd(Kappa))
91+
readr::write_tsv(kappa.summary.df,
92+
file.path(rcn.res.dir,
93+
"BRCA_kappa_reconstructed_data_summary_table.tsv"))
94+
8395
rm(kappa.master.df)
8496

8597
#### plot error measures -------------------------------------------------------

0 commit comments

Comments
 (0)