Learn R Programming

scBSP (version 1.1.0)

CombinePvalues: Combine p-values across multiple samples from scBSP

Description

Given the results from multiple samples with gene names and p-values, this function merges them by gene and computes a combined p-value for each gene. Fisher's method or Stouffer's method can be used.

Usage

CombinePvalues(list_of_pvalues, method = c("fisher", "stouffer"))

Value

A data.frame with columns:

  • GeneNames

  • Number_Samples: number of datasets contributing to this gene

  • Calibrated_P_values: the combined p-value

Arguments

list_of_pvalues

A list of data.frames, each with columns: GeneNames, P_values.

method

Combination method. One of "fisher" (default) or "stouffer".

Examples

Run this code
df1 <- data.frame(GeneNames = c("A","B","C"),
                  P_values = c(0.01, 0.20, 0.03))
df2 <- data.frame(GeneNames = c("A","C","D"),
                  P_values = c(0.04, 0.10, 0.50))
df3 <- data.frame(GeneNames = c("B","C","E"),
                  P_values = c(0.05, 0.02, 0.80))

CombinePvalues(list(df1, df2, df3), method = "fisher")

Run the code above in your browser using DataLab