Sequence difference plot

Here we use the data published in Potato Research(Chang et al. 2015) as an example.

## [1] "/tmp/RtmpDoH7jq/Rinst5c6f5f7d9211/seqcombo/examples/GVariation/A.Mont.fas"  
## [2] "/tmp/RtmpDoH7jq/Rinst5c6f5f7d9211/seqcombo/examples/GVariation/B.Oz.fas"    
## [3] "/tmp/RtmpDoH7jq/Rinst5c6f5f7d9211/seqcombo/examples/GVariation/C.Wilga5.fas"

The input fasta file should contains two aligned sequences. User need to specify which sequence (1 or 2, 1 by default) as reference. The seqdiff function will parse the fasta file and calculate the nucleotide differences by comparing the non-reference one to reference.

## sequence differences of Mont and CF_YL21 
## 1181 sites differ:
##   A   C   G   T 
## 286 315 301 279

We can visualize the differences by plot method:

We can parse several files and visualize them simultaneously.

Sequence similarity plot

Session info

Here is the output of sessionInfo() on the system on which this document was compiled:

## R version 3.5.2 (2018-12-20)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04.5 LTS
## 
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.8-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.8-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [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] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] igraph_1.2.2    ggplot2_3.1.0   emojifont_0.5.2 tibble_1.4.2   
## [5] seqcombo_1.4.1 
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.0          compiler_3.5.2      pillar_1.3.1       
##  [4] plyr_1.8.4          XVector_0.22.0      bindr_0.1.1        
##  [7] sysfonts_0.8        prettydoc_0.2.1     tools_3.5.2        
## [10] zlibbioc_1.28.0     digest_0.6.18       evaluate_0.12      
## [13] gtable_0.2.0        pkgconfig_2.0.2     rlang_0.3.0.1      
## [16] rvcheck_0.1.3       yaml_2.2.0          parallel_3.5.2     
## [19] xfun_0.4            proto_1.0.0         bindrcpp_0.2.2     
## [22] withr_2.1.2         showtextdb_2.0      stringr_1.3.1      
## [25] dplyr_0.7.8         knitr_1.21          Biostrings_2.50.1  
## [28] S4Vectors_0.20.1    IRanges_2.16.0      tidyselect_0.2.5   
## [31] stats4_3.5.2        grid_3.5.2          cowplot_0.9.3      
## [34] glue_1.3.0          R6_2.3.0            rmarkdown_1.11     
## [37] purrr_0.2.5         magrittr_1.5        scales_1.0.0       
## [40] htmltools_0.3.6     BiocGenerics_0.28.0 showtext_0.5-1     
## [43] assertthat_0.2.0    colorspace_1.3-2    labeling_0.3       
## [46] stringi_1.2.4       lazyeval_0.2.1      munsell_0.5.0      
## [49] crayon_1.3.4

References

Chang, Fei, Fangluan Gao, Jianguo Shen, Wenchao Zou, Shuang Zhao, and Jiasui Zhan. 2015. “Complete Genome Analysis of a PVYN-Wi Recombinant Isolate from Solanum Tuberosum in China.” Potato Research 58 (4):377–89. https://doi.org/10.1007/s11540-015-9307-3.