calculate_pvalue: Corrected Wilcoxon tests

View source: R/calculate_pvalue.R

calculate_pvalueR Documentation

Corrected Wilcoxon tests

Description

Displays stars for each cell type corresponding to the significance level of two mean comparison tests between expression levels (high or low) with multiple correction.

Usage

calculate_pvalue(
  x,
  method_test = "wilcox_test",
  method_adjust = "BH",
  p_threshold = 0.05
)

Arguments

x

object from convert2biodata() for a dataframe containing columns named high (logical), cell_type (factor) and value (float).

method_test

character for the choice of the statistical test among 't_test' or 'wilcox_test'.

method_adjust

character for the choice of the multiple correction test among 'BH', 'bonferroni', 'BY', 'fdr', 'hochberg', 'holm', 'hommel', 'none'

p_threshold

float for the significativity threshold of the P-value.

Value

rstatix_test object for a table with cell types in the row and P-values, corrections and other statistics in the column.

Examples

data(tcga)
(df <- convert2biodata(
    algorithm = "Cibersort_ABS",
    disease = "breast invasive carcinoma",
    tissue = "Primary Tumor",
    gene_x = "ICOS"
))

calculate_pvalue(df)

calculate_pvalue(
    df,
    method_test = "t_test",
    method_adjust = "bonferroni",
    p_threshold = 0.01
)

tcgaViz documentation built on April 4, 2023, 5:14 p.m.