run_conditional_gwas: Conditional analysis for known complex trait-associated...

Description Usage Arguments Value

View source: R/conditional.R

Description

For specified, known complex trait-associated (GWAS) variant(s), set-up and run conditional analysis. The function identifies lead omics SNPs to consider for conditional analysis, and determines which SNPs will be conditioned on for each GWAS variant based on specified criteria. Returns a data.frame with posterior probabilities for collapsed association patterns and results from conditional analysis. Also returns a vector of estimated FDR for each collapsed association pattern at a specified posterior probability threshold.

Usage

1
2
3
run_conditional_gwas(Primo_obj, IDs, gwas_snps, pvals, LD_mat, snp_info,
  pp_thresh, LD_thresh = 0.9, dist_thresh = 5000,
  pval_thresh = 0.001, gwas_col = 1, use_ID_labels = TRUE)

Arguments

Primo_obj

list returned by running the t-statistic version of Primo (i.e. Primo_tstat)

IDs

data.frame of the SNP and phenotype IDs corresponding to each row of the Primo results stored in Primo_obj.

gwas_snps

character vector of known trait-associated (GWAS) SNPs.

pvals

matrix of P-values from test statistics.

LD_mat

matrix of genotype correlation coefficients (e.g. Pearson r). Row and column names should be SNP/variant names (i.e matching variant names in IDs).

snp_info

data.frame reporting the chromosome and position of each SNP. Columns must include: SNP, CHR, POS.

pp_thresh

scalar of the posterior probability threshold used for significance.

LD_thresh

scalar corresponding to the LD r^2 threshold to be used for conditional analysis. Lead omics SNPs with r^2 < LD_thresh with the GWAS SNP will be conditioned on.

dist_thresh

scalar of the minimum number of base pairs away from the GWAS SNP that a lead SNP must be in order to be conditioned on.

pval_thresh

scalar of the P-value threshold a lead SNP must be below with the phenotype for which it is lead SNP in order to be conditioned on.

gwas_col

integer of the data column (e.g. in Primo_obj$Tstat_mod) of the GWAS study. Default is the first data column.

use_ID_labels

logical of whether or not phenotype column names in IDs should be used as labels for identifying possible omics associations. If FALSE, labels will append j to 'study', where j is the corresponding data column of the omics phenotype.

Value

A list with two elements, pp_grouped and fdr.

fdr is a named vector of the estimated false discovery rates (FDR) for each collapsed association pattern at the posterior probability threshold, pp_thresh.

pp_grouped is a data.frame with the following information:


kjgleason/Primo documentation built on Sept. 7, 2021, 3:58 a.m.