Learn R Programming

bqtl (version 1.0-7)

map.index: Look up numerical index(es) of map locations

Description

One way to index a locus (loci) in a genetic map is by the numerical index of its row (their rows). map.index performs a lookup in a specific map.frame given one (or two) chromosome number(s) and one (or two) map distance(s).

Usage

map.index(x, ...)

Arguments

x
A map.frame or analysis.object
...
For methods that look up a location in a map.frame the following named arguments may be used
chromo
A chromosome number or 2 ordered numbers
cM
(Optional) map distance or two. If the same chromosome number is used twice in chromo, cM must be ordered. If cM is omitted, all loci on the chromosome will be included.

Value

  • A numerical vector of one or more row numbers. If only chromo is specified, all row numbers on the specified chromosome are returned. If chromo has two elements, then all row numbers on those chromosomes with numbers in range(chromo) will be returned. If one of each of chromo and cM are specified, then the row number of the closest locus will be returned. For two of each, row numbers in the range of the closest matches will be returned.

Details

It is often convenient to refer to genetic loci or regions by the numerical index(es) in a map.frame. map.index allows lookups according to the approximate map location.

See Also

make.map.frame for a description of how map information is organized.

Examples

Run this code
data(little.ana.bc)
map.index(little.ana.bc,chromo=1,cM=25) # locus nearest 1,25
index.chr.1 <- map.index(little.ana.bc,chromo=1)
fit.on.1 <- bqtl(bc.phenotype~locus(index.chr.1),little.ana.bc)
summary( loglik( fit.on.1 ) )

Run the code above in your browser using DataLab