imputed_coloc_input: Imputed coloc input

Description Usage Arguments Value Examples

View source: R/imputed_coloc_input.R

Description

Imputed coloc input

Usage

1

Arguments

dataset

POEM_input format dataset Specifically, this is a coloc format dataset with the following additions pos length L (where L is length of pvalues or beta) chr length 1 snp length L equal to as.character(pos) is mandatory imputation class either all or top top_pos giving the position of the top p-value if imputation class is top -R2 which is either a named vector R2 with names being snp of length M or NA -MAF which is either a named vector with names being snp of length P or NA if imputation class is 'all' -vector MAF of length L

Value

POEM_output format dataset Specifically this is a coloc format dataset with the following changes top_pos giving the position of the top p-value pos vector giving positions chr giving chromosome snp is mandatory MAF is mandatory imputation class that is either all or top Unlike coloc, length of pvalues or beta L is permitted to be zero positions included will be those in R2 and MAF that are not NA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
R2 = c(0.9, 1, 0.5, 0, 0.2)
names(R2) <- 1:5
MAF = c(0.1, 0.15, 0.3, 0.2, 0.4)
names(MAF) <- 1:5
# Top snp example
dataset_top_SNP <- list(pos = 2, MAF = MAF, R2=R2, N= 10000, s =0.5, type="cc", pvalues = 10^-9, chr = "Z", imputation_class = "top", top_pos=2, snp="2")
imputed_coloc_input(dataset = dataset_top_SNP)
# Full example
dataset_full <- list(pos = c(1, 2, 3, 4, 5), MAF = c(0.14, 0.15, 0.25, 0.2, 0.4), N=1000, type ="quant", pvalues = c(2 * 10^-8, 4 * 10^-8, 2 * 10^-4, 0.6, 0.03), chr= "Z", imputation_class = "all", top_pos = 1, snp=as.character(1:5))
imputed_coloc_input(dataset = dataset_full)
# Top snp example with beta
dataset_top_SNP_beta <- list(pos = 2, snp = "2", MAF = MAF, R2=R2, N= 10000, s =0.5, type="cc", beta = 2, varbeta = 0.05, chr = "Z", imputation_class = "top", top_pos=2)
imputed_coloc_input(dataset = dataset_top_SNP_beta)
# Full dataset example with beta
dataset_full_beta_varbeta = dataset_full
dataset_full_beta_varbeta$pvalues = NULL
dataset_full_beta_varbeta$beta = c(0.5, 0.5, 0.4, 0.5, 0.26)
dataset_full_beta_varbeta$varbeta = c(0.008, 0.008, 0.012, 0.01, 0.015)
dataset_full_beta_varbeta$sdY = 1
imputed_coloc_input(dataset = dataset_full_beta_varbeta)
# Top SNP dataset with NA R2
dataset_top_SNP_NA <- list(pos = 2, MAF = MAF, R2=NA, N= 10000, s =0.5, type="cc", pvalues = 10^-9, chr = "Z", imputation_class = "top", top_pos=2)
imputed_coloc_input(dataset = dataset_top_SNP_NA)
# Top SNP dataset with missing MAF positions
dataset_top_SNP_beta2 <- list(pos = 2, snp = "2", MAF = MAF[-1], R2=R2, N= 10000, s =0.5, type="cc", beta = 2, varbeta = 0.05, chr = "Z", imputation_class = "top", top_pos=2)
imputed_coloc_input(dataset = dataset_top_SNP_beta2)

AbbVie-ComputationalGenomics/POEMColoc documentation built on May 20, 2020, 12:32 a.m.