more plot modifications dm and om plots mainly
This commit is contained in:
parent
4e6f10d1ba
commit
0234a8f77b
6 changed files with 501 additions and 358 deletions
|
@ -74,17 +74,23 @@ corr_data_extract <- function(df
|
|||
if (tolower(gene)%in%geneL_normal){
|
||||
colnames_to_extract = c(common_colnames)
|
||||
display_colnames = c(display_common_colnames)
|
||||
corr_df = df[,colnames_to_extract]
|
||||
colnames(corr_df) = display_colnames
|
||||
|
||||
}
|
||||
|
||||
if (tolower(gene)%in%geneL_ppi2){
|
||||
colnames_to_extract = c(common_colnames ,"mcsm_ppi2_affinity", ppi2Dist_colname)
|
||||
display_colnames = c(display_common_colnames,"mCSM-PPI2" , "PPI-Dist")
|
||||
corr_df = df[,colnames_to_extract]
|
||||
colnames(corr_df) = display_colnames
|
||||
}
|
||||
|
||||
if (tolower(gene)%in%geneL_na){
|
||||
colnames_to_extract = c(common_colnames,"mcsm_na_affinity", naDist_colname)
|
||||
display_colnames = c(display_common_colnames, "mCSM-NA", "NA-Dist")
|
||||
corr_df = df[,colnames_to_extract]
|
||||
colnames(corr_df) = display_colnames
|
||||
}
|
||||
|
||||
# [optional] arg: extract_scaled_cols
|
||||
|
@ -92,19 +98,23 @@ corr_data_extract <- function(df
|
|||
cat("\nExtracting scaled columns as well...\n")
|
||||
all_scaled_cols = colnames(merged_df3)[grep(".*scaled", colnames(merged_df3))]
|
||||
colnames_to_extract = c(colnames_to_extract, all_scaled_cols)
|
||||
|
||||
corr_df = df[,colnames_to_extract]
|
||||
colnames(corr_df) = display_colnames
|
||||
}else{
|
||||
colnames_to_extract = colnames_to_extract
|
||||
corr_df = df[,colnames_to_extract]
|
||||
colnames(corr_df) = display_colnames
|
||||
}
|
||||
|
||||
# extract df based on gene
|
||||
corr_df = df[,colnames_to_extract]
|
||||
colnames(corr_df)
|
||||
display_colnames
|
||||
|
||||
# arg: colnames_display_key
|
||||
colnames(corr_df)[colnames(corr_df)%in%colnames_to_extract] <- display_colnames
|
||||
colnames(corr_df)
|
||||
# WORKED:
|
||||
# # extract df based on gene
|
||||
# corr_df = df[,colnames_to_extract]
|
||||
# colnames(corr_df)
|
||||
# display_colnames
|
||||
#
|
||||
# # arg: colnames_display_key
|
||||
# colnames(corr_df)[colnames(corr_df)%in%colnames_to_extract] <- display_colnames
|
||||
# colnames(corr_df)
|
||||
|
||||
cat("\nExtracted ncols:", ncol(corr_df)
|
||||
,"\nRenaming successful")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue