add_error: add sequencing error to simulated reads

Description Usage Arguments Value Examples

View source: R/add_error.R

Description

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

Usage

1
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

1
2
3
4
5
  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.

alyssafrazee/polyester documentation built on Sept. 17, 2021, 8:54 a.m.