addMisclass: Misclassifies marker data in objects of class autoMarker or...

Description Usage Arguments Value Author(s) See Also Examples

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

1
2
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

  • proportionnumeric proportion misclassified

  • indexindicates which markers were set as misclassified

  • bands.proportionnumeric proportion marker bands missed

  • bands.indexindicates which markers bands were missed

  • callmatches arguments when function called

  • time.generatedtime/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

1
2
3
4
5
6
7
8
9
## 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)
                    

polySegratio documentation built on May 2, 2019, 6:09 p.m.