Uses the uShuffle library to shuffle reads
shuffle(reads, k = 2, n = 2)
An object of BStringSet.
the k-let size.
the number of random sequences to generate.
An object of BStringSet.
Jiang, M., Anderson, J., Gillespie, J. et al. uShuffle: A useful tool for shuffling biological sequences while preserving the k-let counts. BMC Bioinformatics 9, 192 (2008). https://doi.org/10.1186/1471-2105-9-192
library(Biostrings)
f <- DNAStringSet(c("CTC-NACCAGTAT", "TTGA", "TACCTAGAG"))
shuffle(f)
#> DNAStringSet object of length 6:
#> width seq
#> [1] 13 CCTAGTC-NACAT
#> [2] 13 CAGTATCC-NACT
#> [3] 4 TTGA
#> [4] 4 TTGA
#> [5] 9 TAGACCTAG
#> [6] 9 TACCTAGAG