Description Usage Arguments Value Note
recode snps
1 | snp.recode(x, cols = NULL, recodes = c(2, 1, 0))
|
x |
df or vector (char or factor of char) |
cols |
evaluated as cols=ez.selcol(x,cols), ignored if x is a vector |
recodes |
vector with three elements corresponding to (minor-minor, minor-major or major-minor, major-major). Could be c(0,1,2), c(2,1,0), c(-1,0,1), c(1,2,3), c(0,1,1), c(1,0,0), c('AA','AB','BB') |
returns a new df or vector. Regardless of input data type, if recodes are number, then the returned is also numeric; if recodes are char, then always factor of char.
assume biallelic, otherwise error. minor/major bases are calculated based on the actual input data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.