Skip to contents

A function to create a gwasglue2 SummarySet object from a tibble

Usage

create_summaryset_from_tibble(
  data = tibble(),
  metadata = NULL,
  qc = FALSE,
  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",
  build = NULL
)

Arguments

data

GWAS summary statistics. A tibble

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 "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".

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 "nea for @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".

Value

A gwasglue2 SummarySet object

See also

create_metadata() to create a metadata object