getPowerFromRes: Retrieve the power results from simulations

Description Usage Arguments Value

View source: R/utils.R

Description

Given results, this function will calculate the number of simulations in which at least one cell state cluster had a significant p-value frorm MASC analysis, meaning the cluster was expanded or depleted between conditions.

Usage

1
2
3
4
5
6
7
getPowerFromRes(
  resFiles,
  resTables,
  threshold = 0.05,
  z = 1.96,
  stratByClus = FALSE
)

Arguments

resFiles

A list of filenames that refer to the results from simulating a dataset

resTables

The MASC results tables obtained from MASC analysis on simulated datasets

threshold

The p-value threshold that determines significance

z

Determines the size of the confidence interval (CI) where z represents the % CI

stratByClus

Boolean that determines whether the power results will be calculated as the aggregate of all clusters or stratified by cluster.

Value

Returns a dataframe containing the power calculations from the simulated datasets


immunogenomics/scpost documentation built on July 28, 2021, 4:03 a.m.