View source: R/mappable_SKAT.R
mappable_SKAT | R Documentation |
Obtain SKAT results, including permuted or empirical p-values, for a SNP window or chunk of SNP windows
mappable_SKAT(
pos_and_SNPs,
scaffold_ID,
null_model,
n_permutations,
resampling = FALSE,
return_all_p_vals = FALSE,
chunk = TRUE,
missing_cutoff = 0.15,
...
)
pos_and_SNPs |
A list containing SNP data divided into windows, along
with metadata (scaffold and SNP window center position) produced by
|
scaffold_ID |
Integer indicating the chromosome or scaffold of interest |
null_model |
Object generated by |
n_permutations |
Integer indicating the number of permutations used to calculate empirical p-values |
resampling |
If TRUE, will call |
return_all_p_vals |
If 'TRUE', will return a vector of all permuted p-values (useful for when not all permutations can fit into memory available for a single thread); if 'FALSE', will calculate and return the empirical p-value |
chunk |
Should be TRUE if the list passed by 'pos_and_SNPs' argument has
been processed into chunks by 'chunk_windows()', as is done in a standard
|
missing_cutoff |
A numeric threshold representing the minimum desired missing rate; missing rate is defined for each SNP as the proportion of genotypes missing data for the given SNP. Imputation to mean is performed , either by 'pre_allocate' or 'SKAT' itself, for all remaining missing values |
... |
Additional parameters passed on to |
A dataframe to be appended to results. If chunking (see above), this
will contain multiple rows, one for each SNP window. Otherwise, it will
contain a single row for one SNP window. Each row will contain a vector
produced by SKAT_one_window
(see documentation for that
function for further details).
data("small_pre_allocated_windows_processed")
sample_null_model <- SKAT::SKAT_Null_Model(
small_phenodata ~ 1 + as.matrix(small_covariates), out_type="C",
n.Resampling = 1000)
mappable_SKAT(
pos_and_SNPs = small_pre_allocated_windows[[1]],
scaffold_ID = small_pre_allocated_windows[[1]][[3]],
null_model = sample_null_model,
resampling = TRUE,
n_permutations = 1000,
chunk = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.