Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

viewGenotypes

Print Genotypes to the Console


Description

viewGenotypes prints a tab-delimited table of samples, loci, and alleles to the console so that genotypes can be easily viewed.

Usage

viewGenotypes(object, samples = Samples(object), loci = Loci(object))

Arguments

object

An object of one of the gendata subclasses, containing genotypes to be viewed.

samples

A numerical or character vector indicating which samples to display.

loci

A numerical or character vector indicating which loci to display.

Details

viewGenotypes is a generic function with methods for genambig and genbinary objects.

For a genambig object, a header line indicating sample, locus, and allele columns is printed. Genotypes are printed below this. Genotypes are ordered first by locus and second by sample.

For a genbinary object, the presence/absence matrix is printed, organized by locus. After the matrix for one locus is printed, a blank line is inserted and the matrix for the next locus is printed.

Value

No value is returned.

Author(s)

Lindsay V. Clark

See Also

Examples

# create a dataset for this example
mygen <- new("genambig", samples=c("ind1", "ind2", "ind3", "ind4"),
             loci=c("locA", "locB"))
Genotypes(mygen) <- array(list(c(98, 104, 108), c(100, 104, 110, 114),
                               c(102, 108, 110), Missing(mygen),
                               c(132, 135), c(138, 141, 147),
                               c(135, 141, 144), c(129, 150)),
                          dim=c(4,2))

# view the genotypes
viewGenotypes(mygen)

polysat

Tools for Polyploid Microsatellite Analysis

v1.7-4
GPL-2
Authors
Lindsay V. Clark [aut, cre] (<https://orcid.org/0000-0002-3881-9252>), Alistair J. Hall [ctb] (<https://orcid.org/0000-0001-9293-8909>), Handunnethi Nihal de Silva [ctb], Tyler William Smith [ctb] (<https://orcid.org/0000-0001-7683-2653>)
Initial release
2019-03-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.