flashfm.input: Key input for flashfm - constructs snpmod object list and...

View source: R/prep.R

flashfm.inputR Documentation

Key input for flashfm - constructs snpmod object list and joint effect estimates list for all trait if have external single trait fine-mapping results

Description

Key input for flashfm - constructs snpmod object list and joint effect estimates list for all trait if have external single trait fine-mapping results

Usage

flashfm.input(
  modPP.list,
  beta1.list,
  Gmat,
  Nall,
  ybar.all,
  related = FALSE,
  y = NULL,
  Nsame = NULL,
  is.snpmat,
  raf = NULL
)

Arguments

modPP.list

list of data.frame objects for each trait, containing a column named "snps": snp models of the form "snp1,snp2" and "PP": snp model posterior probabliity from single trait fine-mapping

beta1.list

list of single SNP effect estimates for each trait in the form of a named vector; name of each effect estimate should appear in Gmat

Gmat

genotype matrix with SNP columns; could be from sample or reference panel; use unrelated samples

Nall

vector of sample sizes; if related samples then give effective sample sizes

ybar.all

vector of trait means; if related samples, this should be based on unrelated samples; if traits are transformed to be standard Normal, could set ybar as 0-vector

related

logical indicating if samples are related (TRUE) or not (FALSE); default is FALSE

y

(optional) matrix of trait values (trait columns) or indicators of trait measured; used to get joint sample counts; default is NULL and if not provided an approximation is used based on vector of trait sample sizes

Nsame

(optional) single sample size value, if all traits measured on all individuals

is.snpmat

logical taking value TRUE when Gmat is a genotype matrix and FALSE when Gmat is a SNP covariance matrix

raf

named vector of SNP reference allele frequencies where name is snp id (must match SNP coding used for effect estimates); only needed if Gmat is a covariance matrix and MUST be in same order ans snps in covariance matrix

Value

list containing the main input for flashfm

Author(s)

Jenn Asimit


jennasimit/flashfm documentation built on July 31, 2022, 7:32 p.m.