Description Usage Arguments Examples
Replaces the alleles in a GWAS according to the replacement string provided.
1 | replace_alleles(alleles, replacement_string, reverse_direction = FALSE)
|
alleles |
a list of alleles that will be transformed according to the "rule" in replacement_string |
replacement_string |
a set of replacement rules in the format "<CHAR_OLD>=<CHAR_NEW>,..." where the appearances of CHAR_OLD will be replaced by CHAR_NEW. |
reverse_direction |
a flag indicating that the replacement should occur in the reverse direction |
1 2 3 4 5 6 7 | replace_alleles(list("C", "G"), "C=A,G=T") # c("A", "T")
replace_alleles(list("C", "G"), "C=C,G=T") # c("C", "T")
replace_alleles(list("C", "G"), "C=A,G=G") # c("A", "G")
replace_alleles(list("C", "G"), "C=T,G=A") # c("T", "A")
replace_alleles(list("C", "T"), "C=A,T=T") # c("A", "T")
replace_alleles(list("C", "T"), "C=A,T=C") # c("A", "C")
replace_alleles(list("C", "T"), "C=T,T=C") # c("T", "C")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.