added adjusted p-values for DM muts comparison
This commit is contained in:
parent
bbec97b00c
commit
c59e3f178d
1 changed files with 28 additions and 1 deletions
|
@ -264,7 +264,34 @@ rows_to_remove = c("lineage2 vs lineage1", "lineage3 vs lineage1", "lineage3 vs
|
||||||
|
|
||||||
ks_df_combined_f = ks_df_combined[-match(rows_to_remove, ks_df_combined$group),]
|
ks_df_combined_f = ks_df_combined[-match(rows_to_remove, ks_df_combined$group),]
|
||||||
|
|
||||||
#=======================================================================
|
|
||||||
|
#======================
|
||||||
|
# P-value adjustments
|
||||||
|
#=======================
|
||||||
|
#%%
|
||||||
|
# add bonferroni adjustment as well
|
||||||
|
ks_df_combined_f$p_adj_bonferroni = p.adjust(ks_df_combined_f$ks_pvalue, method = "bonferroni")
|
||||||
|
|
||||||
|
ks_df_combined_f$signif_bon = ks_df_combined_f$p_adj_bonferroni
|
||||||
|
ks_df_combined_f = dplyr::mutate(ks_df_combined_f
|
||||||
|
, signif_bon = case_when(signif_bon == 0.05 ~ "."
|
||||||
|
, signif_bon <=0.0001 ~ '****'
|
||||||
|
, signif_bon <=0.001 ~ '***'
|
||||||
|
, signif_bon <=0.01 ~ '**'
|
||||||
|
, signif_bon <0.05 ~ '*'
|
||||||
|
, TRUE ~ 'ns'))
|
||||||
|
|
||||||
|
#add fdr as well
|
||||||
|
ks_df_combined_f$p_adj_fdr = p.adjust(ks_df_combined_f$ks_pvalue, method = "hommel")
|
||||||
|
ks_df_combined_f$signif_fdr = ks_df_combined_f$p_adj_fdr
|
||||||
|
ks_df_combined_f = dplyr::mutate(ks_df_combined_f
|
||||||
|
, signif_fdr = case_when(signif_fdr == 0.05 ~ "."
|
||||||
|
, signif_fdr <=0.0001 ~ '****'
|
||||||
|
, signif_fdr <=0.001 ~ '***'
|
||||||
|
, signif_fdr <=0.01 ~ '**'
|
||||||
|
, signif_fdr <0.05 ~ '*'
|
||||||
|
, TRUE ~ 'ns'))
|
||||||
|
#========================================================================================
|
||||||
#******************
|
#******************
|
||||||
# write output file: KS test
|
# write output file: KS test
|
||||||
#******************
|
#******************
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue