addMisclass {polySegratio}R Documentation

Misclassifies marker data in objects of class autoMarker or autoCross

Description

Marker data are misclassified at a specified rate for objects of class simAutoMarkers or simAutoCross. The rate may be specified either as a proportion of missing at random or a proportion of columns and rows with specified proportions of missings.

Usage

addMisclass(x, misclass = 0, bands.missed=0, parents = FALSE,
parent.cols = c(1, 2), seed)

Arguments

x object of class simAutoMarkers or simAutoCross, or a matrix with dominant markers scored as 0 or 1
misclass proportion misclassified specified as for na.proportion (Default: 0)
bands.missed proportion of bands that are not scored when they are actually present. Note this is applied to correctly specified markers after markers are misclassified (Default: 0)
parents if TRUE then misclassify parental alleles, otherwise misclassify offspring marker alleles
parent.cols for object of simAutoClass the columns containg parental markers
seed random number generator (RNG) state for random number which will be set at start to reproduce results

Value

returns object of class simAutoMarkers or simAutoCross, or a matrix with dominant markers scored as 0 or 1 with extra components

misclass.info list with components
    proportion
    numeric proportion misclassified
    index
    indicates which markers were set as misclassified
    bands.proportion
    numeric proportion marker bands missed
    bands.index
    indicates which markers bands were missed
    call
    matches arguments when function called
    time.generated
    time/date when misclassifieds added
    seed
    seed for random number generation

Author(s)

Peter Baker p.baker1@uq.edu.au

See Also

addMissing add missing markers at random, sim.autoMarkers simulate autopolyploid markers, sim.autoCross simulate autopolyploid markers for a cross

Examples


## simulate autopolyploid markers
p1 <- sim.autoCross(4, dose.proportion=c(0.7,0.3), n.markers=20, n.indiv=10)
p2 <- sim.autoCross(4, dose.proportion=list(p01=c(0.7,0.3),p10=c(0.7,0.3),p11=c(
0.6,0.2,0.2)))

## add misclassified for a whopping 20% of markers
print(addMisclass(p1, 0.2, parents=TRUE), row=1:20)
addMisclass(p2, 0.1)
                    

[Package polySegratio version 0.2-3 Index]