updated docs for the logo functions and tested all of them again
This commit is contained in:
parent
2f7f40efb1
commit
7317156bba
5 changed files with 135 additions and 80 deletions
|
@ -1,46 +1,52 @@
|
|||
#logo plots
|
||||
# Input:
|
||||
# Data:
|
||||
# plot_df: merged_df3 containing the OR column to use as y-axis or any other relevant column
|
||||
|
||||
# create functions
|
||||
# x_axis_colname = "position"
|
||||
# y_axis_colname = "or_mychisq"
|
||||
# symbol_colname = "mutant_type"
|
||||
# y_axis_log = F
|
||||
# log_value = log10
|
||||
# if used, y-axis label has "Log" appended to it
|
||||
|
||||
# one with OR
|
||||
# --> select/drop down option to remove empty positions
|
||||
# --> select/drop down option for colour
|
||||
# --> if clustalx and taylor, set variable to black bg + white font
|
||||
# --> if chemistry and hydrophobicity, then grey bg + black font
|
||||
# my_logo_col = c("chemistry", "hydrophobicity", "clustalx", "taylor")
|
||||
# --> if clustalx and taylor, set variable to black bg + white font
|
||||
# --> if chemistry and hydrophobicity, then grey bg + black font
|
||||
|
||||
# --> select/drop down option for log scale
|
||||
# --> should include WT
|
||||
# rm_empty_y = F
|
||||
# option to remove empty positions i.e positions with no assocaited y-val
|
||||
|
||||
# one for multiple muts
|
||||
# --> select/drop down option to filter count of nsSNPs
|
||||
# --> select/drop down option for colour
|
||||
# --> should include WT
|
||||
# y_axis_log = F
|
||||
# option to use log scale
|
||||
# FIXME Minor bug: if used with rm_empty_y, sometimes the labels are too small to render(!?)
|
||||
# so positions appear empty despite having y-vals
|
||||
|
||||
# ...other params
|
||||
|
||||
# Returns: Logo plot from combined data containing specific y-value such as OR, etc by position.
|
||||
|
||||
# TODO: SHINY
|
||||
# select/drop down option to remove empty positions
|
||||
# select/drop down option for colour
|
||||
# select/drop down option for log scale
|
||||
# include WT
|
||||
|
||||
# Make it hover over position and then get the corresponding data table!
|
||||
#%%======================================================================
|
||||
########################a###########################################################
|
||||
|
||||
|
||||
#==================
|
||||
# logo data: OR
|
||||
#==================
|
||||
# NOTE: my_logo_col
|
||||
# Can be one of these: 'chemistry', 'hydrophobicity', 'clustalx', 'taylor'
|
||||
# if 'chemistry' or 'hydrophobicity' --> then bg is grey with black font (x, y and labels)
|
||||
# if 'clustalx'or 'taylor' --> then bg is black with white font (x, y and labels)
|
||||
#, theme_bgc =
|
||||
#, xfont_bgc =
|
||||
#, yfont_bgc =
|
||||
#, xtt_col =
|
||||
#, ytt_col =
|
||||
|
||||
LogoPlotCustomH <- function(plot_df
|
||||
, x_axis_colname = "position"
|
||||
, y_axis_colname = "or_mychisq"
|
||||
, symbol_colname = "mutant_type"
|
||||
, my_logo_col = "chemistry"
|
||||
, rm_empty_y = F
|
||||
, y_axis_log = F
|
||||
, log_value = log10
|
||||
, y_axis_increment = 5
|
||||
, rm_empty_y = F
|
||||
, my_logo_col = "chemistry"
|
||||
, x_lab = "Position"
|
||||
, y_lab = "Odds Ratio"
|
||||
, x_ats = 12 # text size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue