Description Usage Arguments Value Note Author(s) Examples
View source: R/recodeChromosome.R
Recoding of chromosomes according to the provided 'rules' for from -> to pairs. Most common use is anticipated when importing data from other software using only integers to represent chromosomes. In this situation the list of rules may look like this: list(24="X",25="Y",26="mt").
1 | recodeChromosome(data, rules, quiet = FALSE)
|
data |
object of class for which 'chromosome' method is defined, e.g. 'gwaa.data', 'snp.data', 'scan.gwaa' |
rules |
list of pairs 'from=to'; the chromosomes coded in the original data set with 'from' will be recoded with 'to' value |
quiet |
if summary of recoding should not be printed to the screen |
modified 'data' object
'from' entries should be unique and not overlap with entries in 'to'
Yurii Aulchenko
1 2 3 4 5 6 | require(GenABEL.data)
data(ge03d2)
table(chromosome(ge03d2))
# merge chromosome 3 and X, call chromosome 2 as 15
newdat <- recodeChromosome(ge03d2,rules=list("3"="X","2"=15))
table(chromosome(ge03d2),chromosome(newdat))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.