hdesign {happy} | R Documentation |
hdesign() will call C to extract the design matrix to fit a QTL to a marker interval. hprob() will call C to extract a raw probability matrix. hgenotype() will return the raw genotype data for a marker
hdesign( h, marker, model='additive', mergematrix=NULL ) hprob( h, marker=NULL ) hgenotype ( h, marker, collapse=FALSE, sep="" )
h |
an object returned by a previous call to happy() |
marker |
either a character string giving the name of the marker or the index of the marker in the array h$markers |
model |
either 'additive' (default) or 'full'. The additive design matrix returns an array with S columns, where S is the number of founder strains in the HS. The full design matrix returns a matrix with S(S-1)/2 columns, one for each combination of strains |
mergematrix |
an object returned by mergematrices, used to define sets of strains that are to be merged together. This is accomplished by adding the corresponding columns in the original design matrix. |
collapse |
a boolean variable indicating whether to collapse the alleles into a single genotype. |
sep |
the text to be used to separate the alleles if collapsed. |
hdesign() returns a design matrix d[i,j], in which the ith row corresponds to
the subject i, and the jth column to the corresponding strain or
combination of strains or merged strains.
hprob() returns a matrix i th row corresponds to the subject i, and the x=s*S+t th column contains the probability that the ancestral strains are s,t where S is the total number of strains.
hgenotype() returns a Nx2 matrix i th row corresponds to the subject i, and column 1
contains the first allele and column 2 the second allele at the marker
specified, or (if collapse=TRUE
) a vector of genotypes with the
alleles pasted together.
Richard Mott
happy(), hfit()
## Not run: h <- happy( 'HS.data', 'HS.alleles', generations=200 ) ## Not run: d <- hdesign( h, 1 ) ## the first marker interval ## Not run: d <- hdesign( h, 'D1MIT264') ## the marker interval with left-hand marker D1MIT264 ## Not run: d <- hdesign( h, 'D1MIT264', model='full' ) ## ditto with full design matrix