View source: R/enrichment_testing.r
compute_SNPSEA_enrichment_linear | R Documentation |
Compute GWAS enrichment in gene specificity matrices (linear analysis) with SNPsea.
compute_SNPSEA_enrichment_linear(
gene_score_matrix,
sumstats_file,
output_dir = NULL,
number_of_threads = 1,
slop = "10e3",
null_snpsets = 0,
min_observations = 100,
max_iterations = "1e7",
gene_nomenclature = "hgnc",
snpsea_path = paste0(system.file(package = "gwascelltyper"),
"/extdata/snpsea-linux64"),
gene_intervals = paste0(system.file(package = "gwascelltyper"),
"/extdata/NCBIgenes2013_", gene_nomenclature, ".bed.gz"),
snp_intervals = paste0(system.file(package = "gwascelltyper"),
"/extdata/TGP2011.bed.gz"),
null_snps = paste0(system.file(package = "gwascelltyper"),
"/extdata/Lango2010.txt.gz")
)
gene_score_matrix |
Matrix with HGNC genes as rows & cell-types as columns. Values need to be numeric. |
sumstats_file |
Address of properly formatted SNPsea GWAS file. |
output_dir |
Folder where you want the output to be stored. Default = NULL, which makes this function create a directory where results will be temporarily stored. The directory will be deleted afterwards, if this parameter is null. The only output will be the return. Otherwise, both the files and the return are kept. |
number_of_threads |
Number of threads to parallelize calculation over (default = 1). |
slop |
If a SNP overlaps no gene intervals, extend the SNP interval this many nucleotides further and try again (default: 10000). |
null_snpsets |
Generate a distribution of scores with N null matched SNP sets to evaluate type 1 error (default: 0). |
min_observations |
Stop testing a column in –gene-matrix after observing this many null SNP sets with specificity scores greater or equal to those obtained with the SNPs in –snps. Increase this value to obtain more accurate p-values (default: 25). |
max_iterations |
Maximum number of null SNP sets tested against each column in –gene-matrix. Increase this value to resolve small p-values (default: 10000). |
gene_nomenclature |
Type of gene names. |
snpsea_path |
Path to the SNPsea executable |
gene_intervals |
BED file with gene intervals. The fourth column must contain the same gene identifiers as in –gene-matrix. |
snp_intervals |
BED file with all known SNP intervals. The fourth column must contain the same SNP identifiers as in –snps and –null-snps. |
null_snps |
Text file with SNP identifiers to sample when generating null matched or random SNP sets. These SNPs must be a subset of –snp-intervals. |
Dataframe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.