add_error {polyester} | R Documentation

## add sequencing error to simulated reads

### Description

simulate sequencing error by randomly changing the sequenced nucleotide on some of the reads

### Usage

    add_error(tFrags, error_rate = 0.005)

### Arguments

`tFrags` | DNAStringSet representing sequencing reads
`error_rate` | error probability

### Value

DNAStringSet equivalent to `tFrags` but with random sequencing errors inserted

### Examples

      library(Biostrings)
      data(srPhiX174)
      set.seed(174)
      srPhiX174_withError = add_error(srPhiX174)
      #error was introduced in, e.g., position 10 of 2nd string in set.

[Package polyester version 1.23.1 Index]