Skip to contents

Object that downloads, develops and uploads EBI dataset

Object that downloads, develops and uploads EBI dataset

Super class

GwasDataImport::Dataset -> EbiDataset

Public fields

ebi_id

EBI ID to look for

traitname

Name of trait

ftp_path

Path to files in EBI FTP

or_flag

TRUE/FALSE if had to convert OR to beta

gwas_out1

Path to first look at EBI dataset

Methods

Inherited methods


Method new()

Initialise object

Usage

EbiDataset$new(
  ebi_id,
  wd = tempdir(),
  ftp_path = NULL,
  igd_id = paste0("ebi-a-", ebi_id),
  traitname = NULL
)

Arguments

ebi_id

e.g. GCST005522

wd

Directory in which to download and develop dataset. Default=tempdir(). Deleted automatically upon object removal

ftp_path

Pre-specified path to data. Default=NULL

igd_id

Defaults to "ebi-a-<ebi_id>"

traitname

Option to provide traitname of dataset

Returns

A new EbiDataset object


Method download_dataset()

Download

Usage

EbiDataset$download_dataset(
  ftp_path = self$ftp_path,
  ftp_url = options()$ebi_ftp_url,
  outdir = self$wd
)

Arguments

ftp_path

Pre-specified path to data. Default=self$ftp_path

ftp_url

Default=options()$ebi_ftp_url

outdir

Default=self$wd


Method format_ebi_dataset()

organise data before formatting. This is slow but doesn't really matter

Usage

EbiDataset$format_ebi_dataset(
  filename = self$filename,
  output = file.path(self$wd, "step1.txt.gz")
)

Arguments

filename

Filename of GWAS dataset

output

Where to save formatted dataset


Method organise_metadata()

Download and parse metadata

Usage

EbiDataset$organise_metadata(
  ebi_id = self$ebi_id,
  or_flag = self$or_flag,
  igd_id = self$igd_id,
  units = NULL,
  sex = "NA",
  category = "NA",
  subcategory = "NA",
  build = "HG19/GRCh37",
  group_name = "public",
  traitname = self$traitname
)

Arguments

ebi_id

Default=self$ebi_id

or_flag

Default=self$or_flag

igd_id

Default=NULL

units

Default=NULL

sex

Default="NA"

category

Default="NA"

subcategory

Default="NA"

build

Default="HG19/GRCh37"

group_name

Default="public"

traitname

Default=self$traitname


Method pipeline()

Once initialised this function will string together everything i.e. downloading, processing and uploading

Usage

EbiDataset$pipeline()


Method clone()

The objects of this class are cloneable with this method.

Usage

EbiDataset$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.