splitSNPs {logicDT} | R Documentation |
Split biallelic SNPs into binary variables
Description
This function takes a matrix or data frame of SNPs coded as
0, 1, 2 or 1, 2, 3 and returns a data frame with twice as many
columns. SNPs are splitted into dominant and recessive modes,
i.e., for a \mathrm{SNP} \in \lbrace 0,1,2 \rbrace
, two variables
\mathrm{SNP}_D = (\mathrm{SNP} \neq 0)
and
\mathrm{SNP}_R = (\mathrm{SNP} = 2)
are generated.
Usage
splitSNPs(data)
Arguments
data |
A matrix or data frame only consisting of SNPs to be splitted |
Value
A data frame of the splitted SNPs
[Package logicDT version 1.0.4 Index]