generated embb lineage plots
This commit is contained in:
parent
c8f3ddf892
commit
d984d283c5
3 changed files with 208 additions and 64 deletions
|
@ -21,6 +21,47 @@ geneL_normal = c("pnca")
|
|||
geneL_na = c("gid", "rpob")
|
||||
geneL_ppi2 = c("alr", "embb", "katg", "rpob")
|
||||
|
||||
# LigDist_colname # from globals used
|
||||
# ppi2Dist_colname #from globals used
|
||||
# naDist_colname #from globals used
|
||||
|
||||
common_cols = c("mutationinformation"
|
||||
, "X5uhc_position"
|
||||
, "X5uhc_offset"
|
||||
, "position"
|
||||
, "dst_mode"
|
||||
, "mutation_info_labels"
|
||||
, "sensitivity", dist_columns )
|
||||
|
||||
|
||||
########################################
|
||||
categ_cols_to_factor = grep( "_outcome|_info", colnames(merged_df3) )
|
||||
fact_cols = colnames(merged_df3)[categ_cols_to_factor]
|
||||
|
||||
if (any(lapply(merged_df3[, fact_cols], class) == "character")){
|
||||
cat("\nChanging", length(categ_cols_to_factor), "cols to factor")
|
||||
merged_df3[, fact_cols] <- lapply(merged_df3[, fact_cols], as.factor)
|
||||
if (all(lapply(merged_df3[, fact_cols], class) == "factor")){
|
||||
cat("\nSuccessful: cols changed to factor")
|
||||
}
|
||||
}else{
|
||||
cat("\nRequested cols aready factors")
|
||||
}
|
||||
|
||||
cat("\ncols changed to factor are:\n", colnames(merged_df3)[categ_cols_to_factor] )
|
||||
|
||||
####################################
|
||||
# merged_df3: NECESSARY pre-processing
|
||||
###################################
|
||||
#df3 = merged_df3
|
||||
plot_cols = c("mutationinformation", "mutation_info_labels", "position", "dst_mode"
|
||||
, all_cols)
|
||||
|
||||
all_cols = c(common_cols
|
||||
, all_stability_cols
|
||||
, all_affinity_cols
|
||||
, all_conserv_cols)
|
||||
|
||||
|
||||
# counting
|
||||
foo = merged_df3[, c("mutationinformation"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue