add_R2_from_R2_MAF_check: Harmonize R2 and MAF inputs

Description Usage Arguments

View source: R/add_R2_from_R2_MAF_check.R

Description

Harmonize R2 and MAF inputs

Usage

1
2
add_R2_from_R2_MAF_check(dataset_list, gds_file, R2, MAF, subset,
  window_size, get_dosage_fn, dataset_R2_condition)

Arguments

dataset_list

list of datasets formatted according to the requirements of coloc.abf with the following differences pos, and chr are additionally required. snp is ignored as it is determined by pos. For top SNP datasets, R2 and MAF and gds_file and subset are optional, if supplied as arguments to the function. For full summary statistic datasets, MAF is required. imputation class either all or top top_pos giving the position of the top p-value

gds_file

path to a gds file for the reference panel. Can be NULL if specifying R2 and MAF, or if supplying within dataset.

R2

A matrix of R2 LD between SNP positions. This should contain LD information for top SNPs in rows and LD for positions to be imputed in columns. Can be NULL if specifying gds_file or if included in individual datasets. Column and row names should be position.

MAF

optional input of minor allele frequencies. only used for top SNP datasets names should be position

subset

optional parameter that is the path to a file giving the names of samples to include as formatted in the gds file. each line should be the name of a sample.

window_size

if NULL, window size is determined to cover all positions in dataset_list if specified, covers all positions in dataset list plus window_size around top SNP dataset

get_dosage_fn

a function taking gds file connection and returning a matrix with the genotype or imputed dosage at each position. The function should not perform any filtering or reordering of variants. rows must correspond to individuals and columns to positions.

dataset_R2_condition

vector of condition as output by R2_MAF_check_dataset. If this output is inconsistent with the other things you supplied you will probably get errors that will either break it or cause incorrect output so don't use this independantly without a good reason.


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