From 343f867eed1c24a75f3ff0739cda6cfbd1fe8818 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Thu, 2 Sep 2021 17:40:24 +0100 Subject: [PATCH] saving work for the day --- dynamut/split_csv.sh | 4 +++- scripts/functions/lf_bp.R | 8 +++++--- scripts/functions/test_lf_bp.R | 9 ++++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dynamut/split_csv.sh b/dynamut/split_csv.sh index b5f15f1..18103c6 100755 --- a/dynamut/split_csv.sh +++ b/dynamut/split_csv.sh @@ -1,6 +1,6 @@ #!/bin/bash -# FIXME: This is written for expediency to kickstart running dynamut and mcsm-NA +# FIXME: This is written for expediency to kickstart running dynamut, mcsm-PPI2 (batch pf 50) and mCSM-NA (batch of 20) # Usage: ~/git/LSHTM_analysis/dynamut/split_csv.sh # copy your snp file to split into the dynamut dir @@ -13,7 +13,9 @@ mkdir -p ${OUTDIR}/${CHUNK} cd ${OUTDIR}/${CHUNK} split ../../${INFILE} -l ${CHUNK} -d snp_batch_ +#split ${INFILE} -l ${CHUNK} -d snp_batch_ # use case #~/git/LSHTM_analysis/dynamut/split_csv.sh gid_mcsm_formatted_snps.csv snp_batches 50 #~/git/LSHTM_analysis/dynamut/split_csv.sh embb_mcsm_formatted_snps.csv snp_batches 50 +~/git/LSHTM_analysis/dynamut/split_csv.sh pnca_mcsm_formatted_snps.csv snp_batches 50 diff --git a/scripts/functions/lf_bp.R b/scripts/functions/lf_bp.R index 4677548..608247d 100644 --- a/scripts/functions/lf_bp.R +++ b/scripts/functions/lf_bp.R @@ -24,7 +24,7 @@ lf_bp <- function(lf_df , my_pts = 22 # plot title size) , make_boxplot = FALSE , bp_width = c("auto", 0.5) - , add_stats = FALSE + , add_stats = TRUE , stat_grp_comp = c("DM", "OM") , stat_method = "wilcox.test" , my_paired = FALSE @@ -104,8 +104,10 @@ lf_bp <- function(lf_df OutPlot = OutPlot + stat_compare_means(comparisons = my_comparisonsL , method = stat_method , paired = my_paired - , label = stat_label[1]) - } + , label = stat_label[2]) + return(OutPlot) + } + return(OutPlot) } diff --git a/scripts/functions/test_lf_bp.R b/scripts/functions/test_lf_bp.R index 42b78bf..f3d2327 100644 --- a/scripts/functions/test_lf_bp.R +++ b/scripts/functions/test_lf_bp.R @@ -12,9 +12,9 @@ source("../functions/lf_bp.R") ###################### # Make plot: ggplot ###################### -lf_bp(lf_df = lf_dynamut2 - , p_title = "Dynamut2" - , colour_categ = "ddg_dynamut2_outcome" +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" @@ -36,6 +36,9 @@ lf_bp(lf_df = lf_dynamut2 , 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 ######################