hypredNewMap: Modify the map of a hypredGenome object

Description Usage Arguments Details Value See Also Examples

Description

A generic function to modify the genetic map defined in the "hypredGenome" object

Usage

1
2
3
hypredNewMap(object, ...)
## S4 method for signature 'hypredGenome'
hypredNewMap(object, new.map)

Arguments

object

an object of a class that holds information on map positions of loci, typically an "hypredGenome" object.

new.map

numeric vector with the map positions of all loci (marker and qtl)

...

Methods may require further arguments.

Details

Only the map positions can be changed, the length of the chromosomes, their number and the number of SNP and QTL per chromosome is not modified. There are some validity checks included to assure that the new map agrees with these parameters.

The vector given to new.map holds the positions of all loci. So if, for example, the number of chromosomes is three and the number of loci per chromosome is 10, then new.map[1:10] must contain the map of chromosome 1, new.map[11:20] the map of chromosome 2 and new.map[21:30] the mao of chromosome 3.

The postions must give the distance to the beginning of the chromosome, not the distance between adjacent loci!

If the object included SNP blocks, they will not be adapted! Instead all slots referring to the blocks are set to NULL and a warning is issued.

Value

A "hypredGenome" object, modified accordingly.

See Also

The function hypredGenome which creates the original object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## one chromosome of length 1 M and 5 SNP

random_map <- hypredGenome(1, 1.0, 5)

## map positions are random

slot(random_map,"pos.snp")

## change to regular positions

change_map <- c(0.1, 0.2, 0.3, 0.4, 0.5)

regular_map <- hypredNewMap(random_map, change_map)

slot(regular_map,"pos.snp")

timflutre/hypred documentation built on May 6, 2019, 10:51 a.m.