A function to create a gwasglue2 SummarySet object from a vcf file
Source:R/constructors.R
create_summaryset_from_gwasvcf.RdA function to create a gwasglue2 SummarySet object from a vcf file
Usage
create_summaryset_from_gwasvcf(
data,
metadata = NULL,
qc = FALSE,
beta_col = "ES",
se_col = "SE",
samplesize_col = "SS",
logpvalue_col = "LP",
pvalue_col = "p",
chr_col = "seqnames",
position_col = "start",
rsid_col = "ID",
effect_allele_col = "ALT",
other_allele_col = "REF",
eaf_col = "AF",
id_col = "id",
build = NULL
)Arguments
- data
GWAS summary statistics. In the GWAS vcf dataframe format
- metadata
A list with metadata information. If NULL, it creates metadata with information retrieved from the dataset
- qc
Quality control. It checks the @param data and look for problems that can stop gwasglue2 from runing. If TRUE gwasglue will try to solve the problems. Default is FALSE
- beta_col
Name of column with effect sizes. The default is
"ES".- se_col
Name of column with standard errors. The default is
"SE".- samplesize_col
Column name for sample size. The default is
"SS".- logpvalue_col
Name of column with log(p-value). The default is
"LP".- pvalue_col
Name of column with p-value. The default is
"p".- chr_col
Column name for chromosome . The default is
"seqnames".- position_col
Column name for the position. Together, with @param chr gives the physical coordinates of the variant. The default is
"start".- rsid_col
Required name of column with variants rs IDs. The default is
"ID".- effect_allele_col
Name of column with effect allele. Must contain only the characters "A", "C", "T" or "G". The default is
"ALT".- other_allele_col
Name of column with non effect allele. Must contain only the characters "A", "C", "T" or "G". The default is
"REF".- eaf_col
Name of column with effect allele frequency. The default is
"AF".- id_col
GWAS study ID column. The default is
"id".- build
Reference genome assembly to generate the vcf file. Default is NULL.
Options are
"NCBI34","NCBI35","NCBI36","GRCh37"or "GRCh38".
See also
create_metadata() to create a metadata object