Learn R Programming

strum (version 0.6.2)

createStrumMarker: Create strumMarker Object

Description

A function to create strumMarker object.

Usage

createStrumMarker(hapMapData, populationRecombRate = 50, errorRate = 0, mutationRate = 0, missingRate = 0, coding = c(0,1,2), returnIBD = FALSE, intervalIBD = 10)

Arguments

hapMapData
Object of class data.frame containing input data (see Details).
populationRecombRate
Numeric value stating the average number of crossovers per cM when simulating founders.
errorRate
Numeric value stating the probability of a genotype error. If a genotype error occurs, a genotype (other than the true genotype) is selected with uniform probability.
mutationRate
Numeric value stating the probability that an allele will be mutated before it is passed on. If a mutation occurs, a new allele (not the original allele) is selected with uniform probability.
missingRate
Numeric value stating the probability of a missing genotype.
coding
Numeric vector of length three stating the coding of inheritance model. The first element corresponds to the code assigned to the homozygous minor allele. The second element corresponds to the heterozygous genotype. The third element corresponds to the homozygous major allele. The default coding is additive (i.e. coding = c(0, 1, 2)).
returnIBD
Logical. If TRUE, then the ibd slot in the strumData object, simulated using the returned strumMarker object from this function, will be populated. If FALSE, the ibd slot will be left empty.
intervalIBD
Numeric value stating the interval that ibd values should be calculated.

Value

Returns an object of class strumMarker.

Details

The value of hapMapData must be a data.frame containing hapmap data. The three columns that state the SNP information must present:
  1. rsID contains the names of the marker.
  2. chr is the chromosome or linkage group.
  3. phys_position is the physical base pair position. It is converted to Haldane (genetic distance) map position in centiMorgans as phys_position/1000000.

See Also

strumMarker, importHapmapData

Examples

Run this code
## Not run: 
# # Get some hapmap data & selct 10 snps.
# #--------------------------------------
# hap20 = importHapmapData(20)
# hap20 = hap20[(1:10)*10,]
# 
# # Create strumMarker object with hapmap data.
# #--------------------------------------------
# snpStrumMarker = createStrumMarker(hap20)
# ## End(Not run)

Run the code above in your browser using DataLab