LSHTM_analysis/config/alr.R

112 lines
3.7 KiB
R

gene = "alr"
drug = "cycloserine"
#==========
# LIGPLUS
#===========
aa_ligplus_dcs = c(66, 64, 70, 112, 196
, 236, 237, 252, 253
, 254, 255, 388)
aa_ligplus_dcs_hbond = c(255, 254, 237, 66, 196)
aa_ligplus_dcs_other = aa_ligplus_dcs[!aa_ligplus_dcs%in%aa_ligplus_dcs_hbond]
c1 = length(aa_ligplus_dcs_other) == length(aa_ligplus_dcs) - length(aa_ligplus_dcs_hbond)
#==========
# PLIP
#===========
aa_plip_dcs = c(66, 70, 112, 196, 237
, 252, 254, 255, 295
, 314, 343)
aa_plip_dcs_hbond = c(66, 70, 196, 237
, 252, 254, 255, 295
, 314, 343)
aa_plip_dcs_other = aa_plip_dcs[!aa_plip_dcs%in%aa_plip_dcs_hbond]
c2 = length(aa_plip_dcs_other) == length(aa_plip_dcs) - length(aa_plip_dcs_hbond)
#==========
# Arpeggio
#===========
aa_arpeg_dcs = c(64, 66, 70, 112, 157, 164
, 194, 196, 200, 236, 237, 252, 253
, 254, 255, 256, 295, 314, 342, 343
, 344, 386, 388)
aa_arpeg_dcs_other = aa_arpeg_dcs[!aa_arpeg_dcs%in%c(aa_ligplus_dcs_other
, aa_plip_dcs_other)]
c3 = length(aa_arpeg_dcs_other) == length(aa_arpeg_dcs) - ( length(aa_ligplus_dcs_other) + length(aa_plip_dcs_other) )
#######################################################################
#===============
# Active site aa
#===============
active_aa_pos = sort(unique(c(aa_ligplus_dcs
, aa_plip_dcs
, aa_arpeg_dcs)))
#=================
# Drug binding aa
#=================
aa_pos_dcs = sort(unique(c(aa_ligplus_dcs
, aa_plip_dcs
, aa_arpeg_dcs)))
aa_pos_drug = aa_pos_dcs
#===============
# Hbond aa
#===============
aa_pos_dcs_hbond = sort(unique(c(aa_ligplus_dcs_hbond
, aa_plip_dcs_hbond)))
#=======================
# Other interactions aa
#=======================
aa_pos_dcs_other = active_aa_pos[!active_aa_pos%in%aa_pos_dcs_hbond]
c3 = length(aa_pos_dcs_other) == length(active_aa_pos) - length(aa_pos_dcs_hbond)
#######################################################################
if ( all(c1, c2, c3) ) {
cat("\nPASS:All active site residues and interctions checked and identified for"
, "\ngene:", gene
, "\ndrug:", drug
, "\n==================================================="
, "\nActive site residues for:", length(active_aa_pos)
, "\n==================================================="
, "\n"
, active_aa_pos
, "\n=================================================="
, "\nDrug binding residues:", length(aa_pos_drug)
, "\n==================================================="
, "\n"
#, aa_pos_dcs
, aa_pos_drug
, "\n==================================================="
, "\nHbond residues:", length(aa_pos_dcs_hbond)
, "\n==================================================="
, "\n"
, aa_pos_dcs_hbond
, "\n=================================================="
, "\nOther interaction residues:", length(aa_pos_dcs_other)
, "\n==================================================="
, "\n"
, aa_pos_dcs_other
, "\n\nNO other co-factors or ligands present\n")
}
#######################################################################
# FIXME: these should be populated!
aa_pos_lig1 = NULL
aa_pos_lig2 = NULL
aa_pos_lig3 = NULL
tile_map=data.frame(tile=c("ALR","DSL","CDL","Ca"),
tile_colour=c("green","darkslategrey","navyblue","purple"))