View source: R/finemap_locus.R
finemap_locus | R Documentation |
Unlike finemap_loci
, you don't need to provide a topSNPs
data.frame. Instead, just manually provide the coordinates of the locus
you want to fine-map.
finemap_locus( locus, fullSS_path, fullSS_genome_build = NULL, results_dir = file.path(tempdir(), "results"), dataset_name = "dataset_name", dataset_type = "GWAS", case_control = TRUE, topSNPs = "auto", force_new_subset = FALSE, force_new_LD = FALSE, force_new_finemap = FALSE, finemap_methods = c("ABF", "FINEMAP", "SUSIE"), finemap_args = NULL, n_causal = 5, credset_thresh = 0.95, consensus_thresh = 2, fillNA = 0, conditioned_snps = NULL, priors_col = NULL, munged = FALSE, colmap = echodata::construct_colmap(munged = munged), compute_n = "ldsc", LD_reference = "1KGphase3", LD_genome_build = "hg19", leadSNP_LD_block = FALSE, superpopulation = "EUR", download_method = "axel", bp_distance = 5e+05, min_POS = NA, max_POS = NA, min_MAF = NA, trim_gene_limits = FALSE, max_snps = NULL, min_r2 = 0, remove_variants = FALSE, remove_correlates = FALSE, query_by = "tabix", qtl_suffixes = NULL, plot_types = c("simple"), zoom = "1x", show_plot = TRUE, tx_biotypes = NULL, nott_epigenome = FALSE, nott_show_placseq = FALSE, nott_binwidth = 200, nott_bigwig_dir = NULL, xgr_libnames = NULL, roadmap = FALSE, roadmap_query = NULL, remove_tmps = TRUE, seed = 2022, conda_env = "echoR_mini", nThread = 1, verbose = TRUE, top_SNPs = deprecated(), PP_threshold = deprecated(), consensus_threshold = deprecated(), plot.Nott_epigenome = deprecated(), plot.Nott_show_placseq = deprecated(), plot.Nott_binwidth = deprecated(), plot.Nott_bigwig_dir = deprecated(), plot.Roadmap = deprecated(), plot.Roadmap_query = deprecated(), plot.XGR_libnames = deprecated(), server = deprecated(), plot.types = deprecated(), plot.zoom = deprecated(), QTL_prefixes = deprecated(), vcf_folder = deprecated(), probe_path = deprecated(), file_sep = deprecated, chrom_col = deprecated(), chrom_type = deprecated(), position_col = deprecated(), snp_col = deprecated(), pval_col = deprecated(), effect_col = deprecated(), stderr_col = deprecated(), tstat_col = deprecated(), locus_col = deprecated(), freq_col = deprecated(), MAF_col = deprecated(), A1_col = deprecated(), A2_col = deprecated(), gene_col = deprecated(), N_cases_col = deprecated(), N_controls_col = deprecated(), N_cases = deprecated(), N_controls = deprecated(), proportion_cases = deprecated(), sample_size = deprecated(), PAINTOR_QTL_datasets = deprecated() )
locus |
Locus name to fine-map (e.g. |
fullSS_path |
Path to the full summary statistics file (GWAS or QTL) that you want to fine-map. It is usually best to provide the absolute path rather than the relative path. |
fullSS_genome_build |
Genome build of the full summary statistics
( |
results_dir |
Where to store all results. IMPORTANT!: It is usually best to provide the absolute path rather than the relative path. This is especially important for FINEMAP. |
dataset_name |
The name you want to assign to the dataset being fine-mapped, This will be used to name the subdirectory where your results will be stored (e.g. Data/GWAS/<dataset_name>). Don't use special characters (e.g.".", "/"). |
dataset_type |
The kind dataset you're fine-mapping (e.g. GWAS, eQTL, tQTL). This will also be used when creating the subdirectory where your results will be stored (e.g. Data/<dataset_type>/Kunkle_2019). |
case_control |
Whether the summary statistics come from a case-control
study (e.g. a GWAS of having Alzheimer's Disease or not) ( |
topSNPs |
A data.frame with the genomic coordinates of the lead SNP
for each locus.
The lead SNP will be used as the center of the window when extracting
subset from the full GWAS/QTL summary statistics file.
Only one SNP per Locus should be included.
At minimum,
|
force_new_subset |
By default, if a subset of the full
summary stats file for a given locus is already present,
then echolocatoR will just use the pre-existing file.
Set |
force_new_LD |
Force new LD subset. |
force_new_finemap |
By default, if an fine-mapping results file for
a given locus is already present,
then echolocatoR will just use the preexisting file.
Set |
finemap_methods |
Which fine-mapping methods you want to use. |
finemap_args |
A named nested list containing additional arguments
for each fine-mapping method. e.g.
|
n_causal |
The maximum number of potential causal SNPs per locus. This parameter is used somewhat differently by different fine-mapping tools. See tool-specific functions for details. |
credset_thresh |
The minimum fine-mapped posterior probability
for a SNP to be considered part of a Credible Set.
For example, |
consensus_thresh |
The minimum number of fine-mapping tools in which a SNP is in the Credible Set in order to be included in the "Consensus_SNP" column. |
fillNA |
Value to fill LD matrix NAs with. |
conditioned_snps |
Which SNPs to conditions on when fine-mapping with (e.g. COJO). |
priors_col |
[Optional] Name of the a column in
|
munged |
Whether |
colmap |
Column name mappings in in
|
compute_n |
How to compute per-SNP sample size (new column "N").
|
LD_reference |
LD reference to use:
|
LD_genome_build |
Genome build of the LD panel. This is automatically assigned to the correct genome build for each LD panel except when the user supplies custom vcf/LD files. |
leadSNP_LD_block |
Only return SNPs within the same LD block as the lead SNP (the SNP with the smallest p-value). |
superpopulation |
Superpopulation to subset LD panel by
(used only if |
download_method |
|
bp_distance |
Distance around the lead SNP to include. |
min_POS |
Minimum genomic position to include. |
max_POS |
Maximum genomic position to include. |
min_MAF |
Minimum Minor Allele Frequency (MAF) of SNPs to include. |
trim_gene_limits |
If a gene name is supplied to this argument
(e.g. |
max_snps |
Maximum number of SNPs to include. |
min_r2 |
Correlation threshold for |
remove_variants |
A list of SNP RSIDs to remove. |
remove_correlates |
A list of SNPs.
If provided, all SNPs that correlates with these SNPs (at r2>= |
query_by |
Choose which method you want to use to extract locus subsets from the full summary stats file. Methods include:
|
qtl_suffixes |
If columns with QTL data is included in |
plot_types |
Which kinds of plots to include. Options:
|
zoom |
Zoom into the center of the locus when plotting (without editing the fine-mapping results file). You can provide either:
You can pass a list of window sizes (e.g. |
show_plot |
Print plot to screen. |
tx_biotypes |
Transcript biotypes to include in the gene model track.
By default ( |
nott_epigenome |
Include tracks showing brain cell-type-specific epigenomic data from Nott et al. (2019). |
nott_show_placseq |
Include track generated by NOTT2019_plac_seq_plot. |
nott_binwidth |
When including Nott et al. (2019) epigenomic data in the track plots, adjust the bin width of the histograms. |
nott_bigwig_dir |
Instead of pulling Nott et al. (2019) epigenomic data from the UCSC Genome Browser, use a set of local bigwig files. |
xgr_libnames |
Passed to XGR_plot.
Which XGR annotations to check overlap with.
For full list of libraries see
here.
Passed to the
|
roadmap |
Find and plot annotations from Roadmap. |
roadmap_query |
Only plot annotations from Roadmap whose
metadata contains a string or any items from a list of strings
(e.g. |
remove_tmps |
Whether to remove any temporary files (e.g. FINEMAP output files) after the pipeline is done running. |
seed |
Set the seed for all functions where this is possible. |
conda_env |
Conda environment to use. |
nThread |
Number of threads to parallelise saving across. |
verbose |
Print messages. |
top_SNPs |
[deprecated] |
PP_threshold |
[deprecated] |
consensus_threshold |
[deprecated] |
plot.Nott_epigenome |
[deprecated] |
plot.Nott_show_placseq |
[deprecated] |
plot.Nott_binwidth |
[deprecated] |
plot.Nott_bigwig_dir |
[deprecated] |
plot.Roadmap |
[deprecated] |
plot.Roadmap_query |
[deprecated] |
plot.XGR_libnames |
[deprecated] |
server |
[deprecated] |
plot.types |
[deprecated] |
plot.zoom |
[deprecated] |
QTL_prefixes |
[deprecated] |
vcf_folder |
[deprecated] |
probe_path |
[deprecated] |
file_sep |
[deprecated] |
chrom_col |
[deprecated] |
chrom_type |
[deprecated] |
position_col |
[deprecated] |
snp_col |
[deprecated] |
pval_col |
[deprecated] |
effect_col |
[deprecated] |
stderr_col |
[deprecated] |
tstat_col |
[deprecated] |
locus_col |
[deprecated] |
freq_col |
[deprecated] |
MAF_col |
[deprecated] |
A1_col |
[deprecated] |
A2_col |
[deprecated] |
gene_col |
[deprecated] |
N_cases_col |
[deprecated] |
N_controls_col |
[deprecated] |
N_cases |
[deprecated] |
N_controls |
[deprecated] |
proportion_cases |
[deprecated] |
sample_size |
[deprecated] |
PAINTOR_QTL_datasets |
[deprecated] |
The primary functions of echolocatoR that expedite fine-mapping by wrapping many other echolocatoR functions into one. Encompasses steps including:
Extract subsets of the full summary stats GWAS or QTL file and reformat them to be compatible with echolocatoR's various functions
Download and prepare the necessary LD matrix.
Run various fine-mapping tools and merge the results into a single multi-finemap data.frame.
Summarise the results in a multi-track plot for each locus.
Other MAIN:
finemap_loci()
topSNPs <- echodata::topSNPs_Nalls2019 fullSS_path <- echodata::example_fullSS(dataset = "Nalls2019") res <- echolocatoR::finemap_locus( fullSS_path = fullSS_path, topSNPs = topSNPs, locus = "BST1", finemap_methods = c("ABF","FINEMAP","SUSIE"), dataset_name = "Nalls23andMe_2019", fullSS_genome_build = "hg19", bp_distance = 1000, munged = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.