A function to create a gwasglue2 SummarySet object from different sources and formats
Source:R/constructors.R
create_summaryset.RdA function to create a gwasglue2 SummarySet object from different sources and formats
Usage
create_summaryset(
data,
metadata = NULL,
type = "tibble",
qc = FALSE,
beta_col = NULL,
se_col = NULL,
samplesize_col = NULL,
pvalue_col = NULL,
logpvalue_col = NULL,
chr_col = NULL,
position_col = NULL,
rsid_col = NULL,
effect_allele_col = NULL,
other_allele_col = NULL,
eaf_col = NULL,
id_col = NULL,
trait_col = NULL,
build = NULL
)Arguments
- data
GWAS summary statistics.
- metadata
A list with metadata information. If NULL, it creates metadata with information retrieved from the dataset
- type
Input @param data type. Default is
"tibble". Other options:"vcf"- 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
"beta"for @param type"tibble"and"ES"for @param type"vcf"..- se_col
Name of column with standard errors. The default is
"se"for @param type"tibble"and"SE"for @param type"vcf".- samplesize_col
Column name for sample size. The default is
"n"for @param type"tibble"and"SS"for @param type"vcf".- pvalue_col
Name of column with p-value. The default is
"p".- logpvalue_col
Name of column with log(p-value). The default is
"LP"for @param type"vcf".- chr_col
Column name for chromosome . The default is
"chr"for @param type"tibble"and"seqnames"for @param type"vcf".- position_col
Column name for the position. Together, with @param chr gives the physical coordinates of the variant. The default is
"position"for @param type"tibble"and"start"for @param type"vcf".- rsid_col
Required name of column with variants rs IDs. The default is
"rsid"for @param type"tibble"and"ID"for @param type"vcf".- effect_allele_col
Name of column with effect allele. Must contain only the characters "A", "C", "T" or "G". The default is
"ea"for @param type"tibble"and"ALT"for @param type"vcf".- other_allele_col
Name of column with non effect allele. Must contain only the characters "A", "C", "T" or "G". The default is
"neafor @param type"tibble"and"REF"for @param type"vcf".- eaf_col
Name of column with effect allele frequency. The default is
"eaf"for @param type"tibble"and"AF"for @param type"vcf".- id_col
GWAS study ID column. The default is
"id".- trait_col
Column name for the column with phenotype name corresponding the the variant. The default is
"trait"- build
Reference genome assembly to generate the genomic data. Default is NULL.
Options are
"NCBI34","NCBI35","NCBI36","GRCh37"or "GRCh38".
See also
create_metadata() to create a metadata object