-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dorothea regulons in viper format
- Loading branch information
1 parent
1af8476
commit 9c3370b
Showing
19 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
data/dorothea_benchmark/regulons/convert_df_to_viper_format.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# This script intents to translate dorothea's data table to the format | ||
# required by viper format | ||
library(tidyverse) | ||
source("src/dorothea_analysis.R") | ||
|
||
dest_path = "data/dorothea_benchmark/regulons/regulons_in_viper_format" | ||
confidence_level_combi = c("A", "B", "C", "D", "E", | ||
"AB", "ABC", "ABCD", "ABCDE") | ||
# human | ||
h = read_csv("data/dorothea_benchmark/regulons/dorothea_regulon_human_v1.csv") | ||
|
||
map(confidence_level_combi, function(c) { | ||
# dissect confidence level combinations | ||
splitted_c = c %>% str_split(pattern = "") %>% pluck(1) | ||
|
||
# transform data table to viper format | ||
viper_format = h %>% | ||
filter(confidence %in% splitted_c) %>% | ||
df2regulon() | ||
|
||
# construct save name path | ||
save_name = str_c("dorothea_human_", c, "_viper_format.rds") | ||
save_path = file.path(dest_path, save_name) | ||
saveRDS(viper_format, save_path) | ||
}) | ||
|
||
|
||
# mouse | ||
m = read_csv("data/dorothea_benchmark/regulons/dorothea_regulon_mouse_v1.csv") | ||
|
||
map(confidence_level_combi, function(c) { | ||
# dissect confidence level combinations | ||
splitted_c = c %>% str_split(pattern = "") %>% pluck(1) | ||
|
||
# transform data table to viper format | ||
viper_format = m %>% | ||
filter(confidence %in% splitted_c) %>% | ||
df2regulon() | ||
|
||
# construct save name path | ||
save_name = str_c("dorothea_mouse_", c, "_viper_format.rds") | ||
save_path = file.path(dest_path, save_name) | ||
saveRDS(viper_format, save_path) | ||
}) |
Binary file added
BIN
+1.89 MB
...orothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_ABCDE_viper_format.rds
Binary file not shown.
Binary file added
BIN
+108 KB
...dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_ABCD_viper_format.rds
Binary file not shown.
Binary file added
BIN
+61 KB
.../dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_ABC_viper_format.rds
Binary file not shown.
Binary file added
BIN
+26.7 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_AB_viper_format.rds
Binary file not shown.
Binary file added
BIN
+21.1 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_A_viper_format.rds
Binary file not shown.
Binary file added
BIN
+5.65 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_B_viper_format.rds
Binary file not shown.
Binary file added
BIN
+33.4 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_C_viper_format.rds
Binary file not shown.
Binary file added
BIN
+47.4 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_D_viper_format.rds
Binary file not shown.
Binary file added
BIN
+1.77 MB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_human_E_viper_format.rds
Binary file not shown.
Binary file added
BIN
+1.63 MB
...orothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_ABCDE_viper_format.rds
Binary file not shown.
Binary file added
BIN
+90.4 KB
...dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_ABCD_viper_format.rds
Binary file not shown.
Binary file added
BIN
+61.3 KB
.../dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_ABC_viper_format.rds
Binary file not shown.
Binary file added
BIN
+27.3 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_AB_viper_format.rds
Binary file not shown.
Binary file added
BIN
+21.6 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_A_viper_format.rds
Binary file not shown.
Binary file added
BIN
+5.67 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_B_viper_format.rds
Binary file not shown.
Binary file added
BIN
+32.8 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_C_viper_format.rds
Binary file not shown.
Binary file added
BIN
+29.7 KB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_D_viper_format.rds
Binary file not shown.
Binary file added
BIN
+1.54 MB
data/dorothea_benchmark/regulons/regulons_in_viper_format/dorothea_mouse_E_viper_format.rds
Binary file not shown.