Learn R Programming

RSVSim (version 1.12.0)

estimateSVSizes: Draw random structural variation sizes from a beta distribution

Description

RSVSim can implement structural variations (SVs) of specific sizes. estimateSVSizes draws random values for SV sizes from a beta distribution. It can fit the distribution according to given SV sizes or default values.

Usage

estimateSVSizes(n, svSizes, minSize, maxSize, default, hist=TRUE)

Arguments

n
The number of SVs to simulate
svSizes
A numeric vector with SV sizes to calculate the parameters for the beta distribution
minSize
The minimum returned SV size
maxSize
The maximum returned SV size
hist
TRUE or FALSE to show a histogram of the SV sizes (or not)
default
Setting this to "deletions", "insertions", "inversions" or "tandemDuplications" loads default shape parameters for the beta distribution for these SV types (see details below)

Value

minSize and maxSize.

Details

  • minSize and maxSize are optional and taken from the given set of svSizes if omitted
  • The default shape parameters for deletions, insertions, inversions and tandem duplications were estimated from sequencing studies in the Database of Genomic Variants release 2012-03-29. In total, 1.129 deletions, 490 insertions, 202 inversions and 145 tandem duplications between 500bp and 10kb were used to estimate the shape of the distribution.

References

Database of Genomic Variants: http://dgvbeta.tcag.ca/dgv/app/home?ref=NCBI36/hg18

Examples

Run this code
  ## estimate sizes for 20 SVs from a given set of values:
  svSizes = c(10,20,30,40,60,80,100,150,200,250,300,400,500,750,1000)
  estimateSVSizes(n=20, svSizes=svSizes, hist=FALSE) 

  ## when using the default shape parameters for deletions:
  estimateSVSizes(n=20, minSize=500, maxSize=10000, hist=FALSE, default="deletions")

Run the code above in your browser using DataLab