Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/genotypeToCharacter.R

Converts a vector or matrix of genotypes encoded as number of A alleles to character strings of the form "A/B".

1 | ```
genotypeToCharacter(geno, alleleA=NULL, alleleB=NULL, sort=TRUE)
``` |

`geno` |
Vector or matrix of genotype values, encoded as number of A alleles. If a matrix, dimensions should be (snp, sample). |

`alleleA` |
Character vector with allele A. |

`alleleB` |
Character vector with allele B. |

`sort` |
Logical for whether to sort alleles lexographically ("G/T" instead of "T/G"). |

If `geno`

is a vector, `alleleA`

and `alleleB`

should
have the same length as `geno`

or length 1 (in the latter case the values are recycled).

If `geno`

is a matrix, length of
`alleleA`

and `alleleB`

should be equal to the number of
rows of `geno`

.

If `alelleA`

or `alleleB`

is `NULL`

, returned genotypes
will have values "A/A", "A/B", or "B/B".

Character vector or matrix of the same dimensions as `geno`

.

Stephanie Gogarten

1 2 3 4 |

GWASTools documentation built on May 25, 2018, 6:01 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.