library(Biostrings)
# pretend the srPhiX174 DNAStringSet represents 35bp single-end
# sequencing reads:
data(srPhiX174)
set.seed(718)
data_with_errors = add_platform_error(srPhiX174, 'illumina4', paired=FALSE)
# the 17th read in this set has an error at position 20:
data_with_errors[17][[1]][20] # N
srPhiX174[17][[1]][20] # T
# 101 reads total have at least one sequencing error:
sum(data_with_errors != srPhiX174)
Run the code above in your browser using DataLab