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,8 +1,46 @@
|
|||
#####################################################################################
|
||||
# LogoPlotMSA():
|
||||
# Input:
|
||||
# Data:
|
||||
# msaSeq_mut: MSA chr vector for muts
|
||||
# msaSeq_wt: MSA chr vector for wt
|
||||
|
||||
# Logo type params:
|
||||
# logo_type = c("EDLogo", "bits_pfm", "probability_pfm", "bits_raw", "probability_raw")
|
||||
# EDLogo: calculated from the Logolas package based on PFM matrix (scaled).
|
||||
#The required content from the package is sourced locally within 'my_logolas.R'
|
||||
# bits_pfm: Information Content based on PFM scaled matrix (my_logolas.R)
|
||||
# probability_pfm: Probability based on PFM scaled matrix (my_logolas.R)
|
||||
# bits_raw: Information Content based on Raw MSA (ggseqlogo)
|
||||
# probability_raw: Probability based on Raw MSA (ggseqlogo)
|
||||
|
||||
# EDScore_type = c("log", log-odds", "diff", "probKL", "ratio", "unscaled_log", "wKL")
|
||||
# bg_prob: background probability, default is equal i.e NULL.
|
||||
# This is used by the internal call to DataED_PFM(). This func takes thse args. I have used it here for
|
||||
# completeness and allow nuanced plot control
|
||||
|
||||
# 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
|
||||
|
||||
# ...other params
|
||||
|
||||
# Returns: Logo plots from MSA both mutant and wt (for comparability)
|
||||
# For my case, I always use it as it helps see what is at the wild-type already!
|
||||
|
||||
# TODO: SHINY
|
||||
# drop down: logo_type
|
||||
# drop down: ED score type
|
||||
# drop down/enter field : bg probability (in the actual plot function!)
|
||||
# drop down: my_logo_col
|
||||
# Make it hover over position and then get the corresponding data table!
|
||||
###################################################################################
|
||||
|
||||
|
||||
###########################################
|
||||
LogoPlotMSA <- function(msaSeq_mut # chr vector
|
||||
, msaSeq_wt # chr vector
|
||||
#, msa_method = c("custom") # can be "bits", "probability" or "custom"
|
||||
, logo_type = c("EDLogo") #"bits_pfm", "probability_pfm", "bits_raw", "probability_raw") # can be "bits", "probability" or "custom"
|
||||
, logo_type = c("EDLogo") #"bits_pfm", "probability_pfm", "bits_raw", "probability_raw")
|
||||
, EDScore_type = c("log") # see if this relevant, or source function should have it!
|
||||
, bg_prob = NULL
|
||||
, my_logo_col = "chemistry"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue