power_calc_per_pop: Power calculation

View source: R/functions.R

power_calc_per_popR Documentation

Power calculation

Description

Power calculation

Usage

power_calc_per_pop(gwas, n_perm, alpha, pop)

Arguments

gwas

GWAS summary statistics with 1kg allele frequencies (output of combine_gwas_with_1kg_freqs)

n_perm

Number of permutations, defaults to 100.

alpha

Alpha, defaults to 0.05 (replication)

pop

A string which must be one of "AFR","SAS","AMR","EAS",or "EUR" specifying the 1kg superpopulation of interest.

Value

a data frame with your input summary statistics plus a new column listing the power at each SNP in the superpopulation of interest at the desired alpha.

Examples


df = format_gwas(gwas = gwas_sumstats)
kg_combo = combine_gwas_with_1kg_freqs(df)
power_stats = power_calc_per_pop(kg_combo,n_perm = 1000,alpha=0.05,pop="AFR") # for AFR
power_stats = power_calc_per_pop(kg_combo,n_perm = 1000,alpha=0.05,pop="SAS") # for SAS

benjacobs123456/popPoweR documentation built on March 28, 2022, 4:32 a.m.