moved all test scripts for functions to tests/
This commit is contained in:
parent
2ee66c770b
commit
03031d2eb6
15 changed files with 162 additions and 776 deletions
58
scripts/functions/tests/test_lf_bp.R
Normal file
58
scripts/functions/tests/test_lf_bp.R
Normal file
|
@ -0,0 +1,58 @@
|
|||
setwd("~/git/LSHTM_analysis/scripts/plotting/")
|
||||
source("Header_TT.R")
|
||||
source("../functions/lf_bp.R")
|
||||
# ================================================
|
||||
# Data: run get_plotting_data.R
|
||||
# to get the long format data to test this function
|
||||
# drug = "streptomycin"
|
||||
# gene = "gid"
|
||||
# source("get_plotting_dfs.R")
|
||||
# ==================================================
|
||||
|
||||
######################
|
||||
# Make plot: ggplot
|
||||
######################
|
||||
lf_bp(lf_df = lf_encomddg
|
||||
, p_title = "ENCoM-DDG"
|
||||
, colour_categ = "ddg_encom_outcome"
|
||||
, x_grp = "mutation_info"
|
||||
, y_var = "param_value"
|
||||
, facet_var = "param_type"
|
||||
, n_facet_row = 1
|
||||
, y_scales = "free_y"
|
||||
, colour_bp_strip = "khaki2"
|
||||
, dot_size = 3
|
||||
, dot_transparency = 0.3
|
||||
, violin_quantiles = c(0.25, 0.5, 0.75)
|
||||
, my_ats = 22 # axis text size
|
||||
, my_als = 20 # axis label size
|
||||
, my_fls = 20 # facet label size
|
||||
, my_pts = 22 # plot title size
|
||||
, make_boxplot = F
|
||||
, bp_width = "auto"
|
||||
, add_stats = T
|
||||
, stat_grp_comp = c("DM", "OM")
|
||||
, stat_method = "wilcox.test"
|
||||
, my_paired = FALSE
|
||||
, stat_label = c("p.format", "p.signif") )
|
||||
|
||||
#wilcox.test(wf_encomdds$`EnCOM ΔΔS`[wf_encomdds$mutation_info == "DM"]
|
||||
# , wf_encomdds$`EnCOM ΔΔS`[wf_encomdds$mutation_info == "OM"])
|
||||
|
||||
######################
|
||||
# Make plot: plotly
|
||||
######################
|
||||
# FIXME: This labels are not working as I want!
|
||||
# lf_bp_plotly(lf_df = lf_deepddg
|
||||
# , p_title = "DeepDDG"
|
||||
# , colour_categ = "deepddg_outcome"
|
||||
# , x_grp = "mutation_info"
|
||||
# , y_var = "param_value"
|
||||
# , facet_var = "param_type"
|
||||
# , n_facet_row = 1
|
||||
# , y_scales = "free_y"
|
||||
# , colour_bp_strip = "khaki2"
|
||||
# , dot_size = 3
|
||||
# , dot_transparency = 0.3
|
||||
# , violin_quantiles = c(0.25, 0.5, 0.75)
|
||||
# )
|
Loading…
Add table
Add a link
Reference in a new issue