Description Usage Arguments Value Author(s) Examples

View source: R/bootstrapEventTiming.R

Simulate reads based on an event matrix

1 2 | ```
readSimulation(B, alleleSet, q, totalCopy, mutRate = NULL, seqError = 0,
fixedN = FALSE, normCont = 0, aveReadCoverage = 30, countDistribution = NULL)
``` |

`B` |
the number of simulated data sets to make |

`alleleSet` |
a vector of expected allele frequencies, without contamination or sequencing error accounted for |

`q` |
integer. the number of expected allele frequencies??? |

`totalCopy` |
integer. The total number of copies in the final stage, i.e. at the end of the event |

`mutRate` |
a number between 0 and 1. The mutation rate, defined as the number of mutations observed divided by number of nucleotides sequenced or examined |

`seqError` |
a number between 0 and 1 representing the sequencing error. The default value is 0, i.e. no sequencing error. |

`fixedN` |
logical. Should the number of mutations be fixed? By default set to FALSE. If set to TRUE, the expected number of mutations is used, i.e. mutRate*B |

`normCont` |
a number between 0 and 1 describing the amount of normal contamination present in the sample. The default value is 0, i.e. no normal contamination. |

`aveReadCoverage` |
average read coverage of an allele. The default value is 30 reads per allele. |

`countDistribution` |
optional. Provide an empirical distribution for read coverage. If given, the argument aveReadCoverage is ignored, and the mean of the empirical distribution is used. By default, set to NULL. |

Returns a data frame with simulated read counts under the normal contamination, sequencing error, allele frequency distribution, and read count distributions provided.

Elizabeth Purdom

1 2 3 4 5 6 7 8 | ```
#simulate from CNLOH event with pi[0]=.1
Amat<-makeEventHistory(totalCopy=2,type="LOH")[[1]]
piVal<-c(.1,.9)
qvec<-prop.table(Amat%*%piVal)
sims<-readSimulation(10, alleleSet=allAF(totalCopy=2)[[1]], q=qvec,
totalCopy=2, mutRate = 100, seqError = 0.1, fixedN = TRUE,
normCont = 0.1, aveReadCoverage = 30)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.