View source: R/calculate_celltype_associations.r
calculate_celltype_associations | R Documentation |
Assumes that you have already run map_snps_to_genes.
calculate_celltype_associations(
ctd,
ctd_levels = seq_len(length(ctd)),
ctd_species = infer_ctd_species(ctd),
gwas_sumstats_path = NULL,
magma_dir = NULL,
analysis_name = "MainRun",
prepare_ctd = TRUE,
upstream_kb = 35,
downstream_kb = 10,
genesOutCOND = NA,
EnrichmentMode = "Linear",
force_new = FALSE,
version = NULL,
verbose = TRUE
)
ctd |
Cell type data structure containing
|
ctd_levels |
Which levels of |
ctd_species |
Species name relevant to the CellTypeDataset ( |
gwas_sumstats_path |
File path of the summary statistics file. |
magma_dir |
Path to folder containing the pre-computed MAGMA GWAS files (.gsa.rawand .gsa.out). |
analysis_name |
Used in file names which area created. |
prepare_ctd |
Whether to run
prepare_quantile_groups on the |
upstream_kb |
How many kb upstream of the gene should SNPs be included? |
downstream_kb |
How many kb downstream of the gene should SNPs be included? |
genesOutCOND |
[Optional] Path to a genes.out file to condition on. Used if you want to condition on a different GWAS. |
EnrichmentMode |
[Optional] Should either 'Linear' or 'Top 10%' mode be used for testing enrichment? |
force_new |
[Optional] Force new MAGMA analyses even if the pre-existing results files are detected. |
version |
MAGMA version to use. |
verbose |
Print messages. |
File path for the genes.out file
#### Prepare cell-type data ####
ctd <- ewceData::ctd()
#### Prepare GWAS MAGMA data ####
magma_dir <- MAGMA.Celltyping::import_magma_files(ids = "ieu-a-298")
#### Run pipeline ####
ctAssocs <- calculate_celltype_associations(
ctd = ctd,
ctd_levels = 1,
magma_dir = magma_dir,
ctd_species = "mouse")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.