find_leadsnps: Find the lead SNP for each phenotype in each region.

Description Usage Arguments Value

View source: R/processing.R

Description

Determine the lead SNP for each phenotype in each region based on summary statistics. A data.table will be returned containing lead SNP information for each region.

Usage

1
2
find_leadsnps(data, snp_col, pheno_cols, stat_cols, data_type = "pvalue",
  suffices = NULL)

Arguments

data

data.table. Each row will be a SNP-phenotype combination with statistics necessary to determine the lead SNP in each phenotype region.

snp_col

character string of the column name of the SNP.

pheno_cols

character vector of the column names of the phenotypes.

stat_cols

character vector of the column names of statistics to be used to determine lead SNPs.

data_type

character string denoting type of statistics being used. Must be either "pvalue" or "tstat".

suffices

character vector denoting suffices to use for the names of the lead SNP columns (optional). If NULL, consecutive integers will be assigned.

Value

A data.table containing information about the lead SNPs and associated statistics. The columns will be pheno_cols followed by two columns for each phenotype: the name of the lead SNP and the value of the statistic for that lead SNP in that phenotype.


kjgleason/primo documentation built on Sept. 7, 2021, 5:21 p.m.