#####################
# combining_two_df.R
#####################
orig_col ==> df_ncols
Mutationinformation ==> mutationinformation
Position ==> position
DUET_outcome ==> duet_outcome
Lig_outcome ==> ligand_outcome

infile ==> infile_params
in_filename_comb ==> in_filename_metadata
meta_with_afor ==> gene_metadata

#!!!!!!!!!
# FIXME: plotting_data.R
#!!!!!!!!!

# This script will be called by various plotting scripts.
# Ensure you can call this using command line args which are currently commented out

#####################
# basic_barplots_PS.R
#####################
dim(my_df)
416, 86

# unique mutations
dim(my_df_u)
403, 86

# all dups identified are destabilising
dups_df = 13 rows
11 unique muts

upos = unique(my_df_u$position)
145

df = my_df_u

df$duet_outcome

Destabilising   Stabilising 
          346           57 
                       
                       
                        # with dups
                        Destabilising   Stabilising 
                                  359            57 

table(df$pos_count)
# this is cummulative
#1   2   3   4   5   6 
#39  62  81 100  85  36 

                        # with dups
                          1   2   3   4   5   6   7 
                         39  60  75  92 100  36  14 

# use group by
table(snpsBYpos_df$snpsBYpos)
#1  2  3  4  5  6 
#39 31 27 25 17  6 

                         # with dups
                          1  2  3  4  5  6  7 
                          39 30 25 23 20  6  2 
                          
                          
                          
#======================
# dr and other muts count = PS
#======================   
dr_mutations_pyrazinamide : 227  
other_mutations_pyrazinamide : 197 
                                     
                                     
#======================
# suppl tables
#======================   

# sorted by position

cols_to_output = c("mutationinformation", "mutation_info", "af", "or_mychisq", "neglogpval_fisher", "or_kin", "neglog_pwald_kin"
, "duet_stability_change", "duet_outcome", "ligand_distance", "ligand_affinity_change", "ligand_outcome")

# remove the ligand distance plot from "other plots"
            
                      
