Description Usage Arguments Details Value Examples
meanScan
Like qtl:effectscan, but plots the genotypic means across the
marker / pseudomarker grid.
1 2 3 4 |
cross |
The qtl cross. Must contain genotype probabilities or imputed genotypes |
pheno.col |
Character or numeric vector indicating the phenotype to be tested. Only 1 phenotype can be tested at a time. If numeric, converted to character. |
chr |
The chromosomes to analyze. If not supplied, all are tested. |
covar |
dataframe of covariates like addcovar in qtl::scanone. Can only be a single column. If the data is numeric, or character, converted to factor first. |
mean.FUN |
The function applied to generate the line positions. Defaults to mean(x, na.rm = T) |
se.FUN |
The function applied to generate the confidence interval around the mean. Defaults to sd(x, na.rm = T)/sqrt(sum(!is.na(x))) |
sw.width |
The window size to use if smoothing is desired. If 1, no sliding window smoothing is conducted. Must be smaller than the number of markers on the smallest chromosome. |
plot.se |
Logical, should standard errors around the menas be plotted? |
se.alpha |
Numeric coding of the transparency for the standard error regions. |
col |
Character vector of colors to plot. |
leg.pos |
The character of numeric (length 2) position of the legend. Default is "topright". |
... |
additional arguments passed on to plot.scanone |
leg.pos |
The position of the legend. |
Calculates genotypic means at each marker/psuedomarker, plots them.
The plot and an object of class scanone containing the means for each combination of genotype and covariate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ## Not run:
library(qtlTools)
library(qtl)
data(fake.bc)
cross<-fake.bc
cross<-calc.genoprob(cross)
ms<-meanScan(cross, covar = NULL)
# Some simple customization
ms<-meanScan(cross, covar = NULL, col = c("black","orange"),
leg.pos = "top")
sex<-data.frame(sex = ifelse(pull.pheno(cross, "sex") == 0,"F","M"))
ms<-meanScan(cross, covar = sex, leg.pos = "right")
ms<-meanScan(cross, covar = sex, chr = c(2,7), leg.pos = "right",
col = c("black","grey","darkblue","lightblue"))
cross.fem<-subset(cross, ind = sex[,1] == "F")
cross.male<-subset(cross, ind = sex[,1] == "M")
par(mfrow = c(2,1))
ms <-meanScan(cross.fem, leg.pos = "topright", leg.inset = .05, main = "females only")
ms <-meanScan(cross.male, leg.pos = "topright", leg.inset = .05, main = "males only")
data(fake.f2)
cross<-fake.f2
cross<-calc.genoprob(cross)
ms <- meanScan(cross, covar = NULL, leg.pos = "bottomright", leg.inset = .1)
sex<-data.frame(sex = ifelse(pull.pheno(cross, "sex") == 0,"F","M"))
ms<-meanScan(cross, covar = sex)
data(fake.4way)
cross<-fake.4way
cross<-calc.genoprob(cross)
ms<-meanScan(cross, covar = NULL)
sex<-data.frame(sex = ifelse(pull.pheno(cross, "sex") == 0,"F","M"))
ms<-meanScan(cross, covar = sex, chr = c(2,7))
data("multitrait")
cross =multitrait
cross<-calc.genoprob(cross)
ms<-meanScan(cross, covar = NULL)
ms<-meanScan(cross, covar = NULL, sw.width = 5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.