View source: R/compute_nsize.R
compute_nsize | R Documentation |
Check for N column if not present and user wants, impute N based on user's sample size. NOTE this will be the same value for each SNP which is not necessarily correct and may cause issues down the line. N can also be inputted with "ldsc", "sum", "giant" or "metal" by passing one or multiple of these.
compute_nsize(
sumstats_dt,
imputation_ind = FALSE,
compute_n = c("ldsc", "giant", "metal", "sum"),
standardise_headers = FALSE,
force_new = FALSE,
return_list = TRUE
)
sumstats_dt |
data table obj of the summary statistics file for the GWAS. |
imputation_ind |
Binary Should a column be added for each imputation step to show what SNPs have imputed values for differing fields. This includes a field denoting SNP allele flipping (flipped). Note these columns will be in the formatted summary statistics returned. Default is FALSE. |
compute_n |
How to compute per-SNP sample size (new column "N").
|
standardise_headers |
Standardise headers first. |
force_new |
If "Neff" (or "N") already exists in |
return_list |
Return the |
list("sumstats_dt"=sumstats_dt)
sumstats_dt <- MungeSumstats::formatted_example()
sumstats_dt2 <- MungeSumstats::compute_nsize(sumstats_dt=sumstats_dt,
compute_n=10000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.