random_qual: Create random qualities for a given encoding

Description Usage Arguments Value Author(s) Examples

View source: R/simulate.R

Description

Create a BStringSet object with random qualities

Usage

1
2
random_qual(slength, swidth, qual = NULL, encod = c("Sanger",
  "Illumina1.8", "Illumina1.5", "Illumina1.3", "Solexa"), prob = NULL)

Arguments

slength

number of sequences

swidth

width of the sequences

qual

quality range for the sequences. It must be a range included in the selected encoding:

'Sanger' = [0, 40]

'Illumina1.8' = [0, 41]

'Illumina1.5' = [0, 40]

'Illumina1.3' = [3, 40]

'Solexa' = [-5, 40]

example: for a range from 20 to 30 in Sanger encoding, pass the argument = c(20, 30)

encod

sequence encoding

prob

a vector of range = range(qual), with probabilities to set the frequency of each quality value. Default is equiprobability. If the sum of the probabilities is > 1, the values will be nomalized to the range [0, 1].

Value

BStringSet object

Author(s)

Leandro Roser learoser@gmail.com

Examples

1
2
q <- random_qual(30, 20)
q

FastqCleaner documentation built on Nov. 8, 2020, 5:05 p.m.