Creates a DataSet object using GWAS summary statistics, and harmonise data against data
Source:R/constructors.R
create_dataset_from_tibble.RdCreates a DataSet object using GWAS summary statistics, and harmonise data against data
Usage
create_dataset_from_tibble(
data = list(),
metadata = NULL,
harmonise = TRUE,
tolerance = 0.08,
action = 1,
beta_col = "beta",
se_col = "se",
samplesize_col = "n",
pvalue_col = "p",
chr_col = "chr",
position_col = "position",
rsid_col = "rsid",
effect_allele_col = "ea",
other_allele_col = "nea",
eaf_col = "eaf",
id_col = "id",
trait_col = "trait",
...
)Arguments
- data
A list of GWAS summary data (tibles)
- metadata
A list with metadata information. If NULL, it creates metadata with information retrieved from the dataset.
- harmonise
logical (default TRUE). It harmonises the summary sets in the DataSet against each other.
- tolerance
Inherited from harmoniseData() (default 0.08)
- action
Inherited from harmoniseData() (Default 1)
action = 1: Assume all alleles are coded on the forward strand, i.e. do not attempt to flip allelesaction = 2: Try to infer positive strand alleles, using allele frequencies for palindromes (default, conservative);action = 3: Correct strand for non-palindromic SNPs, and drop all palindromic SNPs from the analysis (more conservative).
- beta_col
Name of column with effect sizes. The default is
"beta".- se_col
Name of column with standard errors. The default is
"se".- samplesize_col
Column name for sample size. The default is
"n".- pvalue_col
Name of column with p-value. The default is
"p".- chr_col
Column name for chromosome . The default is
"chr".- position_col
Column name for the position. Together, with @param chr gives the physical coordinates of the variant. The default is
"position".- rsid_col
Required name of column with variants rs IDs. The default is
"rsid".- effect_allele_col
Name of column with effect allele. Must contain only the characters "A", "C", "T" or "G". The default is
"ea".- other_allele_col
Name of column with non effect allele. Must contain only the characters "A", "C", "T" or "G". The default is
"nea.- eaf_col
Name of column with effect allele frequency. The default is
"eaf".- id_col
The default is
"id".- trait_col
Column name for the column with phenotype name corresponding the the variant. The default is
"trait"- ...
Other columns
See also
create_metadata() to create a metadata object