library(Biostrings)
data(srPhiX174)
## get fragments with lengths drawn from normal distrubution
set.seed(174)
srPhiX174_fragments = generate_fragments(srPhiX174, fraglen=15, fragsd=3,
readlen=4)
srPhiX174_fragments
srPhiX174
## get fragments with lengths drawn from an empirical distribution
empirical_frags = generate_fragments(srPhiX174, distr='empirical')
empirical_frags
## get fragments with lengths from a normal distribution, but include
## positional bias from cDNA fragmentation:
biased_frags = generate_fragments(srPhiX174, bias='cdnaf')
biased_frags
Run the code above in your browser using DataLab