Compute the null hypothesis
compute_null_hypothesis.RdThis function computes the null hypothesis for a given dataset and a list of pathways.
Usage
compute_null_hypothesis(
root_file_name,
pathpathways = paste(dirname(root_file_name), "/pathways/", sep = ""),
pathwaylistfile = paste(dirname(root_file_name), "/pathwaylist.txt", sep = ""),
nullhypmsfile = paste(dirname(root_file_name), "/nullhyp_ms.txt", sep = ""),
nullhyps2file = paste(dirname(root_file_name), "/nullhyp_s2.txt", sep = ""),
seed = 0,
B = 1,
alpha = 0.05,
min_snps = 1,
max_snps = 15000,
N_cores = 1,
n_rows = 1,
mode = 0,
implementation = 0,
verbosity = 0
)Arguments
- root_file_name
full path to a triplet of Plink .bim, .bed and .fam files, without extension
- pathpathways
Directory containing one tab-delimited file per SNP-set. Each file must be named
<SNP_SET_NAME>.txt, contain no header, and store exactly 3 columns: SNP identifier, chromosome, and base-pair position. Example row:rs123<TAB>17<TAB>43044295. SNP identifiers must match the SNP IDs reported in the input.bimfile.- pathwaylistfile
Tab-delimited file describing which SNP-sets to analyse. It must contain one row per SNP-set, with no header, in the form
<SNP_SET_NAME><TAB><NUM_SNPS>, where<SNP_SET_NAME>matches the corresponding filename inpathpathwayswithout the.txtextension.- nullhypmsfile
name of the file where to write the estimated confidence thresholds for each pathway
- nullhyps2file
name of the file where to write the estimated confidence thresholds for each pathway
- seed
seed of the random number generator (default 0)
- B
Number of bootstrap replicates. Use
-1to enable automatic bootstrap selection.- alpha
threshold
- min_snps
You must provide a number of minimum SNPs greater than 0.
- max_snps
You must provide a number of maximum SNPs greater than 0.
- N_cores
Number of cores to use
- n_rows
Number of rows to use
- mode
Compatibility parameter. Only
0(discrete phenotype) is supported.- verbosity
Integer verbosity level (0 = minimal output, higher values increase logging).
Details
This function computes the null hypothesis for a given dataset and a list of pathways. The null hypothesis is computed by bootstrapping the dataset and computing the p-values for each pathway. The p-values are then used to estimate the confidence thresholds for each pathway.
Examples
if (FALSE) { # \dontrun{
root <- tempfile("synthetic")
synthetic <- nebula::simulate_synthetic_genotype(
n_snps = 20,
n_individuals = 20,
n_causal_snps = 3
)
nebula::save_synthetic_genotype(synthetic, file = root)
nebula::generate_synthetic_snpsets(
input_file = paste0(root, ".bim"),
snps_per_set = 5,
num_sets = 4,
root_dir = dirname(root)
)
} # }