Learn R Programming

qtl (version 1.01-9)

arithscan: Arithmetic Operators for genome scan results

Description

These binary operators perform arithmetic on genome scan result objects.

Usage

scan1+scan2
scan1-scan2

Arguments

scan1, scan2
Genome scan results on the same set of chromosomes and markers.

Value

  • The same data structure as the input objects, with LOD scores recalcuated.

Details

This is used to calculate the sum or difference of LOD scores of two genome scan results. The basic arithmetic operators were overrided to work on objects of class scanone, scantwo, and scanqtl.

It currently only works for scanone results.

Examples

Run this code
data(fake.bc)
fake.bc <- calc.genoprob(fake.bc)
# genome scans without covariates
out.nocovar <- scanone(fake.bc)
# genome scans with covariates
ac <- fake.bc$pheno[,c("sex","age")]
ic <- fake.bc$pheno[,"sex"]
out.covar <- scanone(fake.bc, pheno.col=1,
                     addcovar=ac, intcovar=ic)
# plot the difference of with and without additive covariate
plot(out.covar-out.nocovar)

Run the code above in your browser using DataLab