matchMarkerOrder: Orient chromosomes to match some previously found marker...

Description Usage Arguments Details Value Examples

Description

matchMarkerOrder Use previously known marker orders (e.g. from a annotation) to inform the marker orientation along a chromosome. Does not re-order markers within a linkage group, but only flips orders of chromosomes that seem to be inverted relative to the annotation.

Usage

1
matchMarkerOrder(cross, physicalMarkerOrder = NULL, plotit = T)

Arguments

cross

The QTL cross object. If marker names are formated as physicalChromosome_physicalBasePairPosition ("_" separated), this is the only required argument. *Note, the physical Chromosome must match exactly the chromosome names of the cross.* If there are additional characters (e.g. "Chr01" = "1"), specify the character string to sub stripped in marker.char.rm. In this example, marker.char.rm = "Chr0".

physicalMarkerOrder

If marker names are not as specified above, this is a vector of marker names in the order they should exist in the physical genome.

Details

For each chromosome, fits a linear model and asks if the slope < 0. If so, flips the maker order on that chromosome.

Value

A cross object with flipped marker order on chromosomes that seem to be in the reverse orientation of the annotation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
library(qtlTools)
set.seed(42)
map<-sim.map(len = c(100,200,50), n.mar = c(50,100,25),
include.x = F, eq.spacing=T)
cross<-sim.cross(map, type = "riself",
map.function = "kosambi", error.prob = 0)
cross<-est.rf(cross)
markerlist<-lapply(chrnames(cross), function(x)
sample(markernames(cross, chr =x)))
names(markerlist)<-as.character(chrnames(cross))
cross.rand<-newLG(cross, markerList = markerlist)
cross.ord<-tspOrder(cross = cross.rand,
                    max.rf = .5,
                    concorde_path = "/Users/John/Documents/concorde/TSP")
cross.ord<-replace.map(cross.ord, est.map(cross.ord, map.function = "kosambi"))
orig.marker.order<-lapply(chrnames(cross), function(x)
markernames(cross, chr = x))
names(orig.marker.order)<-chrnames(cross)

cross.match<-matchMarkerOrder(cross = cross.ord,
  physicalMarkerOrder = orig.marker.order)

## End(Not run)

jtlovell/qtlTools documentation built on May 20, 2019, 3:14 a.m.