Marker objects
Creating a marker object associated with a pedigree.
marker( x, ..., geno = NULL, allelematrix = NULL, alleles = NULL, afreq = NULL, chrom = NA, posMb = NA, name = NA, NAstrings = c(0, "", NA, "-"), mutmod = NULL, rate = NULL, validate = TRUE )
x |
a |
... |
one or more expressions of the form |
geno |
a character vector of length |
allelematrix |
a matrix with 2 columns and |
alleles |
a character (or coercible to character) containing allele
names. If not given, and |
afreq |
a numeric of the same length as |
chrom |
a single integer: the chromosome number. Default: NA. |
posMb |
a nonnegative real number: the physical position of the marker, in megabases. Default: NA. |
name |
a character string: the name of the marker. Default: NA. |
NAstrings |
A character vector containing strings to be treated as
missing alleles. Default: |
mutmod, rate |
mutation model parameters. These are passed directly to
|
validate |
if TRUE, the validity of the created |
An object of class marker
. This is an integer matrix with 2 columns
and one row per individual, and the following attributes:
alleles
(a character vector with allele labels)
afreq
(allele frequencies; default rep.int(1/length(alleles), length(alleles))
)
chrom
(chromosome number; default = NA)
posMb
(physical location in megabases; default = NA)
name
(marker identifier; default = NA)
mutmod
(a list of two (male and female) mutation matrices; default =
NULL)
x = nuclearPed(father = "fa", mother = "mo", children = "child") # An empty SNP with alleles "A" and "B" marker(x, alleles = c("A", "B")) # Alleles/frequencies can be given jointly or separately stopifnot(identical( marker(x, afreq = c(A = 0.01, B = 0.99)), marker(x, alleles = c("A", "B"), afreq = c(0.01, 0.99)), )) # Genotypes can be assigned individually ... marker(x, fa = "1/1", mo = "1/2") # ... or using the `geno` vector (all members in order) marker(x, geno = c("1/1", "1/2", NA)) # For homozygous genotypes, a single allele suffices marker(x, fa = 1) # Attaching a marker to the pedigree m = marker(x) # By default a SNP with alleles 1,2 x = setMarkers(x, m) # A marker with a "proportional" mutation model, # with different rates for males and females mutrates = list(female = 0.1, male = 0.2) marker(x, alleles = 1:2, mutmod = "prop", rate = mutrates)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.