View source: R/ds.GenotypeData.R
ds.GenotypeData | R Documentation |
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.
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
)
x |
a |
covars |
a data.frame or a tibble having the metadata of samples (i.e. phenotypes and/or covariates) |
columnId |
|
sexId |
|
male_encoding |
|
female_encoding |
|
case_control_column |
|
case |
|
control |
|
newobj.name |
|
datasources |
a list of |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.