ds.GenotypeData: Creates a GenotypeData object at each server

View source: R/ds.GenotypeData.R

ds.GenotypeDataR Documentation

Creates a GenotypeData object at each server

Description

The GenotypeData class is a container for storing genotype data from a GWAS together with the metadata associated with the subjects (i.e. phenotypes and covariates) and SNPs involved in the study.

Usage

ds.GenotypeData(
  x,
  covars,
  columnId,
  sexId = NULL,
  male_encoding = "male",
  female_encoding = "female",
  case_control_column = NULL,
  case = NULL,
  control = NULL,
  newobj.name = NULL,
  datasources = NULL
)

Arguments

x

a GdsGenotypeReader object (see GWASTools). It is the object that is obtained in the opal servers from a resource of type VCF2GDS

covars

a data.frame or a tibble having the metadata of samples (i.e. phenotypes and/or covariates)

columnId

character Column of the covars that contains the IDs

sexId

character (default NULL) Column of the covars that contains the sex phenotype

male_encoding

character (default "male") String used to encode the male sex phenotype on the covars table

female_encoding

character (default "female") String used to encode the female sex phenotype on the covars table

case_control_column

character (default NULL) Column that holds the case/control to relevel to 0/1

case

character (default NULL) Encoding of the case of the case_control_column

control

character (default NULL) Encoding of the control of the case_control_column

newobj.name

character (default NULL)

datasources

a list of DSConnection-class objects obtained after login. If the <datasources> the default set of connections will be used: see datashield.connections_default.

Details

This function contains the functionality of re-encoding a column of the covars table from a binomial (plus optional strings to be set to NA) to 0/1 encoding. This is due because the subsequent analysis functionalities such as ds.GWaS() and ds.glmSNP() require this encoding to study binomial outcomes. To use this funcionality, input the arguments case_control_column, case and control (optionally na_string can be used to specify strings that will be set as NA, this is useful for phenotypes that are encoded as: Yes/No/Don't know/Don't answer/...). Input NULL to this arguments if this functionality is not to be used.


isglobal-brge/dsOmicsClient documentation built on March 20, 2023, 3:52 p.m.