adde tests scripts for logoP and logoP_snp.R
This commit is contained in:
parent
f640087922
commit
0334188801
2 changed files with 53 additions and 0 deletions
28
scripts/functions/tests/test_logoP.R
Normal file
28
scripts/functions/tests/test_logoP.R
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
#source("~/git/LSHTM_analysis/config/gid.R")
|
||||
#source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
||||
|
||||
|
||||
LogoPlotCustomH (plot_df = merged_df3
|
||||
, x_axis_colname = "position"
|
||||
, y_axis_colname = "or_mychisq"
|
||||
, symbol_colname = "mutant_type"
|
||||
, y_axis_log = T
|
||||
, log_value = log10
|
||||
, rm_empty_pos = T
|
||||
, my_logo_col = 'chemistry'
|
||||
, x_lab = "Position"
|
||||
, y_lab = "Odds Ratio"
|
||||
, x_ats = 12 # text size
|
||||
, x_tangle = 90 # text angle
|
||||
, y_ats = 22
|
||||
, y_tangle = 0
|
||||
, x_tts = 19 # title size
|
||||
, y_tts = 22
|
||||
#, leg_pos = c(0.05,-0.12)
|
||||
, leg_pos = "top"
|
||||
, leg_dir = "horizontal"
|
||||
, leg_ts = 15 # leg text size
|
||||
, leg_tts = 16 # leg title size
|
||||
)
|
||||
|
25
scripts/functions/tests/test_logoP_snp.R
Normal file
25
scripts/functions/tests/test_logoP_snp.R
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
#source("~/git/LSHTM_analysis/config/gid.R")
|
||||
#source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
||||
|
||||
|
||||
LogoPlotSnps(plot_df = merged_df3
|
||||
, x_axis_colname = "position"
|
||||
, symbol_mut_colname = "mutant_type"
|
||||
, symbol_wt_colname = "mutant_type"
|
||||
, omit_snp_count = c(0)# can be 1, 2, etc.
|
||||
|
||||
, my_logo_col = "chemistry"
|
||||
, x_lab = "Position"
|
||||
, y_lab = "Count"
|
||||
, x_ats = 1 # text size
|
||||
, x_tangle = 90 # text angle
|
||||
, y_ats = 1
|
||||
, y_tangle = 0
|
||||
, x_tts = 20 # title size
|
||||
, y_tts = 20
|
||||
, leg_pos = "top" # can be top, left, right and bottom or c(0.8, 0.9)
|
||||
, leg_dir = "horizontal" #can be vertical or horizontal
|
||||
, leg_ts = 20 # leg text size
|
||||
, leg_tts = 16 # leg title size
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue