Closed ruthkepstein closed 2 years ago
Hi Ruth. I'm sorry didn't get back to your email before. The LociMap object is an S4 class, so you create it using the new
function.
Below is an example for a three chromosome organism. It selects the first and third locus on chromosome 1 and the second locus on chromosome 2. Note that the L after the number denotes an integer and is needed with S4 classes. You can alternatively write numbers without the L and place them in an as.integer
call.
chip = new("LociMap", nLoci=3L, lociPerChr=c(2L,1L,0L), lociLoc=c(1L,3L,2L))
Yes. To do that use nLoci=1L
. Set lociPerChr
to vector of length 10 with a value of 1L for the chromosome that is suppose to have the QTL and 0L for all the rest. Then lociLoc
will be a single value indicating which locus on the selected chromosome is being used as the QTL.
You'll use similar syntax as described above. There will just be an additional slot for the additive effects of the QTL and a slot for an intercept. Below is an example with all the additive effects set to 1.
trait = new("TraitA", nLoci=3L, lociPerChr=c(2L,1L,0L), lociLoc=c(1L,3L,2L), addEff=c(1,1,1), intercept=0)
manAddTrait() takes in "lociMap" descended from LociMap-class but no specification on how to create an object from LociMap-class. Documentation says it takes in nLoci, lociPerChr, lociLoc but contains no function to take in values to make lociMap.