initialize,gtypes-method | R Documentation |
gtypes
ConstructorCreate a new gtypes object using
new("gtypes", ...)
, where '...
' are arguments
documented below.
## S4 method for signature 'gtypes'
initialize(
.Object,
gen.data,
ploidy,
ind.names = NULL,
sequences = NULL,
strata = NULL,
schemes = NULL,
description = NULL,
other = NULL,
remove.sequences = FALSE
)
.Object |
the object skeleton, automatically generated when
calling |
gen.data |
a vector, matrix, or data.frame containing the alleles at each locus. See below for more details. |
ploidy |
ploidy of the loci. |
ind.names |
an optional vector of individual sample names. |
sequences |
an optional multidna object containing sequences represented by each locus. |
strata |
an optional stratification scheme from |
schemes |
an optional data.frame of stratification schemes. |
description |
an optional description for the object. |
other |
other optional information to include. |
remove.sequences |
logical. If |
For multi-allele loci, the gen.data
argument should be
formatted such that every consecutive ploidy
columns represent
alleles of one locus. Locus names are taken from the column names in
gen.data
and should be formatted with the same root locus name, with
unique suffixes representing alleles (e.g., for Locus1234: Locus1234.1
and Locus1234.2, or Locus1234_A and Locus1234_B).
If gen.data
is a vector it is assumed to represent haplotypes of a
haploid marker.
Sample names can be either in the rownames of gen.data
or given
separately in ind.names
. If ind.names
are provided, these are
used in lieu of rownames in gen.data
.
If schemes
has a column named 'id
', it will be used to match
to sample names in gen.data
. Otherwise, if rownames are present in
schemes
, a column named 'id
' will be created from them.
If sequences are provided in sequences
, then they should be named
and match values in the haplotype column in gen.data
. If multiple
genes are given as a multidna object, it is assumed that they
are in the same order as the columns in gen.data
.
Eric Archer eric.archer@noaa.gov
df2gtypes, sequence2gtypes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.