createRandomMutations: createRandomMutations

Description Usage Arguments Value Examples

View source: R/createRandomMutations.R

Description

Function to generate random mutation data.

Usage

1
2
3
4
5
createRandomMutations(nMut, sampleName = "testSample", asTibble = TRUE,
  sizeSur = 2, refGenomeHg19 = TRUE, useChrom = c("chr1", "chr2",
  "chr3", "chr4", "chr5", "chr6", "chr7", "chr8", "chr9", "chr10", "chr11",
  "chr12", "chr13", "chr14", "chr15", "chr16", "chr17", "chr18", "chr19",
  "chr20", "chr21", "chr22", "chrX", "chrY"))

Arguments

nMut

The number of mutations that needed to be generated.

sampleName

A name for the test sample.

asTibble

A Boolean to tell if the returned table needs to be a tibble. Returns a data.frame when FALSE.

sizeSur

A number with the amount of nucleotides left and right of the mutation. (e.g. sizeSur = 2 –> "CC.GT")

refGenomeHg19

A Boolean to tell if the preferred reference genome has to be Hg19. Hg38 will be used when refGenome = FALSE.

useChrom

A vector with the chromosomes that are used. Make sure that the names are notated as e.g. "chr1".

Value

A tibble or data.frame with random mutation data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
x <- createRandomMutations(nMut       = 100,
                           sampleName = "test",
                           sizeSur    = 3)

# Proper way of using all the parameters:
createRandomMutations(nMut          = 10,
                      sampleName    = "name",
                      asTibble      = FALSE,
                      sizeSur       = 4,
                      refGenomeHg19 = FALSE,
                      useChrom      = c("chr1", "chr2"))

# See explanation of table columns
cat(comment(x))

AlexJanse/cMut documentation built on May 25, 2019, 4 a.m.