Skip to content

Commit

Permalink
fix Univariate 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pcastellanoescuder committed Feb 18, 2024
1 parent 5117375 commit 5d5e03d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: POMA
Title: Tools for Omics Data Analysis
Version: 1.13.15
Version: 1.13.16
Authors@R:
c(person(given = "Pol",
family = "Castellano-Escuder",
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# POMA 1.13.15
# POMA 1.13.16

* New POMA theme and colorblind-friendly palette
* Available sample normalization (sum and quantile)
Expand Down
10 changes: 5 additions & 5 deletions R/PomaUnivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @param method Character. The univariate statistical test to be performed. Available options include "ttest" (T-test), "anova" (analysis of variance), "mann" (Wilcoxon rank-sum test), and "kruskal" (Kruskal-Wallis test).
#' @param covs Character vector. Indicates the names of `colData` columns to be included as covariates. Default is NULL (no covariates). If not NULL, an ANCOVA model will be fitted using the specified covariates. Note: The order of the covariates is important and should be listed in increasing order of importance in the experimental design.
#' @param error Character vector. Indicates the name of a `colData` column to be included as an error term (e.g. replicates). Default is NULL (no error term).
#' @param paired Logical. Indicates if the data is paired or not. Default is FALSE.
#' @param paired_samples Logical. Indicates if the data is paired or not. Default is FALSE.
#' @param var_equal Logical. Indicates if the data variances are assumed to be equal or not. Default is FALSE.
#' @param adjust Character. Multiple comparisons correction method to adjust p-values. Available options are: "fdr" (false discovery rate), "holm", "hochberg", "hommel", "bonferroni", "BH" (Benjamini-Hochberg), and "BY" (Benjamini-Yekutieli).
#' @param run_post_hoc Logical. Indicates if computing post-hoc tests or not. Setting this parameter to FALSE can save time for large datasets.
Expand All @@ -30,7 +30,7 @@
#' # Perform Mann-Whitney U test
#' st000336 %>%
#' PomaImpute() %>%
#' PomaUnivariate(method = "mann", paired = FALSE, adjust = "fdr")
#' PomaUnivariate(method = "mann", paired_samples = FALSE, adjust = "fdr")
#'
#' data("st000284")
#' # Perform Two-Way ANOVA
Expand All @@ -52,7 +52,7 @@ PomaUnivariate <- function(data,
method = "ttest",
covs = NULL,
error = NULL,
paired = FALSE,
paired_samples = FALSE,
var_equal = FALSE,
adjust = "fdr",
run_post_hoc = TRUE){
Expand Down Expand Up @@ -110,7 +110,7 @@ PomaUnivariate <- function(data,
result <- data.frame(pvalue = apply(to_univariate, 2, function(x){t.test(x ~ group_factor, na.rm = TRUE,
alternative = "two.sided",
var.equal = var_equal,
paired = paired)$p.value})) %>%
paired = paired_samples)$p.value})) %>%
tibble::rownames_to_column("feature") %>%
dplyr::mutate(adj_pvalue = p.adjust(pvalue, method = adjust)) %>%
dplyr::bind_cols(group_means, group_sd) %>%
Expand Down Expand Up @@ -219,7 +219,7 @@ PomaUnivariate <- function(data,

suppressWarnings({
result <- data.frame(pvalue = apply(to_univariate, 2, function(x){wilcox.test(x ~ as.factor(group_factor),
paired = paired)$p.value})) %>%
paired = paired_samples)$p.value})) %>%
tibble::rownames_to_column("feature") %>%
dplyr::mutate(adj_pvalue = p.adjust(pvalue, method = adjust)) %>%
dplyr::bind_cols(group_means, group_sd) %>%
Expand Down
8 changes: 4 additions & 4 deletions R/theme.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ theme_poma <- function(base_size = 15,

## remove axis titles if selected
if (axistitle != "none") {
if (!stringr::str_detect(axistitle, "X|x")) {
if (!grepl("X|x", axistitle)) {
out <- out +
ggplot2::theme(axis.title.x = ggplot2::element_blank())
}
if (!stringr::str_detect(axistitle, "Y|y")) {
if (!grepl("Y|y", axistitle)) {
out <- out +
ggplot2::theme(axis.title.y = ggplot2::element_blank())
}
Expand All @@ -159,12 +159,12 @@ theme_poma <- function(base_size = 15,

## remove axis text if selected
if (axistext != "none") {
if (!stringr::str_detect(axistext, "X|x")) {
if (!grepl("X|x", axistext)) {
out <- out +
ggplot2::theme(axis.text.x = ggplot2::element_blank(),
axis.ticks.x = ggplot2::element_blank())
}
if (!stringr::str_detect(axistext, "Y|y")) {
if (!grepl("Y|y", axistext)) {
out <- out +
ggplot2::theme(axis.text.y = ggplot2::element_blank(),
axis.ticks.y = ggplot2::element_blank())
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ output: github_document
| _BioC_ branch | Status | Version | Dependencies | Rank |
|- |- |- |- |- |
| [Release](http://bioconductor.org/packages/release/bioc/html/POMA.html) | [![Bioc release status](https://bioconductor.org/shields/build/release/bioc/POMA.svg)](https://bioconductor.org/checkResults/release/bioc-LATEST/POMA/) | [![BioC released version](https://img.shields.io/badge/release%20version-1.12.0-blue.svg)](https://www.bioconductor.org/packages/POMA) | [![Dependencies](http://bioconductor.org/shields/dependencies/release/POMA.svg)](http://bioconductor.org/packages/release/bioc/html/POMA.html#since) | [![Rank](http://www.bioconductor.org/shields/downloads/release/POMA.svg)](https://bioconductor.org/packages/stats/bioc/POMA) |
| [Devel](http://bioconductor.org/packages/devel/bioc/html/POMA.html) | [![Bioc devel status](https://bioconductor.org/shields/build/devel/bioc/POMA.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/POMA/) | [![BioC devel version](https://img.shields.io/badge/devel%20version-1.13.15-blue.svg)](https://bioconductor.org/packages/devel/bioc/html/POMA.html) | [![Dependencies](http://bioconductor.org/shields/dependencies/devel/POMA.svg)](http://bioconductor.org/packages/devel/bioc/html/POMA.html#since) | [![Rank](http://www.bioconductor.org/shields/downloads/devel/POMA.svg)](https://bioconductor.org/packages/stats/bioc/POMA) |
| [Devel](http://bioconductor.org/packages/devel/bioc/html/POMA.html) | [![Bioc devel status](https://bioconductor.org/shields/build/devel/bioc/POMA.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/POMA/) | [![BioC devel version](https://img.shields.io/badge/devel%20version-1.13.16-blue.svg)](https://bioconductor.org/packages/devel/bioc/html/POMA.html) | [![Dependencies](http://bioconductor.org/shields/dependencies/devel/POMA.svg)](http://bioconductor.org/packages/devel/bioc/html/POMA.html#since) | [![Rank](http://www.bioconductor.org/shields/downloads/devel/POMA.svg)](https://bioconductor.org/packages/stats/bioc/POMA) |

<!-- badges: end -->

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/li
| *BioC* branch | Status | Version | Dependencies | Rank |
|-------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
| [Release](http://bioconductor.org/packages/release/bioc/html/POMA.html) | [![Bioc release status](https://bioconductor.org/shields/build/release/bioc/POMA.svg)](https://bioconductor.org/checkResults/release/bioc-LATEST/POMA/) | [![BioC released version](https://img.shields.io/badge/release%20version-1.12.0-blue.svg)](https://www.bioconductor.org/packages/POMA) | [![Dependencies](http://bioconductor.org/shields/dependencies/release/POMA.svg)](http://bioconductor.org/packages/release/bioc/html/POMA.html#since) | [![Rank](http://www.bioconductor.org/shields/downloads/release/POMA.svg)](https://bioconductor.org/packages/stats/bioc/POMA) |
| [Devel](http://bioconductor.org/packages/devel/bioc/html/POMA.html) | [![Bioc devel status](https://bioconductor.org/shields/build/devel/bioc/POMA.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/POMA/) | [![BioC devel version](https://img.shields.io/badge/devel%20version-1.13.15-blue.svg)](https://bioconductor.org/packages/devel/bioc/html/POMA.html) | [![Dependencies](http://bioconductor.org/shields/dependencies/devel/POMA.svg)](http://bioconductor.org/packages/devel/bioc/html/POMA.html#since) | [![Rank](http://www.bioconductor.org/shields/downloads/devel/POMA.svg)](https://bioconductor.org/packages/stats/bioc/POMA) |
| [Devel](http://bioconductor.org/packages/devel/bioc/html/POMA.html) | [![Bioc devel status](https://bioconductor.org/shields/build/devel/bioc/POMA.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/POMA/) | [![BioC devel version](https://img.shields.io/badge/devel%20version-1.13.16-blue.svg)](https://bioconductor.org/packages/devel/bioc/html/POMA.html) | [![Dependencies](http://bioconductor.org/shields/dependencies/devel/POMA.svg)](http://bioconductor.org/packages/devel/bioc/html/POMA.html#since) | [![Rank](http://www.bioconductor.org/shields/downloads/devel/POMA.svg)](https://bioconductor.org/packages/stats/bioc/POMA) |

<!-- badges: end -->

Expand Down
6 changes: 3 additions & 3 deletions man/PomaUnivariate.Rd

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

0 comments on commit 5d5e03d

Please sign in to comment.