finemap_loci | R Documentation |
echolocatoR will automatically fine-map each locus.
Uses the topSNPs
data.frame to define locus coordinates.
finemap_loci( loci = NULL, fullSS_path, fullSS_genome_build = NULL, results_dir = file.path(tempdir(), "results"), dataset_name = "dataset_name", dataset_type = "GWAS", 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 = "auto", 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", case_control = TRUE, qtl_suffixes = NULL, plot_types = c("simple"), show_plot = TRUE, zoom = "1x", 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, conda_env = "echoR_mini", return_all = TRUE, use_tryCatch = TRUE, seed = 2022, 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() )
loci |
Character list of loci in Locus col of |
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). |
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:
|
case_control |
Whether the summary statistics come from a case-control
study (e.g. a GWAS of having Alzheimer's Disease or not) ( |
qtl_suffixes |
If columns with QTL data is included in |
plot_types |
Which kinds of plots to include. Options:
|
show_plot |
Print plot to screen. |
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. |
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. |
conda_env |
Conda environment to use. |
return_all |
Return a nested list of various the pipeline's outputs
including plots, tables, and file paths (default: |
use_tryCatch |
If an error is encountered in one locus,
the pipeline will continue to try running the rest of the loci
(default: |
seed |
Set the seed for all functions where this is possible. |
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] |
By default, returns a nested list containing grouped by locus names
(e.g. BST1
, MEX3C
). The results of each locus contain
the following elements:
finemap_dat
: Fine-mapping results from all selected methods
merged with the original summary statistics
(i.e. Multi-finemap results).
locus_plot
: A nested list containing one or more
zoomed views of locus plots.
LD_matrix
: The post-processed LD matrix used
for fine-mapping.
LD_plot
: An LD plot (if used).
locus_dir
: Locus directory results are saved in.
arguments
: A record of the arguments supplied to
finemap_loci.
In addition, the following object summarizes the results from all the locus-specific results:
merged_dat
: A merged data.table
with all fine-mapping results from all loci.
Other MAIN:
finemap_locus()
topSNPs <- echodata::topSNPs_Nalls2019 fullSS_path <- echodata::example_fullSS(dataset = "Nalls2019") res <- echolocatoR::finemap_loci( fullSS_path = fullSS_path, topSNPs = topSNPs, loci = c("BST1","MEX3C"), 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.