Sequence difference plot

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

## [1] "/tmp/RtmpU3NLRQ/Rinst4b21cfcb41e/seqcombo/examples/GVariation/A.Mont.fas"  
## [2] "/tmp/RtmpU3NLRQ/Rinst4b21cfcb41e/seqcombo/examples/GVariation/B.Oz.fas"    
## [3] "/tmp/RtmpU3NLRQ/Rinst4b21cfcb41e/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 Under development (unstable) (2019-10-24 r77329)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.11-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.11-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.4.1  ggplot2_3.2.1   emojifont_0.5.2 tibble_2.1.3   
## [5] seqcombo_1.9.0 
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.2          BiocManager_1.30.9  compiler_4.0.0     
##  [4] pillar_1.4.2        XVector_0.27.0      sysfonts_0.8       
##  [7] prettydoc_0.3.0     tools_4.0.0         zlibbioc_1.33.0    
## [10] digest_0.6.22       evaluate_0.14       gtable_0.3.0       
## [13] pkgconfig_2.0.3     rlang_0.4.1         rvcheck_0.1.5      
## [16] yaml_2.2.0          parallel_4.0.0      xfun_0.10          
## [19] proto_1.0.0         withr_2.1.2         showtextdb_2.0     
## [22] stringr_1.4.0       dplyr_0.8.3         knitr_1.25         
## [25] Biostrings_2.55.0   S4Vectors_0.25.0    IRanges_2.21.0     
## [28] stats4_4.0.0        grid_4.0.0          cowplot_1.0.0      
## [31] tidyselect_0.2.5    glue_1.3.1          R6_2.4.0           
## [34] rmarkdown_1.16      purrr_0.3.3         magrittr_1.5       
## [37] scales_1.0.0        htmltools_0.4.0     BiocGenerics_0.33.0
## [40] showtext_0.7        assertthat_0.2.1    colorspace_1.4-1   
## [43] labeling_0.3        stringi_1.4.3       lazyeval_0.2.2     
## [46] munsell_0.5.0       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.