Learn R Programming

polyester (version 1.8.3)

add_error: 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

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

Run the code above in your browser using DataLab