Uses the uShuffle library to shuffle reads

shuffle(reads, k = 2, n = 2)

Arguments

reads

An object of BStringSet.

k

the k-let size.

n

the number of random sequences to generate.

Value

An object of BStringSet.

References

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

Examples

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