decodeCallCodes {GeneticsBase} | R Documentation

## Converts integer codes in a callCodes matrix to character string representations of geneSet.

### Description

Converts integer codes in a callCodes matrix to character string representations of geneSet.

### Usage

    decodeCallCodes(callCodes, transTables, markerInfo)

### Arguments

`callCodes` | matrix of positive integers, such as the callCodes slot of a geneSet object.
`transTables` | list of code translation tables, such as the transTables slot of a geneSet object.
`markerInfo` | dataframe, with one row for each row in the callCodes matrix, such as the markerInfo slot of a geneSet object. Must include at least column "TransTable".

### Value

a character matrix with the same dimension and dimnames as argument callCodes, giving character string representations of genotypes, as specified by a set of translation tables.

### Author(s)

Scott D. Chasalow

### See Also

geneSet

### Examples

    library(GeneticsBase)
    tTabList <- makeTransTableList(c("Bb", "ATG"), c("Generic", "SNP"))
    locus <- c("c104t", "c2249t")
    ttab <- c("SNP", "Generic")
    minfo <- makeMarkerInfo(locus, ttab)
    misscodes <- list(Generic = c("NA", ".", "-"), SNP = "N")
    r1 <- c(1, 2, 1, 1)
    r2 <- c(1, 2, 3, 2)
    data <- rbind(r1, r2) # callCodes
    dimnames(data) <- list(locus, paste("Sample", seq(along = r1),
            sep = "."))
    decodeCallCodes(data, tTabList, minfo)

[Package GeneticsBase version 1.8.0 Index]