Learn R Programming

tcgaViz (version 1.0.2)

calculate_pvalue: 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
)

Value

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

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.

Examples

Run this code
data(tcga)
(df <- convert2biodata(
    algorithm = "Cibersort_ABS",
    disease = "breast invasive carcinoma",
    tissue = "Primary Tumor",
    gene_x = "ICOS"
))
# \donttest{
calculate_pvalue(df)
# }
calculate_pvalue(
    df,
    method_test = "t_test",
    method_adjust = "bonferroni",
    p_threshold = 0.01
)

Run the code above in your browser using DataLab