Get/set marker attributes
These functions can be used to manipulate a single attribute of one or
several markers. Each getter/setter can be used in two ways: Either directly
on a marker
object, or on a ped
object which has markers attached to it.
genotype(x, ...) ## S3 method for class 'marker' genotype(x, id, ...) ## S3 method for class 'ped' genotype(x, markers = NULL, id, ...) genotype(x, ...) <- value ## S3 replacement method for class 'marker' genotype(x, id, ...) <- value ## S3 replacement method for class 'ped' genotype(x, marker, id, ...) <- value mutmod(x, ...) ## S3 method for class 'marker' mutmod(x, ...) ## S3 method for class 'ped' mutmod(x, marker, ...) ## S3 method for class 'list' mutmod(x, marker, ...) mutmod(x, ...) <- value ## S3 replacement method for class 'marker' mutmod(x, ...) <- value ## S3 replacement method for class 'ped' mutmod(x, marker = NULL, ...) <- value ## S3 replacement method for class 'list' mutmod(x, marker = NULL, ...) <- value alleles(x, ...) ## S3 method for class 'marker' alleles(x, ...) ## S3 method for class 'ped' alleles(x, marker, ...) ## S3 method for class 'list' alleles(x, marker, ...) afreq(x, ...) ## S3 method for class 'marker' afreq(x, ...) ## S3 method for class 'ped' afreq(x, marker, ...) ## S3 method for class 'list' afreq(x, marker, ...) afreq(x, ...) <- value ## S3 replacement method for class 'marker' afreq(x, ...) <- value ## S3 replacement method for class 'ped' afreq(x, marker, ...) <- value ## S3 replacement method for class 'list' afreq(x, marker, ...) <- value name(x, ...) ## S3 method for class 'marker' name(x, ...) ## S3 method for class 'ped' name(x, markers = NULL, ...) ## S3 method for class 'list' name(x, markers = NULL, ...) name(x, ...) <- value ## S3 replacement method for class 'marker' name(x, ...) <- value ## S3 replacement method for class 'ped' name(x, markers = NULL, ...) <- value ## S3 replacement method for class 'list' name(x, markers = NULL, ...) <- value chrom(x, ...) ## S3 method for class 'marker' chrom(x, ...) ## S3 method for class 'ped' chrom(x, markers = NULL, ...) ## S3 method for class 'list' chrom(x, markers = NULL, ...) chrom(x, ...) <- value ## S3 replacement method for class 'marker' chrom(x, ...) <- value ## S3 replacement method for class 'ped' chrom(x, markers = NULL, ...) <- value ## S3 replacement method for class 'list' chrom(x, markers = NULL, ...) <- value posMb(x, ...) ## S3 method for class 'marker' posMb(x, ...) ## S3 method for class 'ped' posMb(x, markers = NULL, ...) posMb(x, ...) <- value ## S3 replacement method for class 'marker' posMb(x, ...) <- value ## S3 replacement method for class 'ped' posMb(x, markers = NULL, ...) <- value
x |
Either a |
... |
Further arguments, not used in most of these functions. |
id |
The ID label of a single pedigree member. |
value |
Replacement value(s). |
marker, markers |
The index or name of a marker (or a vector indicating
several markers) attached to |
The getters return the value of the query. The setters perform in-place modification of the input.
x = nuclearPed(1) x = setMarkers(x, locusAttributes = list(name = "M", alleles = 1:2)) # Set genotype genotype(x, marker = "M", id = 1) = 1:2 genotype(x, marker = "M", id = 3) = 1 # Genotypes are returned as a vector of length 2 genotype(x, marker = "M", id = 1) # Change allele freqs afreq(x, "M") = c(`1` = 0.1, `2` = 0.9) # Check the new frequencies afreq(x, "M")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.