Introduction

uShuffle is a useful tool for shuffling biological sequences published by Minghui Jiang et.al. This package is R wrapper for the tool.

Installation

BiocManager::install("jianhong/uShuffleR")

Usage

library(uShuffleR)
f <- system.file("extdata", "test.fa", package="uShuffleR")
s <- shuffle(f)
s
## DNAStringSet object of length 2:
##     width seq                                               names               
## [1]    32 AGGTTTCATCGTAGACTGATTAGGTTCAAGGC                  read1_shuffle_1
## [2]    32 AGAAGGGTAGGCACTGAGTCATTTCGTTTATC                  read1_shuffle_2
library(Biostrings)
writeXStringSet(s, "shuffled.sequence.fa")

SessionInfo

## R Under development (unstable) (2021-04-08 r80148)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.2 LTS
## 
## Matrix products: default
## BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats4    parallel  stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
## [1] Biostrings_2.59.2   XVector_0.31.1      IRanges_2.25.7     
## [4] S4Vectors_0.29.15   BiocGenerics_0.37.1 uShuffleR_0.0.2    
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.6        knitr_1.31        magrittr_2.0.1    zlibbioc_1.37.0  
##  [5] R6_2.5.0          ragg_1.1.2        rlang_0.4.10      fastmap_1.1.0    
##  [9] stringr_1.4.0     tools_4.1.0       xfun_0.22         htmltools_0.5.1.1
## [13] systemfonts_1.0.1 yaml_2.2.1        digest_0.6.27     rprojroot_2.0.2  
## [17] pkgdown_1.6.1     crayon_1.4.1      textshaping_0.3.3 fs_1.5.0         
## [21] memoise_2.0.0     cachem_1.0.4      evaluate_0.14     rmarkdown_2.7    
## [25] stringi_1.5.3     compiler_4.1.0    desc_1.3.0