qb.get {qtlbim} | R Documentation

## Internal qtlbim routines

### Description

These are internal qtlbim routines that are made visible in the namespace for technical use.

### Usage

    covar.mean(qbObject, adjust.covar, verbose = FALSE)
    pull.grid(qbObject, offset, spacing, mask.region)
    qb.cross(qbObject)
    qb.demo()
    qb.get(qbObject, element, sub)
    qb.load(cross, qbObject, dir, file)
    qb.save(cross, qbObject, dir, file)
    qb.reorder(qbObject)

### Arguments

`qbObject` | Object of class `qb`.
`adjust.covar` | Adjustments to covariates. Default is `NA`, which adjusts by covariate mean values. Values are assumed to be in order of fixed covariates.
`verbose` | Verbose mode if `TRUE`.
`cross` | Object of class `cross` (see `read.cross`).
`offset` | Offset by first marker if `TRUE`.
`spacing` | Add columns for `map`, `eq.spacing` and `xchr` if `TRUE`. This corresponds to `map` element of a `scantwo` object.
`mask.region` | Subset genome regions if `TRUE` (see `subset.qb`).
`element` | Character string for element of `qbObject` to get. Typically this is a parameter to `qb.data`, `qb.model` or `qb.mcmc`, or it is one of the MCMC sample files in `output.dir`, from `c("iterdiag", "mainloci", "pairloci", "covariates", "gbye")`.
`sub` | Character string for subelement of `qbObject` to get.
`dir` | Character string name of directory for load if `qbObject` does not exist.
`file` | Character string name of file for load if `qbObject` does not exist.

### Details

These are all internal routines. But some may be useful beyond.

`qb.demo` is called in `demo(qb.tour)` and provides an interactive selection of the `R/qtlbim` demos.

`qb.cross` extracts the `cross` object associated with `qbObject`. `qb.get` is the internal main routine for extracting information from a `qbObject`. As stated elsewhere, currently `qbObject` refers to objects that are critical to it but not part of it: the `cross` object used to create it and the MCMC samples in files in `output.dir`.

`covar.mean` finds covariate means or adjusts them to user-supplied values.

`pull.grid` pulls the grid of pseudomarkers from the `cross` object associated with `qbObject`. The option `spacing` determines whether this is in a format similar to `scanone` (`FALSE`) or `scantwo` (`TRUE`). It is used `qb.get` when accessing external MCMC sample files and by several other routines that require pseudomarker information, notably genotype probabilities.

`qb.reorder` is called by `qb.mcmc` to create pointers to reorder the MCMC samples so that chromosome numbers and positions within chromosomes are in increasing order. It creates the `subset` element of a `qb` object.

`qb.save` and `qb.load` are used to speed up examples and vignettes by saving and loading an external workspace containing a `cross` and a `qb` object. `qb.save` returns `TRUE` if the save was successful. `qb.load` returns `TRUE` if the objects exist already or they were loaded properly.

### Examples

    covar.mean(qbExample)
    qb.get(qbExample, "output.dir")
    summary(qb.cross(qbExample))
    temp <- qb.get(qbExample, "iterdiag")
    dim(temp)
    names(temp)

    ## Not run:
    ## The following should have no effect.
    qbExample <- qb.reorder(qbExampleb
    ## End(Not run)

    ## You can call the following rather than demo() to get a tour.
    qb.demo()

[Package qtlbim version 1.6.5 Index]