qb.sweave {qtlbim} | R Documentation

## Run sweave to automate QTL search with MCMC samples.

### Description

This routine runs a separate Sweave file (*.Rnw) of commands, making substitutions for the user-supplied data and thresholds. It can be used to automate the search for genetic architecture.

### Usage

    qb.sweave(cross, pheno.col = 1, n.iter = 3000, n.draws = 64,
      scan.type = "2logBF", hpd.level = 0.5,
      upper.threshold, SweaveFile, SweaveExtra, PDFDir, remove.qb = TRUE)

### Arguments

`cross` | Object of class `cross`.
`pheno.col` | Phenotype column in object `cross`.
`n.iter` | Number of MCMC iterations to be stored.
`n.draws` | Number of MC draws to use for `fitqtl`.
`scan.type` | Type of 1-D and 2-D scan to perform; see `qb.scanone`.
`hpd.level` | Highest probability density level for scan; see `qb.hpdone`.
`upper.threshold` | Threshold for upper triangle (epistasis) in 2-D scan; see `qb.scantwo`.
`SweaveFile` | Name of `Sweave` file (default is `system.file("doc", "hyperslide.Rnw", package = "qtlbim")`).
`SweaveExtra` | Name of user-supplied extra `Sweave` file (default is `NULL`).
`PDFDir` | Name of directory to store PDF files (default is `phenoPDF`, where `pheno` is the name associated with phenotype `pheno.col`).
`remove.qb` | Remove constucted objects if `TRUE`.

### Details

This is a simple shell around the `Sweave` routine to create customized documents with embedded QTL analysis. The default file `system.file("doc", "hyperslide.Rnw", package = "qtlbim")` creates a "beamer" style PDF slide show. An alternative file `system.file("doc", "hyperpaper.Rnw", package = "qtlbim")` creates a preprint document. Both require post-processing with `pdflatex`.

A user-defined section can be added to the automated documents, using the `SweaveExtra` option. We have provided `system.file("external", "hyperslideextra.Rnw", package = "qtlbim")` for the slide version and `system.file("external", "hyperpaperextra.Rnw", package = "qtlbim")` for the preprint version.

### Author(s)

Brian S. Yandell, yandell@stat.wisc.edu

### References

http://www.qtlbim.org

### See Also

`Sweave`

### Examples

    ## Not run:
    data(hyper)

    ## Create default slide show LaTeX source without extra section.
    qb.sweave(hyper)

    ## Turn LaTeX into PDF. Run twice to get outline correct.
    ## Need pdflatex on your system.
    system("pdflatex hyperslide")
    system("pdflatex hyperslide")

    ## Create document form, with extra section.
    qb.sweave(hyper,
      SweaveFile = system.file("external", "hyperpaper.Rnw", package = "qtlbim"))
      SweaveExtra = system.file("external", "hyperpaperextra.Rnw",
        package = "qtlbim"))
    system("pdflatex hyperpaper")
    system("pdflatex hyperpaper")
    ## End(Not run)

[Package qtlbim version 1.6.5 Index]