diff --git a/scripts/functions/consurfP.R b/scripts/functions/consurfP.R index 22bb054..f7e73f5 100644 --- a/scripts/functions/consurfP.R +++ b/scripts/functions/consurfP.R @@ -540,7 +540,7 @@ wideP_consurf <- function(plotdf } }else{ - cat("\nNo annotation for xvar requested") + cat("\nNo annotation for additional ligands on xvar requested") } #============================================== if (A_xvar_lig){ diff --git a/scripts/functions/logoP_msa.R b/scripts/functions/logoP_msa.R index fb198f6..48d2c0a 100644 --- a/scripts/functions/logoP_msa.R +++ b/scripts/functions/logoP_msa.R @@ -38,8 +38,9 @@ ########################################### -LogoPlotMSA <- function(msaSeq_mut # chr vector - , msaSeq_wt # chr vector +#LogoPlotMSA <- function(msaSeq_mut # chr vector +# , msaSeq_wt # chr vector +LogoPlotMSA <- function(unified_msa , 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 @@ -64,7 +65,12 @@ LogoPlotMSA <- function(msaSeq_mut # chr vector ) { - + # FIXME: Hack! + # msaSeq_mut=unified_msa[[1]] + # msaSeq_wt=unified_msa[[2]] + msaSeq_mut=unified_msa[['msa_seq']] + msaSeq_wt=unified_msa[['wt_seq']] + # Get PFM matrix for mut and wt MSA provided data_ed = DataED_PFM(msaSeq_mut , msaSeq_wt diff --git a/scripts/functions/logoP_or.R b/scripts/functions/logoP_or.R index f7e4c14..8db127f 100644 --- a/scripts/functions/logoP_or.R +++ b/scripts/functions/logoP_or.R @@ -65,6 +65,7 @@ LogoPlotCustomH <- function(plot_df ################################# # Data processing for logo plot ################################# + if (rm_empty_y){ plot_df = plot_df[!is.na(plot_df[y_axis_colname]),] cat("\nRemoving empty positions...\n") diff --git a/scripts/functions/logoP_snp.R b/scripts/functions/logoP_snp.R index 2917153..d07597e 100644 --- a/scripts/functions/logoP_snp.R +++ b/scripts/functions/logoP_snp.R @@ -54,7 +54,6 @@ LogoPlotSnps <- function(plot_df ############################################ # Data processing for logo plot for nsSNPS ############################################ - setDT(plot_df)[, mut_pos_occurrence := .N, by = .(eval(parse(text=x_axis_colname)))] table(plot_df[[x_axis_colname]]) diff --git a/scripts/plotting/logo_data_msa.R b/scripts/plotting/logo_data_msa.R index 3ed6b5a..79aea06 100644 --- a/scripts/plotting/logo_data_msa.R +++ b/scripts/plotting/logo_data_msa.R @@ -49,3 +49,12 @@ head(msa2) cat("\nLength of WT fasta:", nrow(msa2)) wt_seq = msa2$V1 head(wt_seq) + +#=========================== +# combine msa and wt seqs +#=========================== +# unified_msa = list(msa_seq +# , wt_seq) + +unified_msa = list(msa_seq = msa_seq + , wt_seq = wt_seq)