scanqtl                 package:qtl                 R Documentation

_G_e_n_e_r_a_l _Q_T_L _s_c_a_n

_D_e_s_c_r_i_p_t_i_o_n:

     Performs a multiple QTL scan for specified chromosomes and
     positions or intervals, with the possible inclusion of QTL-QTL
     interactions and/or covariates.

_U_s_a_g_e:

     scanqtl(cross, pheno.col=1, chr, pos, covar=NULL, formula,
             method="imp", incl.markers=FALSE, verbose=TRUE)

_A_r_g_u_m_e_n_t_s:

   cross: An object of class 'cross'. See 'read.cross' for details.

pheno.col: Column number in the phenotype matrix to be used as the
          phenotype.

     chr: Vector indicating the chromosome for each QTL.

     pos: List indicating the positions or intervals on the chromosome
          to be scanned.  Each element should be either a single number
          (for a specific position) or a pair of numbers (for an
          interval).

   covar: A data frame of covariates.

 formula: An object of class 'formula' indicating the model to be
          fitted.  QTLs are indicated as 'Q1', 'Q2', etc.  Covariates
          are indicated by their names in 'covar'.

  method: Indicates whether to use the EM algorithm or   imputation.
          (Only imputation is implemented at this point.)

incl.markers: If FALSE, do calculations only at points on an evenly
          spaced grid.

 verbose: If TRUE, give feedback about progress.

_D_e_t_a_i_l_s:

     The formula is used to specified the model to be fit. In the
     formula, use 'Q1', 'Q2', etc., or 'q1', 'q2', etc., to represent
     the QTLs, and the column names in the covariate data frame to
     represent the covariates.

     Only the interaction terms need to be specifed in the formula. The
     main effects of all input QTLs (as specified by chr and pos) and
     covariates (as specifed by covar) will be included by default. For
     example, if the formula is 'y~Q1*Q2*Sex', and there are three
     elements in input 'chr' and 'pos' and Sex is one of the column
     names for input covariates, the formula used in genome scan will
     be 'y ~ Q1 + Q2 + Q3 + Sex + Q1:Q2 + Q1:Sex + Q2:Sex + Q1:Q2:Sex'. 

     The input 'pos' is a list or vector to specify the position/range
     of the input chromosomes to be scanned. If it is a vector, it
     gives the precise positions of the QTL on the chromosomes. If it
     is a list, it will contain either the precise positions or a range
     on the chromosomes. For example, consider the case that the input
     'chr = c(1, 6, 13)'. If 'pos = c(9.8, 34.0, 18.6)',  it means to
     fit a model with QTL on chromosome 1 at 9.8cM, chromosome 6 at
     34cM and  chromosome 13 at 18.6cM. If 'pos = list(c(5,15),
     c(30,36), 18)', it means to scan chromosome 1 from 5cM to 15cM,
     chromosome 6 from 30cM to 36cM, fix the QTL on chromosome 13 at
     18cM.

_V_a_l_u_e:

     An object of class 'scanqtl'. It is a multi-dimensional array of
     LOD scores, with the number of dimension equal to the number of
     QTLs specifed.

_A_u_t_h_o_r(_s):

     Hao Wu

_R_e_f_e_r_e_n_c_e_s:

     Sen, \'S. and Churchill, G. A. (2001) A statistical framework for
     quantitative trait mapping.  _Genetics_ *159*, 371-387.

_S_e_e _A_l_s_o:

     'fitqtl', 'makeqtl'

_E_x_a_m_p_l_e_s:

     data(fake.f2)

     # take out several QTLs
     qc <- c(1, 8, 13)
     fake.f2 <- subset(fake.f2, chr=qc)

     # imputate genotypes

     ## Not run: 
     fake.f2 <- sim.geno(fake.f2, n.draws=64, step=2, err=0.001)
     ## End(Not run)

     # 2-dimensional genome scan with additive 3-QTL model
     pos <- list(c(15,35), c(45,65), 28)
     result <- scanqtl(fake.f2, pheno.col=1, chr=qc, pos=pos,
                       formula=y~Q1+Q2+Q3)

     # image of the results
     # chr locations
     chr1 <- as.numeric(matrix(unlist(strsplit(colnames(result),"@")),
                        ncol=2,byrow=TRUE)[,2])
     chr8 <- as.numeric(matrix(unlist(strsplit(rownames(result),"@")),
                        ncol=2,byrow=TRUE)[,2])
     # image plot
     image(chr1, chr8, t(result), las=1, col=rev(rainbow(256,start=0,end=2/3)))

     # do the same, allowing the QTLs on chr 1 and 13 to interact
     result2 <- scanqtl(fake.f2, pheno.col=1, chr=qc, pos=pos,
                        formula=y~Q1+Q2+Q3+Q1:Q3)
     # image plot
     image(chr1, chr8, t(result2), las=1, col=rev(rainbow(256,start=0,end=2/3)))

