Skip to content

Commit

Permalink
fix problem in biocCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
mengchen18 committed Mar 8, 2024
1 parent 2437fe0 commit 78a84e0
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: omicsViewer
Title: Interactive and explorative visualization of SummarizedExperssionSet or ExpressionSet using omicsViewer
Version: 1.7.9
Version: 1.7.10
Authors@R: person("Chen", "Meng", email = "mengchen18@gmail.com",
role = c("aut", "cre"))
Description: omicsViewer visualizes ExpressionSet (or SummarizedExperiment) in an interactive way. The omicsViewer has a separate back- and front-end. In the back-end, users need to prepare an ExpressionSet that contains all the necessary information for the downstream data interpretation. Some extra requirements on the headers of phenotype data or feature data are imposed so that the provided information can be clearly recognized by the front-end, at the same time, keep a minimum modification on the existing ExpressionSet object. The pure dependency on R/Bioconductor guarantees maximum flexibility in the statistical analysis in the back-end. Once the ExpressionSet is prepared, it can be visualized using the front-end, implemented by shiny and plotly. Both features and samples could be selected from (data) tables or graphs (scatter plot/heatmap). Different types of analyses, such as enrichment analysis (using Bioconductor package fgsea or fisher's exact test) and STRING network analysis, will be performed on the fly and the results are visualized simultaneously. When a subset of samples and a phenotype variable is selected, a significance test on means (t-test or ranked based test; when phenotype variable is quantitative) or test of independence (chi-square or fisher’s exact test; when phenotype data is categorical) will be performed to test the association between the phenotype of interest with the selected samples. Additionally, other analyses can be easily added as extra shiny modules. Therefore, omicsViewer will greatly facilitate data exploration, many different hypotheses can be explored in a short time without the need for knowledge of R. In addition, the resulting data could be easily shared using a shiny server. Otherwise, a standalone version of omicsViewer together with designated omics data could be easily created by integrating it with portable R, which can be shared with collaborators or submitted as supplementary data together with a manuscript.
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ importFrom(graphics,axis)
importFrom(graphics,barplot)
importFrom(graphics,image)
importFrom(graphics,legend)
importFrom(graphics,lines)
importFrom(graphics,mtext)
importFrom(graphics,par)
importFrom(graphics,plot)
Expand Down Expand Up @@ -137,10 +138,12 @@ importFrom(shinyjs,useShinyjs)
importFrom(shinythemes,shinytheme)
importFrom(stats,as.dendrogram)
importFrom(stats,as.dist)
importFrom(stats,as.formula)
importFrom(stats,as.hclust)
importFrom(stats,chisq.test)
importFrom(stats,cor)
importFrom(stats,cor.test)
importFrom(stats,cutree)
importFrom(stats,dhyper)
importFrom(stats,dist)
importFrom(stats,fisher.test)
Expand Down
1 change: 1 addition & 0 deletions R/module_ora.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enrichment_analysis_ui <- function(id) {
#' @param reactive_i reactive index of rows to be selected (for ORA)
#' @param reactive_featureData reactive feature data
#' @importFrom fastmatch fmatch
#' @importFrom stats cutree
#' @examples
#' #' # source("Git/R/auxi_fgsea.R")
#' # source("Git/R/auxi_vectORA.R")
Expand Down
12 changes: 10 additions & 2 deletions R/proc_doseCurve.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#' @param fct.name the function name, e.g. "LL.4()", "LL.3()", "LL.2()" and "LL.5()",
#' which are defined in the \code{drc} package.
#' @importFrom drc drm LL.2 LL2.2 LL.3 LL.3u LL2.3 LL2.3u LL.4 LL2.4 LL.5 LL2.5
#' @importFrom stats as.formula
#' @return a list of \code{drc} object
#' @export

Expand Down Expand Up @@ -71,7 +72,8 @@ drmMat <- function(
#' @param pch pch in plot function
#' @param cex cex in plot function
#' @param logx whether the x-axis should be in log scale
#'
#' @importFrom graphics lines
#'
plotDC <- function(mod, ylab = "Abundance", lty = 2, pch = 19, cex = 1, logx = FALSE) {

lx <- ""
Expand Down Expand Up @@ -100,6 +102,11 @@ plotDC <- function(mod, ylab = "Abundance", lty = 2, pch = 19, cex = 1, logx = F
}

#' convert e (inflection point) to EC50
#' @param b Hill's slope. The Hill's slope refers to the steepness of the curve. It could either be positive or negative.
#' @param d Hihgest response value.
#' @param e Inflection point. The inflection point is defined as the point on the curve where the curvature changes direction or signs.
#' In models where f = 1 (2-4 parameter models), e is EC50.
#' @param f Asymmetry factor. When f=1 we have a symmetrical curve around inflection point and so we have a four-parameters logistic equation.
#' @note
#' Only has an effect when using LL.5 and LL2.5 model
.e2EC50 <- function(b, d, e, f) {
Expand All @@ -109,6 +116,7 @@ plotDC <- function(mod, ylab = "Abundance", lty = 2, pch = 19, cex = 1, logx = F
#' model fitted by drc
#' @details
#' func(x) = c + (d - c) / (1 + (x/e)^b)^f
#' @param x numerical vector of doses/time points/concentrations
#' @param d Hihgest response value.
#' @param c Lowest response value.
#' @param e Inflection point. The inflection point is defined as the point on the curve where the curvature changes direction or signs.
Expand Down Expand Up @@ -229,7 +237,7 @@ extractParamDCList <- function(x, prefix = "ResponseCurve") {
#' @param featid feature id to be visualized
#' @param dose.var the column header indicating the dose/time/concentration
#' @param curve.var the column header indicating the curve ids
#' @param return.par logical value. If true, no plot generated,
#' @param only.par logical value. If true, no plot generated,
#' the function only returns the parameters of models.
#' @param ... other parameters passed to \code{plot} function, except \code{col},
#' \code{pch}, \code{xlab}, \code{ylab}
Expand Down
10 changes: 10 additions & 0 deletions man/dot-e2EC50.Rd

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

2 changes: 2 additions & 0 deletions man/dot-modelFormula.Rd

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

6 changes: 3 additions & 3 deletions man/plotDCMat.Rd

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

2 changes: 1 addition & 1 deletion tests/test_dose_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library(unittest)
library(drc)

ds <- c(0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, 12.8, 25.6, 51.2, 102.4)
y <- .modelFormula(ds, b = -1, c = 0.25, d = 1.1, f = 1, e = 2) + rnorm(length(ds), sd = 1e-5)
y <- omicsViewer:::.modelFormula(ds, b = -1, c = 0.25, d = 1.1, f = 1, e = 2) + rnorm(length(ds), sd = 1e-5)
mod1 <- drm(y ~ ds, fct = LL.4())
f1 <- extractParamDC(mod1)
mod2 <- drm(y ~ ds, fct = LL2.4())
Expand Down

0 comments on commit 78a84e0

Please sign in to comment.