From ff24fdca8f3f589ef7d27d30c557d9608da31687 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Wed, 21 Dec 2016 12:20:23 -0600 Subject: [PATCH] Change groups --- inst/shiny/server.R | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/inst/shiny/server.R b/inst/shiny/server.R index 5f39ebfc..c580113a 100644 --- a/inst/shiny/server.R +++ b/inst/shiny/server.R @@ -17,6 +17,63 @@ endPointInfo <- endPointInfo[!(endPointInfo$assay_source_name == "NVS" & endPoin endPointInfo <- endPointInfo[endPointInfo$assay_component_endpoint_name != "TOX21_p53_BLA_p3_ratio",] endPointInfo <- endPointInfo[endPointInfo$assay_component_endpoint_name != "TOX21_p53_BLA_p2_viability",] +endPointInfo$intended_target_family[endPointInfo$assay_component_endpoint_name %in% + c("CLD_CYP1A1_24hr","CLD_CYP1A1_48hr","CLD_CYP1A1_6hr", + "CLD_CYP1A2_24hr","CLD_CYP1A2_48hr","CLD_CYP1A2_6hr")] <- "dna binding" + +endPointInfo$intended_target_family_sub[endPointInfo$assay_component_endpoint_name %in% + c("CLD_CYP1A1_24hr","CLD_CYP1A1_48hr","CLD_CYP1A1_6hr", + "CLD_CYP1A2_24hr","CLD_CYP1A2_48hr","CLD_CYP1A2_6hr")] <- "basic helix-loop-helix protein" + +endPointInfo$intended_target_official_symbol[endPointInfo$assay_component_endpoint_name %in% + c("CLD_CYP1A1_24hr","CLD_CYP1A1_48hr","CLD_CYP1A1_6hr", + "CLD_CYP1A2_24hr","CLD_CYP1A2_48hr","CLD_CYP1A2_6hr")] <- "AhR" + +endPointInfo$intended_target_family[endPointInfo$assay_component_endpoint_name %in% + c("CLD_CYP2B6_24hr","CLD_CYP2B6_48hr","CLD_CYP2B6_6hr", + "CLD_CYP3A4_24hr","CLD_CYP3A4_48hr","CLD_CYP3A4_6hr", + "CLD_SULT2A_48hr","CLD_UGT1A1_48hr","NVS_NR_bER", + "NVS_NR_bPR","NVS_NR_cAR")] <- "nuclear receptor" + +endPointInfo$intended_target_family_sub[endPointInfo$assay_component_endpoint_name %in% + c("CLD_CYP2B6_24hr","CLD_CYP2B6_48hr","CLD_CYP2B6_6hr", + "CLD_CYP3A4_24hr","CLD_CYP3A4_48hr","CLD_CYP3A4_6hr", + "CLD_SULT2A_48hr","CLD_UGT1A1_48hr")] <- "non-steroidal" + +endPointInfo$intended_target_official_symbol[endPointInfo$assay_component_endpoint_name %in% + c("CLD_CYP2B6_24hr","CLD_CYP2B6_48hr","CLD_CYP2B6_6hr", + "CLD_SULT2A_48hr")] <- "NR1I3" + +endPointInfo$intended_target_official_symbol[endPointInfo$assay_component_endpoint_name %in% + c("CLD_CYP3A4_24hr","CLD_CYP3A4_48hr","CLD_CYP3A4_6hr", + "CLD_SULT2A_48hr")] <- "NR1I2" + +endPointInfo$intended_target_family[endPointInfo$assay_component_endpoint_name %in% + c("NVS_NR_bER", "NVS_NR_bPR","NVS_NR_cAR")] <- "steroidal" + +endPointInfo$intended_target_official_symbol[endPointInfo$assay_component_endpoint_name %in% + c("NVS_NR_bER", "NVS_NR_bPR","NVS_NR_cAR")] <- c("ESR","PGR","AR") + +endPointInfo$intended_target_family[endPointInfo$assay_component_endpoint_name %in% + c("Tanguay_ZF_120hpf_ActivityScore", + "Tanguay_ZF_120hpf_AXIS_up", + "Tanguay_ZF_120hpf_BRAI_up", + "Tanguay_ZF_120hpf_CFIN_up", + "Tanguay_ZF_120hpf_EYE_up", + "Tanguay_ZF_120hpf_JAW_up", + "Tanguay_ZF_120hpf_MORT_up", + "Tanguay_ZF_120hpf_OTIC_up", + "Tanguay_ZF_120hpf_PE_up", + "Tanguay_ZF_120hpf_PFIN_up", + "Tanguay_ZF_120hpf_PIG_up", + "Tanguay_ZF_120hpf_SNOU_up", + "Tanguay_ZF_120hpf_SOMI_up", + "Tanguay_ZF_120hpf_SWIM_up", + "Tanguay_ZF_120hpf_TR_up", + "Tanguay_ZF_120hpf_TRUN_up", + "Tanguay_ZF_120hpf_YSE_up")] <- "zebrafish" + + choicesPerGroup <- apply(endPointInfo, 2, function(x) length(unique(x[!is.na(x)]))) choicesPerGroup <- which(choicesPerGroup > 6 & choicesPerGroup < 100)