Skip to content

Commit

Permalink
Merge pull request #170 from ldecicco-USGS/master
Browse files Browse the repository at this point in the history
ACC instead of AC50
  • Loading branch information
ldecicco-USGS authored Dec 21, 2016
2 parents 5717980 + ff24fdc commit 173fabe
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 9 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: toxEval
Type: Package
Title: ToxCast Evaluations
Version: 0.2.5
Version: 0.2.6
Date: 2016-10-19
Authors@R: c( person("Steven", "Corsi", role = c("aut"),
email = "[email protected]"),
Expand All @@ -22,7 +22,7 @@ Imports:
tidyr,
DT (>= 0.1.24),
leaflet (>= 1.0.0),
ggplot2,
ggplot2 (>= 2.2.0),
gridExtra,
grid,
shiny,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export(AC10)
export(AC50gain)
export(AC50loss)
export(ACC)
export(chemSumm)
export(chemSummBasic)
export(endPointInfo)
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions R/toxEval.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ NULL
#' \item{AC10}{AC10 endpoints}
#'}
#'
#'@aliases AC50gain AC50loss AC10
#'@aliases AC50gain AC50loss AC10 ACC
#'@name Constants
#'@docType data
#'@export AC50gain AC50loss AC10
#'@export AC50gain AC50loss AC10 ACC
#'@keywords datasets
#'@examples
#'AC50GainColumns <- names(AC50gain)
Expand Down
Binary file removed inst/extdata/chemicalSummary_includesFlags.rds
Binary file not shown.
67 changes: 62 additions & 5 deletions inst/shiny/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -242,7 +299,7 @@ shinyServer(function(input, output,session) {
# )

if (input$data == "Water Sample"){
chemicalSummary <- readRDS(file.path(pathToApp,"chemicalSummary_includesFlags.rds"))
chemicalSummary <- readRDS(file.path(pathToApp,"chemicalSummary_ACC.rds"))
stationINFO <<- readRDS(file.path(pathToApp,"sitesOWC.rds"))
} else if (input$data == "Passive Samples"){
chemicalSummary <- readRDS(file.path(pathToApp,"chemicalSummaryPassive.rds"))
Expand Down Expand Up @@ -736,11 +793,11 @@ shinyServer(function(input, output,session) {
legend.background = element_rect(colour = 'black', fill = 'white'))
}

ymin <<- 10^(ggplot_build(lowerPlot)$panel$ranges[[1]]$y.range)[1]
ymax <<- 10^(ggplot_build(lowerPlot)$panel$ranges[[1]]$y.range)[2]
ymin <<- 10^(ggplot_build(lowerPlot)$layout$panel_ranges[[1]]$y.range)[1]
ymax <<- 10^(ggplot_build(lowerPlot)$layout$panel_ranges[[1]]$y.range)[2]

xmax <<- ggplot_build(lowerPlot)$panel$ranges[[1]]$x.range[2]
xmin <<- ggplot_build(lowerPlot)$panel$ranges[[1]]$x.range[1]
xmax <<- ggplot_build(lowerPlot)$layout$panel_ranges[[1]]$x.range[2]
xmin <<- ggplot_build(lowerPlot)$layout$panel_ranges[[1]]$x.range[1]

lowerPlot <- lowerPlot +
geom_text(data=data.frame(), aes(x=namesToPlot, y=ymin,label=nSamples),size=5) +
Expand Down
1 change: 1 addition & 0 deletions man/Constants.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 173fabe

Please sign in to comment.